Admin Panel: Logout-Button in Sidebar hinzugefügt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
354a9cd977
commit
8951f46536
6 changed files with 67 additions and 47 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
web/dist/index.html
vendored
4
web/dist/index.html
vendored
|
|
@ -5,8 +5,8 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Gaming Hub</title>
|
<title>Gaming Hub</title>
|
||||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🎮</text></svg>" />
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🎮</text></svg>" />
|
||||||
<script type="module" crossorigin src="/assets/index-BWeAEcYi.js"></script>
|
<script type="module" crossorigin src="/assets/index-CUixApZu.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-Bg-1_rjZ.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-BrwtipcK.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ type SoundsResponse = {
|
||||||
|
|
||||||
interface AdminPanelProps {
|
interface AdminPanelProps {
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
|
onLogout: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ══════════════════════════════════════════════════════════════════
|
/* ══════════════════════════════════════════════════════════════════
|
||||||
|
|
@ -88,7 +89,7 @@ function apiUploadFile(
|
||||||
|
|
||||||
type AdminTab = 'soundboard' | 'streaming' | 'game-library';
|
type AdminTab = 'soundboard' | 'streaming' | 'game-library';
|
||||||
|
|
||||||
export default function AdminPanel({ onClose }: AdminPanelProps) {
|
export default function AdminPanel({ onClose, onLogout }: AdminPanelProps) {
|
||||||
const [activeTab, setActiveTab] = useState<AdminTab>('soundboard');
|
const [activeTab, setActiveTab] = useState<AdminTab>('soundboard');
|
||||||
|
|
||||||
// ── Toast ──
|
// ── Toast ──
|
||||||
|
|
@ -372,6 +373,9 @@ export default function AdminPanel({ onClose }: AdminPanelProps) {
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
</nav>
|
</nav>
|
||||||
|
<button className="ap-logout-btn" onClick={onLogout}>
|
||||||
|
{'\uD83D\uDD12'} Abmelden
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* ── Content ── */}
|
{/* ── Content ── */}
|
||||||
|
|
|
||||||
|
|
@ -394,7 +394,7 @@ export default function App() {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{showAdminPanel && isAdmin && (
|
{showAdminPanel && isAdmin && (
|
||||||
<AdminPanel onClose={() => setShowAdminPanel(false)} />
|
<AdminPanel onClose={() => setShowAdminPanel(false)} onLogout={() => { handleAdminLogout(); setShowAdminPanel(false); }} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<main className="hub-content">
|
<main className="hub-content">
|
||||||
|
|
|
||||||
|
|
@ -1772,6 +1772,22 @@ html, body {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ap-logout-btn {
|
||||||
|
margin-top: auto;
|
||||||
|
padding: 10px 16px;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
border-top: 1px solid var(--border);
|
||||||
|
color: #e74c3c;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: left;
|
||||||
|
transition: background 0.15s;
|
||||||
|
}
|
||||||
|
.ap-logout-btn:hover {
|
||||||
|
background: rgba(231, 76, 60, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
/* ── Content Area ── */
|
/* ── Content Area ── */
|
||||||
.ap-content {
|
.ap-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue