diff --git a/public/admin-dark.css b/public/admin-dark.css index 054c64c..3f0595c 100644 --- a/public/admin-dark.css +++ b/public/admin-dark.css @@ -17,9 +17,6 @@ --text: #f1f5f9; --muted: #929db2; - --radius: 14px; - --sidebar: 250px; - --accent-hover: #a78bfa; --accent-soft: rgba(139, 92, 246, .13); --accent-glow: rgba(139, 92, 246, .25); @@ -579,14 +576,6 @@ html.midnight-neon body { color-scheme: dark; } -html.midnight-neon body, -html.midnight-neon button, -html.midnight-neon input, -html.midnight-neon select, -html.midnight-neon textarea { - font-family: inherit; -} - html.midnight-neon * { scrollbar-color: #343b4d #10131b; } diff --git a/public/admin.css b/public/admin.css index 29c5579..5de8013 100644 --- a/public/admin.css +++ b/public/admin.css @@ -68,6 +68,11 @@ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;b .sidebar .bottom-actions a{display:flex;align-items:center;gap:10px;padding:6px 10px;border-radius:8px;color:var(--muted);text-decoration:none;font-size:.82rem;font-weight:500;transition:all .14s ease;position:relative} .sidebar .bottom-actions a:hover{color:var(--text);background:var(--bg)} .sidebar .bottom-actions a[data-nav=home] svg{color:#2563eb} +.sidebar .bottom-actions .home-row{display:flex;align-items:center;gap:2px;min-width:0} +.sidebar .bottom-actions .home-row a{flex:1;min-width:0} +.sidebar .theme-toggle{display:inline-flex;align-items:center;gap:4px;padding:5px 7px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:.72rem;font-weight:600;cursor:pointer;transition:background .14s ease,color .14s ease} +.sidebar .theme-toggle:hover{color:var(--text);background:var(--bg)} +.sidebar .theme-toggle svg{width:15px;height:15px;color:var(--accent)} .user-box .notify-bell svg{color:#f59e0b} .sidebar .bottom-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:6px;border-top:1px dashed var(--border)} .sidebar .bottom-footer .logout-btn{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:6px;color:#ef4444;text-decoration:none;font-size:.78rem;font-weight:600;cursor:pointer;transition:background .14s ease} diff --git a/public/admin.js b/public/admin.js index 1d5176a..4e4f99c 100644 --- a/public/admin.js +++ b/public/admin.js @@ -174,10 +174,13 @@ function buildSidebar(active) {
- - - На главную - +
`; renderIcons(); + syncThemeToggle(); loadVersion(); loadBrand(); initNotifications(); @@ -546,6 +550,18 @@ function renderIcons() { } } +function syncThemeToggle() { + const btn = document.getElementById('themeToggle'); + if (!btn || !window.WhatIDoTheme) return; + const mode = WhatIDoTheme.get(); + btn.innerHTML = ``; + btn.title = 'Тема оформления · нажмите, чтобы переключить'; + btn.setAttribute('aria-label', btn.title); + renderIcons(); +} + +document.addEventListener('whatido:themechange', () => { syncThemeToggle(); }); + function showToast(msg, isError) { const t = document.getElementById('toast'); if (!t) return; @@ -1203,6 +1219,8 @@ function renderPager(el, page, totalPages, onPage) { } document.addEventListener('click', e => { + const themeBtn = e.target.closest('[data-theme-toggle]'); + if (themeBtn) { e.preventDefault(); if (window.WhatIDoTheme) WhatIDoTheme.next(); return; } const imgEl = e.target.closest('[data-img]'); if (imgEl) { e.preventDefault(); showImg(imgEl.dataset.img); return; } const out = e.target.closest('[data-action="logout"]'); diff --git a/public/apikeys.html b/public/apikeys.html index 8f65b29..9eee61a 100644 --- a/public/apikeys.html +++ b/public/apikeys.html @@ -5,6 +5,8 @@ API-ключи — Админ-панель + +
diff --git a/public/audit.html b/public/audit.html index fbf9c66..0457371 100644 --- a/public/audit.html +++ b/public/audit.html @@ -5,6 +5,8 @@ Аудит — Админ-панель + +
diff --git a/public/bans.html b/public/bans.html index 7c703e5..57883d1 100644 --- a/public/bans.html +++ b/public/bans.html @@ -5,6 +5,8 @@ Блокировки IP — Админ-панель + +
diff --git a/public/bookmarks.html b/public/bookmarks.html index 893abfe..ceefa66 100644 --- a/public/bookmarks.html +++ b/public/bookmarks.html @@ -5,6 +5,8 @@ Закладки — Админ-панель + +