AstraOS Ver. 1.13:

- Scrolling Fix
- Discord Bots Dateien werden von Gitlab gelöscht hotfix
This commit is contained in:
MrWhiff 2025-12-12 17:51:20 +01:00
parent ea9fe64944
commit 06f2e9ff10
3 changed files with 67 additions and 146 deletions

View file

@ -7,7 +7,6 @@
{% block content %}
<div x-data="{ showAddRoleModal: false, showDeleteModal: false, roleToDelete: null, roleToEdit: 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 %}">Rollen verwalten</h2>
@ -55,7 +54,6 @@
</tbody>
</table>
</div>
</main>
<!-- ADD/EDIT ROLE MODAL -->
<div x-show="showAddRoleModal" @keydown.escape.window="showAddRoleModal = false" class="fixed inset-0 bg-black/70 backdrop-blur-sm flex items-center justify-center z-50" style="display: none;">

View file

@ -172,7 +172,8 @@
<!-- Animierter Hintergrund überall -->
<div class="animated-bg"></div>
<div class="flex h-screen overflow-hidden">
<div class="flex h-screen"> <!-- overflow-hidden entfernt, damit die Seite scrollen kann -->
<!-- Sidebar -->
<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 %}">
@ -310,93 +311,4 @@
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="toast-container" x-data>
{% for category, message in messages %}
<div x-data="{ show: true }" x-init="setTimeout(() => show = false, 5000)" x-show="show"
x-transition:enter="toast transition ease-out duration-300"
x-transition:enter-start="opacity-0 translate-x-8"
x-transition:enter-end="opacity-100 translate-x-0"
x-transition:leave="toast transition ease-in duration-300"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
class="toast bg-gray-800 shadow-lg rounded-lg pointer-events-auto ring-1 ring-black ring-opacity-5 overflow-hidden border border-{{ 'red' if category == 'danger' else ('green' if category == 'success' else ('blue' if category == 'info' else 'gray')) }}-500/40 p-4">
<div class="flex items-start gap-3">
<div class="flex-shrink-0">
{% if category == 'success' %}
<svg class="h-6 w-6 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
{% elif category == 'danger' %}
<svg class="h-6 w-6 text-red-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
{% else %}
<svg class="h-6 w-6 text-blue-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
{% endif %}
</div>
<div class="flex-1">
<p class="text-sm font-medium text-gray-100">{{ message }}</p>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
<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 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 %}
bg-purple-600/50 hover:bg-purple-500/80 hover:shadow-purple-500/40 border border-purple-500/20
{% endif %}">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9" />
</svg>
<span>Logout</span>
</a>
<script src="{{ url_for('static', filename='JAVASCRIPT/main.js') }}"></script>
<script>
gsap.to("#star", {
rotation: 360,
duration: 1.2,
ease: "power1.inOut",
repeat: -1
});
gsap.to("#star", { scale: 1.2, duration: 0.8, yoyo: true, repeat: -1, ease: "power1.inOut" });
setTimeout(() => {
gsap.to("#startup", {
opacity: 0,
duration: 0.3,
onComplete: () => {
document.getElementById("startup").style.display = "none";
gsap.to("#mainContent", { opacity: 1, duration: 0.1 });
}
});
}, 400);
const bg = document.querySelector('.animated-bg');
if (bg) {
for (let i = 0; i < 50; i++) {
const dot = document.createElement('div');
dot.classList.add('dot');
if (document.body.classList.contains('maintenance-active')) {
dot.classList.add('maintenance');
}
dot.style.left = `${Math.random() * 100}vw`;
dot.style.animationDelay = `${Math.random() * -20}s`;
dot.style.animationDuration = `${20 + Math.random() * 10}s`;
bg.appendChild(dot);
}
}
</script>
{% if maintenance_active %}
<script>document.body.classList.add('maintenance-active');</script>
{% endif %}
</body>
</html>

View file

@ -24,9 +24,20 @@ app = Flask(__name__,
template_folder='Frontend/HTML',
static_folder='Frontend')
socketio = SocketIO(app, async_mode=async_mode)
# Speichere Discord-Bots standardmäßig in /opt/astraos/Discord_Bots
BOT_UPLOAD_FOLDER = '/opt/astraos/Discord_Bots'
try:
os.makedirs(BOT_UPLOAD_FOLDER, exist_ok=True)
try:
os.chmod(BOT_UPLOAD_FOLDER, 0o755)
except Exception:
# Wenn chmod fehlschlägt (z.B. Windows), ignoriere
pass
except Exception as e:
# Falls kein Zugriff auf /opt/... möglich (z. B. lokale Entwicklung), Fallback auf lokalen Ordner
BOT_UPLOAD_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'Bots')
if not os.path.exists(BOT_UPLOAD_FOLDER):
os.makedirs(BOT_UPLOAD_FOLDER)
os.makedirs(BOT_UPLOAD_FOLDER, exist_ok=True)
print(f"WARNUNG: Konnte '/opt/astraos/Discord_Bots' nicht erstellen ({e}), benutze lokalen Ordner: {BOT_UPLOAD_FOLDER}")
app.config['BOT_UPLOAD_FOLDER'] = BOT_UPLOAD_FOLDER
running_bots = {}
class SuppressServerLoadFilter(logging.Filter):