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:
1 parent
0ff4465d34
commit
e73d3470b3
8 files changed
+707
-195
No files matched your search
@@ -96,6 +96,7 @@ export function initDictionary() {
|
||||
const moveColConfirmBtn = document.getElementById('move-col-confirm-btn');
|
||||
|
||||
const exportOpenBtn = document.getElementById('export-open-btn');
|
||||
const drawerNavExport = document.getElementById('drawer-nav-export');
|
||||
const exportModal = document.getElementById('export-modal');
|
||||
const closeExportModalBtn = document.getElementById('close-export-modal-btn');
|
||||
const exportCancelBtn = document.getElementById('export-cancel-btn');
|
||||
@@ -556,6 +557,9 @@ export function initDictionary() {
|
||||
if (exportOpenBtn) {
|
||||
exportOpenBtn.addEventListener('click', () => openModal(exportModal));
|
||||
}
|
||||
if (drawerNavExport) {
|
||||
drawerNavExport.addEventListener('click', () => openModal(exportModal));
|
||||
}
|
||||
closeExportModalBtn.addEventListener('click', () => closeModal(exportModal));
|
||||
exportCancelBtn.addEventListener('click', () => closeModal(exportModal));
|
||||
|
||||
@@ -687,12 +691,22 @@ export function initDictionary() {
|
||||
if (stats) {
|
||||
const due = stats.due_cards || 0;
|
||||
const srsBadge = document.getElementById('srs-badge');
|
||||
if (srsBadge) srsBadge.textContent = due;
|
||||
if (srsBadge) {
|
||||
srsBadge.textContent = due;
|
||||
srsBadge.style.display = due > 0 ? 'inline-block' : 'none';
|
||||
}
|
||||
const tabSrsBadge = document.getElementById('tab-srs-badge');
|
||||
if (tabSrsBadge) {
|
||||
tabSrsBadge.textContent = due;
|
||||
tabSrsBadge.classList.toggle('hidden', due === 0);
|
||||
}
|
||||
const drawerSrsBadge = document.getElementById('drawer-srs-badge');
|
||||
if (drawerSrsBadge) {
|
||||
drawerSrsBadge.textContent = due;
|
||||
drawerSrsBadge.classList.toggle('hidden', due === 0);
|
||||
}
|
||||
const drawerStatDue = document.getElementById('drawer-stat-due');
|
||||
if (drawerStatDue) drawerStatDue.textContent = due;
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user