Theme: neutral dark gray, higher card contrast. Detail view: folder filtering works. Modals: arrow nav blocked when modal open, Enter saves from anywhere inside modal.
This commit is contained in:
@@ -721,7 +721,7 @@ function render() {
|
||||
} else if (view === 'grouped') {
|
||||
c.innerHTML = groupedC(getFilteredEntries(true));
|
||||
} else if (view === 'detail') {
|
||||
c.innerHTML = detailC(getFilteredEntries(true));
|
||||
c.innerHTML = detailC(getFilteredEntries());
|
||||
} else {
|
||||
c.innerHTML = filtered.map(e => {
|
||||
if (view === 'grid' || view === 'card') return gridC(e);
|
||||
@@ -881,7 +881,7 @@ function detailC(list) {
|
||||
}
|
||||
|
||||
function goDetail(dir) {
|
||||
const list = getFilteredEntries(true);
|
||||
const list = getFilteredEntries();
|
||||
detailIndex += dir;
|
||||
if (detailIndex < 0) detailIndex = list.length - 1;
|
||||
if (detailIndex >= list.length) detailIndex = 0;
|
||||
@@ -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('.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.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.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') {
|
||||
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')) {
|
||||
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' || view === 'detail').forEach(e => selectedIds.add(e.id));
|
||||
getFilteredEntries(view === 'grouped').forEach(e => selectedIds.add(e.id));
|
||||
updateBatchBar();
|
||||
render();
|
||||
playSound('click');
|
||||
|
||||
Reference in New Issue
Block a user