Theme: neutral dark gray, card shadows, accent-rgb vars. Fix: arrows skip when modals open. Fix: detail view respects folder filter.

Dark theme: neutral dark grays (#0e1015 bg, #6b7280 accent). Light theme: white cards, better contrast. Cards now have subtle shadows for separation. All hardcoded rgba(59,130,246) replaced with rgba(var(--accent-rgb), ...). Arrow key handler skips when add/edit modal is open. Detail view now uses getFilteredEntries() instead of getFilteredEntries(true) to respect folder selection.
This commit is contained in:
2026-05-12 13:51:41 +01:00
parent dfcbc3f568
commit b51e9c3a73
2 changed files with 27 additions and 25 deletions
+4 -4
View File
@@ -721,7 +721,7 @@ function render() {
} else if (view === 'grouped') {
c.innerHTML = groupedC(getFilteredEntries(true));
} else if (view === 'detail') {
c.innerHTML = detailC(getFilteredEntries());
c.innerHTML = detailC(getFilteredEntries(view === 'grouped'));
} else {
c.innerHTML = filtered.map(e => {
if (view === 'grid' || view === 'card') return gridC(e);
@@ -1392,7 +1392,7 @@ document.addEventListener('mouseup', function(e) {
}
}
});
document.addEventListener('keydown', e => { if (e.key === 'Enter' && !e.ctrlKey && !e.altKey && !e.metaKey) { const a = document.activeElement; if (!a || a.tagName === 'BUTTON') return; e.preventDefault(); if (document.getElementById('editModal').classList.contains('show') && a.closest('#editModal')) saveEdit(); else if (document.getElementById('addModal').classList.contains('show') && a.closest('#addModal')) addEntry(); else if (!document.getElementById('authSection').classList.contains('hidden')) { if (a.id === 'loginUsername' || a.id === 'loginPassword') login(); else if (a.id === 'regPassword') register(); } } });
document.addEventListener('keydown', e => { if (e.key === 'Enter' && !e.ctrlKey && !e.altKey && !e.metaKey) { const a = document.activeElement; if (!a || a.tagName === 'BUTTON') return; e.preventDefault(); if (document.getElementById('editModal').classList.contains('show') && a.closest('.edit-box')) saveEdit(); else if (document.getElementById('addModal').classList.contains('show') && a.closest('.modal-box')) addEntry(); else if (!document.getElementById('authSection').classList.contains('hidden')) { if (a.id === 'loginUsername' || a.id === 'loginPassword') login(); else if (a.id === 'regPassword') register(); } } });
document.getElementById('genModal').addEventListener('click', e => { if (e.target === e.currentTarget) closeGen(); });
document.getElementById('editModal').addEventListener('click', e => { if (e.target === e.currentTarget) closeEdit(); });
// ==================== KEYBOARD SHORTCUTS ====================
@@ -1424,7 +1424,7 @@ document.addEventListener('keydown', function(e) {
}
// Arrow keys — navigate entries in vault
if ((e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'ArrowLeft' || e.key === 'ArrowRight') && !isInput && document.getElementById('authSection').classList.contains('hidden') && view !== 'detail' && !document.querySelector('.edit-modal.show,.modal-overlay.show')) {
if ((e.key === 'ArrowUp' || e.key === 'ArrowDown' || e.key === 'ArrowLeft' || e.key === 'ArrowRight') && !isInput && document.getElementById('authSection').classList.contains('hidden') && view !== 'detail' && !document.getElementById('addModal').classList.contains('show') && !document.getElementById('editModal').classList.contains('show')) {
e.preventDefault();
const filtered = getFilteredEntries();
if (!filtered.length) return;
@@ -1505,7 +1505,7 @@ document.addEventListener('keydown', function(e) {
if (e.ctrlKey && !e.shiftKey && !e.altKey && !e.metaKey && (e.key === 'a' || e.key === 'A') && !isInput && document.getElementById('authSection').classList.contains('hidden')) {
e.preventDefault();
getFilteredEntries(view === 'grouped').forEach(e => selectedIds.add(e.id));
getFilteredEntries(view === 'grouped' || view === 'detail').forEach(e => selectedIds.add(e.id));
updateBatchBar();
render();
playSound('click');