Add admin features, user profile management, and generation capabilities

- Implemented admin dashboard with user management features including role assignment and deletion.
- Added user profile page for updating email and password.
- Created separate routes and templates for text, image, and video generation with appropriate forms.
- Enhanced navigation with dropdown for generation options and loading overlay for better user experience.
- Introduced comprehensive error handling and user feedback through alerts.
- Updated styles for improved UI consistency and responsiveness.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-27 18:48:01 +02:00
parent f2a9f187f2
commit 53d2d2ffef
10 changed files with 1042 additions and 99 deletions
+36
View File
@@ -0,0 +1,36 @@
document.addEventListener('DOMContentLoaded', () => {
// ── Loading overlay ────────────────────────────────────
const overlay = document.getElementById('loading-overlay');
document.querySelectorAll('form').forEach((form) => {
form.addEventListener('submit', () => {
if (overlay) overlay.classList.add('active');
});
});
// ── Hamburger menu ─────────────────────────────────────
const hamburger = document.querySelector('.hamburger');
const navLinks = document.querySelector('.nav-links');
if (hamburger && navLinks) {
hamburger.addEventListener('click', () => {
navLinks.classList.toggle('open');
});
}
// ── Generate dropdown tabs ─────────────────────────────
document.querySelectorAll('.tab-btn').forEach((btn) => {
btn.addEventListener('click', () => {
const target = btn.dataset.tab;
const container = btn.closest('.tabs-container');
if (!container) return;
container.querySelectorAll('.tab-btn').forEach((b) => b.classList.remove('active'));
container.querySelectorAll('.tab-panel').forEach((p) => p.classList.remove('active'));
btn.classList.add('active');
const panel = container.querySelector(`#tab-${target}`);
if (panel) panel.classList.add('active');
});
});
});