Unified Admin Panel: 3 Plugin-Settings in ein zentrales Modal

- Neues AdminPanel.tsx mit Sidebar-Navigation (Soundboard/Streaming/Game Library)
- Lazy-Loading: Daten werden erst beim Tab-Wechsel geladen
- Admin-Button im Header öffnet jetzt das zentrale Panel (Rechtsklick = Logout)
- Admin-Code aus SoundboardTab, StreamingTab und GameLibraryTab entfernt
- ~500 Zeilen Plugin-Code entfernt, durch ~620 Zeilen zentrales Panel ersetzt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel 2026-03-09 22:33:09 +01:00
parent 4b23d013f9
commit 3f175ca02c
10 changed files with 6137 additions and 5320 deletions

View file

@ -1676,3 +1676,624 @@ html, body {
border-radius: 50%;
flex-shrink: 0;
}
/*
UNIFIED ADMIN PANEL (ap-*)
*/
.ap-overlay {
position: fixed;
inset: 0;
z-index: 9998;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(6px);
animation: fade-in 150ms ease;
}
.ap-modal {
display: flex;
width: min(940px, calc(100vw - 40px));
height: min(620px, calc(100vh - 60px));
background: var(--bg-primary);
border: 1px solid var(--border);
border-radius: 16px;
overflow: hidden;
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
animation: hub-modal-in 200ms ease;
position: relative;
}
/* ── Sidebar ── */
.ap-sidebar {
width: 210px;
min-width: 210px;
background: var(--bg-deep);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
padding: 0;
}
.ap-sidebar-title {
padding: 18px 20px 14px;
font-size: 15px;
font-weight: 700;
color: var(--text-normal);
letter-spacing: -0.01em;
border-bottom: 1px solid var(--border);
}
.ap-nav {
display: flex;
flex-direction: column;
padding: 8px;
gap: 2px;
}
.ap-nav-item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
border: none;
border-left: 3px solid transparent;
background: transparent;
color: var(--text-muted);
font-family: var(--font);
font-size: 14px;
font-weight: 500;
cursor: pointer;
border-radius: 0 var(--radius) var(--radius) 0;
transition: all var(--transition);
text-align: left;
}
.ap-nav-item:hover {
color: var(--text-normal);
background: var(--bg-secondary);
}
.ap-nav-item.active {
color: var(--accent);
background: rgba(var(--accent-rgb), 0.1);
border-left-color: var(--accent);
font-weight: 600;
}
.ap-nav-icon {
font-size: 16px;
line-height: 1;
}
.ap-nav-label {
line-height: 1;
}
/* ── Content Area ── */
.ap-content {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
.ap-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.ap-title {
font-size: 16px;
font-weight: 700;
color: var(--text-normal);
margin: 0;
}
.ap-close {
background: none;
border: none;
color: var(--text-muted);
font-size: 16px;
cursor: pointer;
padding: 4px 8px;
border-radius: 6px;
transition: all var(--transition);
}
.ap-close:hover {
color: var(--text-normal);
background: rgba(255, 255, 255, 0.08);
}
.ap-body {
flex: 1;
overflow-y: auto;
padding: 16px 20px;
scrollbar-width: thin;
scrollbar-color: var(--bg-tertiary) transparent;
}
.ap-body::-webkit-scrollbar {
width: 6px;
}
.ap-body::-webkit-scrollbar-thumb {
background: var(--bg-tertiary);
border-radius: 3px;
}
.ap-tab-content {
display: flex;
flex-direction: column;
gap: 12px;
animation: fade-in 150ms ease;
}
/* ── Toolbar ── */
.ap-toolbar {
display: flex;
align-items: center;
gap: 10px;
}
.ap-search {
flex: 1;
padding: 8px 12px;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--bg-secondary);
color: var(--text-normal);
font-size: 13px;
font-family: var(--font);
}
.ap-search:focus {
outline: none;
border-color: var(--accent);
}
.ap-search::placeholder {
color: var(--text-faint);
}
/* ── Buttons ── */
.ap-btn {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 8px 14px;
border: none;
border-radius: var(--radius);
font-family: var(--font);
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all var(--transition);
white-space: nowrap;
}
.ap-btn:disabled {
opacity: 0.5;
cursor: default;
}
.ap-btn-primary {
background: var(--accent);
color: #fff;
}
.ap-btn-primary:hover:not(:disabled) {
background: var(--accent-hover);
}
.ap-btn-danger {
background: rgba(237, 66, 69, 0.15);
color: var(--danger);
border: 1px solid rgba(237, 66, 69, 0.3);
}
.ap-btn-danger:hover:not(:disabled) {
background: rgba(237, 66, 69, 0.25);
}
.ap-btn-outline {
background: var(--bg-secondary);
color: var(--text-muted);
border: 1px solid var(--border);
}
.ap-btn-outline:hover:not(:disabled) {
color: var(--text-normal);
border-color: var(--text-faint);
}
.ap-btn-sm {
padding: 5px 10px;
font-size: 12px;
}
/* ── Upload Zone ── */
.ap-upload-zone {
display: flex;
align-items: center;
justify-content: center;
padding: 14px;
border: 2px dashed var(--border);
border-radius: var(--radius);
background: var(--bg-secondary);
cursor: pointer;
transition: all var(--transition);
color: var(--text-muted);
font-size: 13px;
}
.ap-upload-zone:hover {
border-color: var(--accent);
color: var(--accent);
background: rgba(var(--accent-rgb), 0.05);
}
.ap-upload-progress {
color: var(--accent);
font-weight: 600;
}
/* ── Bulk Row ── */
.ap-bulk-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 0;
}
.ap-select-all {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--text-muted);
cursor: pointer;
}
.ap-select-all input[type="checkbox"] {
accent-color: var(--accent);
}
/* ── Sound List ── */
.ap-list-wrap {
flex: 1;
min-height: 0;
}
.ap-list {
display: flex;
flex-direction: column;
gap: 2px;
}
.ap-item {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 10px;
border-radius: var(--radius);
background: var(--bg-secondary);
transition: background var(--transition);
}
.ap-item:hover {
background: var(--bg-tertiary);
}
.ap-item-check {
flex-shrink: 0;
cursor: pointer;
}
.ap-item-check input[type="checkbox"] {
accent-color: var(--accent);
}
.ap-item-main {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.ap-item-name {
font-size: 13px;
font-weight: 600;
color: var(--text-normal);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ap-item-meta {
font-size: 11px;
color: var(--text-faint);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ap-item-actions {
display: flex;
gap: 4px;
flex-shrink: 0;
}
.ap-rename-row {
display: flex;
align-items: center;
gap: 6px;
margin-top: 4px;
}
.ap-rename-input {
flex: 1;
padding: 5px 8px;
border: 1px solid var(--accent);
border-radius: var(--radius);
background: var(--bg-deep);
color: var(--text-normal);
font-size: 12px;
font-family: var(--font);
}
.ap-rename-input:focus {
outline: none;
}
/* ── Empty ── */
.ap-empty {
text-align: center;
color: var(--text-muted);
padding: 40px 16px;
font-size: 13px;
}
/* ── Hint ── */
.ap-hint {
font-size: 13px;
color: var(--text-muted);
margin: 0;
}
/* ── Status Badge ── */
.ap-status-badge {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
color: var(--text-muted);
}
.ap-status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--danger);
flex-shrink: 0;
}
.ap-status-dot.online {
background: var(--success);
animation: pulse-dot 2s ease-in-out infinite;
}
/* ── Channel List (Streaming) ── */
.ap-channel-list {
display: flex;
flex-direction: column;
gap: 2px;
}
.ap-channel-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 12px;
border-radius: var(--radius);
background: var(--bg-secondary);
transition: background var(--transition);
}
.ap-channel-row:hover {
background: var(--bg-tertiary);
}
.ap-channel-info {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
.ap-channel-name {
font-size: 13px;
font-weight: 600;
color: var(--text-normal);
}
.ap-channel-guild {
font-size: 11px;
color: var(--text-faint);
}
.ap-channel-toggles {
display: flex;
gap: 8px;
flex-shrink: 0;
}
.ap-toggle {
display: flex;
align-items: center;
gap: 4px;
font-size: 12px;
color: var(--text-muted);
cursor: pointer;
padding: 4px 8px;
border-radius: var(--radius);
transition: all var(--transition);
}
.ap-toggle input[type="checkbox"] {
accent-color: var(--accent);
}
.ap-toggle.active {
color: var(--accent);
background: rgba(var(--accent-rgb), 0.08);
}
/* ── Save Row ── */
.ap-save-row {
display: flex;
justify-content: flex-end;
padding-top: 8px;
}
/* ── Profile List (Game Library) ── */
.ap-profile-list {
display: flex;
flex-direction: column;
gap: 2px;
}
.ap-profile-row {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
border-radius: var(--radius);
background: var(--bg-secondary);
transition: background var(--transition);
}
.ap-profile-row:hover {
background: var(--bg-tertiary);
}
.ap-profile-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
flex-shrink: 0;
}
.ap-profile-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.ap-profile-name {
font-size: 14px;
font-weight: 600;
color: var(--text-normal);
}
.ap-profile-details {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
}
.ap-platform-badge {
padding: 1px 6px;
border-radius: 3px;
font-weight: 600;
font-size: 10px;
}
.ap-platform-badge.steam {
background: rgba(66, 133, 244, 0.15);
color: #64b5f6;
}
.ap-platform-badge.gog {
background: rgba(171, 71, 188, 0.15);
color: #ce93d8;
}
.ap-profile-total {
color: var(--text-faint);
}
/* ── Toast ── */
.ap-toast {
position: absolute;
bottom: 16px;
left: 50%;
transform: translateX(-50%);
padding: 8px 16px;
border-radius: var(--radius);
font-size: 13px;
font-weight: 500;
background: var(--bg-tertiary);
color: var(--text-normal);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
animation: fade-in 150ms ease;
z-index: 10;
}
.ap-toast.error {
background: rgba(237, 66, 69, 0.2);
color: #f87171;
}
/* ── Admin Panel Responsive ── */
@media (max-width: 768px) {
.ap-modal {
flex-direction: column;
width: calc(100vw - 16px);
height: calc(100vh - 32px);
}
.ap-sidebar {
width: 100%;
min-width: 100%;
flex-direction: row;
border-right: none;
border-bottom: 1px solid var(--border);
overflow-x: auto;
}
.ap-sidebar-title {
display: none;
}
.ap-nav {
flex-direction: row;
padding: 4px 8px;
gap: 4px;
}
.ap-nav-item {
border-left: none;
border-bottom: 3px solid transparent;
border-radius: var(--radius) var(--radius) 0 0;
padding: 8px 12px;
white-space: nowrap;
}
.ap-nav-item.active {
border-left-color: transparent;
border-bottom-color: var(--accent);
}
.ap-channel-toggles {
flex-direction: column;
gap: 4px;
}
}