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 %}
<div x-data="{ showUploadModal: false, showDeleteModal: false, botToDelete: null }">
<main class="flex-1 p-8 space-y-10" id="mainContent">
<!-- HEADER -->
<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>
<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 %}">
+ Neuen Bot hochladen
</button>
</header>
<!-- HEADER -->
<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>
<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 %}">
+ Neuen Bot hochladen
</button>
</header>
<!-- BOT LIST -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{% for bot in bots %}
<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 %}">
<div>
<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>
<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 %}">
{{ bot.status }}
</span>
</div>
<p class="text-sm text-gray-400 mb-4">Filename: {{ bot.filename }}</p>
<!-- BOT LIST -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{% for bot in bots %}
<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 %}">
<div>
<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>
<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 %}">
{{ bot.status }}
</span>
</div>
<div class="flex justify-between items-center gap-2 mt-4">
<label class="switch">
<input type="checkbox" class="bot-toggle" data-bot-id="{{ bot._id }}" {% if bot.status == 'running' %}checked{% endif %}>
<span class="slider"></span>
</label>
<div class="flex items-center gap-2">
<a href="{{ url_for('bot_console', bot_id=bot._id) }}" class="px-4 py-2 text-sm font-semibold rounded-lg transition text-white
{% if maintenance_active %}bg-yellow-600/80 hover:bg-yellow-700{% else %}bg-purple-600/80 hover:bg-purple-700{% endif %}">
Konsole
</a>
<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">
Löschen
</button>
</div>
<p class="text-sm text-gray-400 mb-4">Filename: {{ bot.filename }}</p>
</div>
<div class="flex justify-between items-center gap-2 mt-4">
<label class="switch">
<input type="checkbox" class="bot-toggle" data-bot-id="{{ bot._id }}" {% if bot.status == 'running' %}checked{% endif %}>
<span class="slider"></span>
</label>
<div class="flex items-center gap-2">
<a href="{{ url_for('bot_console', bot_id=bot._id) }}" class="px-4 py-2 text-sm font-semibold rounded-lg transition text-white
{% if maintenance_active %}bg-yellow-600/80 hover:bg-yellow-700{% else %}bg-purple-600/80 hover:bg-purple-700{% endif %}">
Konsole
</a>
<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">
Löschen
</button>
</div>
</div>
{% else %}
<p class="text-gray-400 col-span-full text-center">Noch keine Bots hochgeladen.</p>
{% endfor %}
</div>
</main>
{% else %}
<p class="text-gray-400 col-span-full text-center">Noch keine Bots hochgeladen.</p>
{% endfor %}
</div>
<!-- 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;">

View file

@ -137,37 +137,37 @@
<div class="animated-bg"></div>
<div class="flex flex-grow">
<aside class="w-64 h-screen bg-black/40 border-r p-6 backdrop-blur-lg flex flex-col flex-shrink-0
<div class="flex">
<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 %}">
<h1 class="text-3xl font-bold mb-8 tracking-wide
{% 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') }}"
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 maintenance_active %}hover:bg-yellow-500/10 hover:text-yellow-300{% else %}hover:bg-purple-500/10 hover:text-purple-300{% endif %}{% endif %}">
Dashboard
</a>
<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 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
</a>
<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 maintenance_active %}hover:bg-yellow-500/10 hover:text-yellow-300{% else %}hover:bg-purple-500/10 hover:text-purple-300{% endif %}{% endif %}">
Einstellungen
</a>
<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 %}"
data-open="{% if active_page in ['user_management', 'role_management', 'maintenance_management'] %}true{% else %}false{% endif %}">
<span>Administration</span>
@ -255,12 +255,18 @@
</nav>
</aside>
<main class="flex-1 p-8 space-y-10 overflow-y-auto" id="mainContent">
{% block content %}{% endblock %}
</main>
<div class="ml-64 flex-1 flex flex-col min-h-screen">
<main class="flex-1 p-8 space-y-10" id="mainContent">
{% block content %}{% endblock %}
</main>
<footer>
&copy; 2025 AstraOS
</footer>
</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 %}
bg-yellow-600/50 hover:bg-yellow-500/80 hover:shadow-yellow-500/40 border border-yellow-500/20
{% else %}
@ -272,9 +278,6 @@
<span>Logout</span>
</a>
<footer>
&copy; 2025 AstraOS
</footer>
<script src="{{ url_for('static', filename='JAVASCRIPT/main.js') }}"></script>
<script>