feat(ui): unify header and implement navigation drawer (Task 17)

- Redesign top header into clean, uncluttered layout with hamburger drawer trigger, clickable logo, central SRS focus badge, theme toggle and profile avatar
- Implement unified responsive Navigation Drawer for both desktop and mobile with touch swipe-to-dismiss, backdrop blur, keyboard Esc support and background scroll lock
- Streamline mobile bottom tab bar to 4 core actions (Dictionary, SRS, Reader, Menu) with Menu opening the unified drawer
- Synchronize real-time SRS due badges and dictionary word statistics between header, bottom tabs, and drawer
- Eliminate obsolete separate mobile-menu-modal in favor of unified drawer
- Bump Service Worker cache version to notes-v5.7
This commit is contained in:
Antigravity committed 2026-10-06 21:28:25 +03:00
1 parent 0ff4465d34
commit e73d3470b3
8 files changed
+707 -195

No files matched your search

+20 -1
View File
@@ -139,13 +139,32 @@ export function updateHeaderStats(total = 0, today = 0, srsCount = 0) {
const statTotal = document.getElementById('stat-total');
const statToday = document.getElementById('stat-today');
const srsBadge = document.getElementById('srs-badge');
const tabSrsBadge = document.getElementById('tab-srs-badge');
const drawerSrsBadge = document.getElementById('drawer-srs-badge');
const drawerStatTotal = document.getElementById('drawer-stat-total');
const drawerStatToday = document.getElementById('drawer-stat-today');
const drawerStatDue = document.getElementById('drawer-stat-due');
const formattedToday = today > 0 ? `+${today}` : today;
if (statTotal) statTotal.textContent = total;
if (statToday) statToday.textContent = today;
if (statToday) statToday.textContent = formattedToday;
if (drawerStatTotal) drawerStatTotal.textContent = total;
if (drawerStatToday) drawerStatToday.textContent = formattedToday;
if (drawerStatDue) drawerStatDue.textContent = srsCount;
if (srsBadge) {
srsBadge.textContent = srsCount;
srsBadge.style.display = srsCount > 0 ? 'inline-block' : 'none';
}
if (tabSrsBadge) {
tabSrsBadge.textContent = srsCount;
tabSrsBadge.classList.toggle('hidden', srsCount === 0);
}
if (drawerSrsBadge) {
drawerSrsBadge.textContent = srsCount;
drawerSrsBadge.classList.toggle('hidden', srsCount === 0);
}
}
// -----------------------------------------------------------------------