AstraOS Ver. 1.5:

- Bigfix: Seitenleiste und copyright ist nicht mehr scrollbar
This commit is contained in:
MrWhiff 2025-12-09 20:17:06 +01:00
parent 2555095c7d
commit 49aa10cb7e
2 changed files with 56 additions and 55 deletions

View file

@ -18,52 +18,50 @@
{% block content %} {% block content %}
<div x-data="{ showUploadModal: false, showDeleteModal: false, botToDelete: null }"> <div x-data="{ showUploadModal: false, showDeleteModal: false, botToDelete: null }">
<main class="flex-1 p-8 space-y-10" id="mainContent"> <!-- HEADER -->
<!-- HEADER --> <header class="flex justify-between items-center mb-10">
<header class="flex justify-between items-center mb-10"> <h2 class="text-4xl font-bold tracking-wide {% if maintenance_active %}text-yellow-300{% else %}text-purple-300{% endif %}">Discord Bot Management</h2>
<h2 class="text-4xl font-bold tracking-wide {% if maintenance_active %}text-yellow-300{% else %}text-purple-300{% endif %}">Discord Bot Management</h2> <button @click="showUploadModal = true" class="font-bold py-2 px-4 rounded-lg transition text-white
<button @click="showUploadModal = true" class="font-bold py-2 px-4 rounded-lg transition text-white {% if maintenance_active %}bg-yellow-600 hover:bg-yellow-700{% else %}bg-purple-600 hover:bg-purple-700{% endif %}">
{% if maintenance_active %}bg-yellow-600 hover:bg-yellow-700{% else %}bg-purple-600 hover:bg-purple-700{% endif %}"> + Neuen Bot hochladen
+ Neuen Bot hochladen </button>
</button> </header>
</header>
<!-- BOT LIST --> <!-- BOT LIST -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{% for bot in bots %} {% for bot in bots %}
<div class="bg-black/40 rounded-xl backdrop-blur-lg p-6 flex flex-col justify-between <div class="bg-black/40 rounded-xl backdrop-blur-lg p-6 flex flex-col justify-between
{% if maintenance_active %}border border-yellow-500/30{% else %}border border-purple-500/20{% endif %}"> {% if maintenance_active %}border border-yellow-500/30{% else %}border border-purple-500/20{% endif %}">
<div> <div>
<div class="flex justify-between items-start"> <div class="flex justify-between items-start">
<h3 class="text-2xl font-semibold mb-2 {% if maintenance_active %}text-yellow-300{% else %}text-purple-300{% endif %}">{{ bot.name }}</h3> <h3 class="text-2xl font-semibold mb-2 {% if maintenance_active %}text-yellow-300{% else %}text-purple-300{% endif %}">{{ bot.name }}</h3>
<span id="status-{{ bot._id }}" class="px-2 py-1 text-xs font-semibold rounded-full <span id="status-{{ bot._id }}" class="px-2 py-1 text-xs font-semibold rounded-full
{% if bot.status == 'running' %}bg-green-500/20 text-green-300{% else %}bg-red-500/20 text-red-300{% endif %}"> {% if bot.status == 'running' %}bg-green-500/20 text-green-300{% else %}bg-red-500/20 text-red-300{% endif %}">
{{ bot.status }} {{ bot.status }}
</span> </span>
</div>
<p class="text-sm text-gray-400 mb-4">Filename: {{ bot.filename }}</p>
</div> </div>
<div class="flex justify-between items-center gap-2 mt-4"> <p class="text-sm text-gray-400 mb-4">Filename: {{ bot.filename }}</p>
<label class="switch"> </div>
<input type="checkbox" class="bot-toggle" data-bot-id="{{ bot._id }}" {% if bot.status == 'running' %}checked{% endif %}> <div class="flex justify-between items-center gap-2 mt-4">
<span class="slider"></span> <label class="switch">
</label> <input type="checkbox" class="bot-toggle" data-bot-id="{{ bot._id }}" {% if bot.status == 'running' %}checked{% endif %}>
<div class="flex items-center gap-2"> <span class="slider"></span>
<a href="{{ url_for('bot_console', bot_id=bot._id) }}" class="px-4 py-2 text-sm font-semibold rounded-lg transition text-white </label>
{% if maintenance_active %}bg-yellow-600/80 hover:bg-yellow-700{% else %}bg-purple-600/80 hover:bg-purple-700{% endif %}"> <div class="flex items-center gap-2">
Konsole <a href="{{ url_for('bot_console', bot_id=bot._id) }}" class="px-4 py-2 text-sm font-semibold rounded-lg transition text-white
</a> {% if maintenance_active %}bg-yellow-600/80 hover:bg-yellow-700{% else %}bg-purple-600/80 hover:bg-purple-700{% endif %}">
<button @click="botToDelete = '{{ bot._id }}'; showDeleteModal = true" class="px-3 py-2 text-sm font-semibold rounded-lg transition text-white bg-red-600/80 hover:bg-red-700"> Konsole
Löschen </a>
</button> <button @click="botToDelete = '{{ bot._id }}'; showDeleteModal = true" class="px-3 py-2 text-sm font-semibold rounded-lg transition text-white bg-red-600/80 hover:bg-red-700">
</div> Löschen
</button>
</div> </div>
</div> </div>
{% else %}
<p class="text-gray-400 col-span-full text-center">Noch keine Bots hochgeladen.</p>
{% endfor %}
</div> </div>
</main> {% else %}
<p class="text-gray-400 col-span-full text-center">Noch keine Bots hochgeladen.</p>
{% endfor %}
</div>
<!-- UPLOAD BOT MODAL --> <!-- UPLOAD BOT MODAL -->
<div x-show="showUploadModal" @keydown.escape.window="showUploadModal = false" class="fixed inset-0 bg-black/70 backdrop-blur-sm flex items-center justify-center z-50" style="display: none;"> <div x-show="showUploadModal" @keydown.escape.window="showUploadModal = false" class="fixed inset-0 bg-black/70 backdrop-blur-sm flex items-center justify-center z-50" style="display: none;">

View file

@ -137,37 +137,37 @@
<div class="animated-bg"></div> <div class="animated-bg"></div>
<div class="flex flex-grow"> <div class="flex">
<aside class="w-64 h-screen bg-black/40 border-r p-6 backdrop-blur-lg flex flex-col flex-shrink-0 <aside class="fixed top-0 left-0 w-64 h-screen bg-black/40 border-r p-6 backdrop-blur-lg flex flex-col flex-shrink-0 z-20
{% if maintenance_active %}border-yellow-500/30{% else %}border-purple-500/20{% endif %}"> {% if maintenance_active %}border-yellow-500/30{% else %}border-purple-500/20{% endif %}">
<h1 class="text-3xl font-bold mb-8 tracking-wide <h1 class="text-3xl font-bold mb-8 tracking-wide
{% if maintenance_active %}text-yellow-300{% else %}text-purple-300{% endif %}">AstraOS</h1> {% if maintenance_active %}text-yellow-300{% else %}text-purple-300{% endif %}">AstraOS</h1>
<nav class="flex flex-col gap-2 text-gray-300"> <nav class="flex flex-col gap-2 text-gray-300 overflow-y-auto">
<a href="{{ url_for('dashboard') }}" <a href="{{ url_for('dashboard') }}"
class="px-3 py-2 rounded-md transition class="px-3 py-2 rounded-md transition flex-shrink-0
{% if active_page == 'dashboard' %}{% if maintenance_active %}bg-yellow-500/10 text-yellow-300{% else %}bg-purple-500/10 text-purple-300{% endif %}{% else %} {% if active_page == 'dashboard' %}{% if maintenance_active %}bg-yellow-500/10 text-yellow-300{% else %}bg-purple-500/10 text-purple-300{% endif %}{% else %}
{% if maintenance_active %}hover:bg-yellow-500/10 hover:text-yellow-300{% else %}hover:bg-purple-500/10 hover:text-purple-300{% endif %}{% endif %}"> {% if maintenance_active %}hover:bg-yellow-500/10 hover:text-yellow-300{% else %}hover:bg-purple-500/10 hover:text-purple-300{% endif %}{% endif %}">
Dashboard Dashboard
</a> </a>
<a href="{{ url_for('status_page') }}" <a href="{{ url_for('status_page') }}"
class="px-3 py-2 rounded-md transition class="px-3 py-2 rounded-md transition flex-shrink-0
{% if active_page == 'status_page' %}{% if maintenance_active %}bg-yellow-500/10 text-yellow-300{% else %}bg-purple-500/10 text-purple-300{% endif %}{% else %} {% if active_page == 'status_page' %}{% if maintenance_active %}bg-yellow-500/10 text-yellow-300{% else %}bg-purple-500/10 text-purple-300{% endif %}{% else %}
{% if maintenance_active %}hover:bg-yellow-500/10 hover:text-yellow-300{% else %}hover:bg-purple-500/10 hover:text-purple-300{% endif %}{% endif %}"> {% if maintenance_active %}hover:bg-yellow-500/10 hover:text-yellow-300{% else %}hover:bg-purple-500/10 hover:text-purple-300{% endif %}{% endif %}">
Status Page Status Page
</a> </a>
<a href="{{ url_for('settings') }}" <a href="{{ url_for('settings') }}"
class="px-3 py-2 rounded-md transition class="px-3 py-2 rounded-md transition flex-shrink-0
{% if active_page == 'settings' %}{% if maintenance_active %}bg-yellow-500/10 text-yellow-300{% else %}bg-purple-500/10 text-purple-300{% endif %}{% else %} {% if active_page == 'settings' %}{% if maintenance_active %}bg-yellow-500/10 text-yellow-300{% else %}bg-purple-500/10 text-purple-300{% endif %}{% else %}
{% if maintenance_active %}hover:bg-yellow-500/10 hover:text-yellow-300{% else %}hover:bg-purple-500/10 hover:text-purple-300{% endif %}{% endif %}"> {% if maintenance_active %}hover:bg-yellow-500/10 hover:text-yellow-300{% else %}hover:bg-purple-500/10 hover:text-purple-300{% endif %}{% endif %}">
Einstellungen Einstellungen
</a> </a>
<div> <div>
<button class="w-full text-left px-3 py-2 rounded-md transition flex justify-between items-center collapsible <button class="w-full text-left px-3 py-2 rounded-md transition flex justify-between items-center collapsible flex-shrink-0
{% if maintenance_active %}hover:bg-yellow-500/10 hover:text-yellow-300{% else %}hover:bg-purple-500/10 hover:text-purple-300{% endif %}" {% if maintenance_active %}hover:bg-yellow-500/10 hover:text-yellow-300{% else %}hover:bg-purple-500/10 hover:text-purple-300{% endif %}"
data-open="{% if active_page in ['user_management', 'role_management', 'maintenance_management'] %}true{% else %}false{% endif %}"> data-open="{% if active_page in ['user_management', 'role_management', 'maintenance_management'] %}true{% else %}false{% endif %}">
<span>Administration</span> <span>Administration</span>
@ -255,12 +255,18 @@
</nav> </nav>
</aside> </aside>
<main class="flex-1 p-8 space-y-10 overflow-y-auto" id="mainContent"> <div class="ml-64 flex-1 flex flex-col min-h-screen">
{% block content %}{% endblock %} <main class="flex-1 p-8 space-y-10" id="mainContent">
</main> {% block content %}{% endblock %}
</main>
<footer>
&copy; 2025 AstraOS
</footer>
</div>
</div> </div>
<a href="{{ url_for('logout') }}" class="fixed bottom-6 left-6 text-white font-bold py-3 px-5 rounded-full shadow-lg transition-all backdrop-blur-sm flex items-center gap-2 <a href="{{ url_for('logout') }}" class="fixed bottom-6 left-6 text-white font-bold py-3 px-5 rounded-full shadow-lg transition-all backdrop-blur-sm flex items-center gap-2 z-30
{% if maintenance_active %} {% if maintenance_active %}
bg-yellow-600/50 hover:bg-yellow-500/80 hover:shadow-yellow-500/40 border border-yellow-500/20 bg-yellow-600/50 hover:bg-yellow-500/80 hover:shadow-yellow-500/40 border border-yellow-500/20
{% else %} {% else %}
@ -272,9 +278,6 @@
<span>Logout</span> <span>Logout</span>
</a> </a>
<footer>
&copy; 2025 AstraOS
</footer>
<script src="{{ url_for('static', filename='JAVASCRIPT/main.js') }}"></script> <script src="{{ url_for('static', filename='JAVASCRIPT/main.js') }}"></script>
<script> <script>