From f00bb2cdebe7da0fe2f8148487723f75d056d182 Mon Sep 17 00:00:00 2001 From: Zaki <18zaki18@gmail.com> Date: Sat, 9 May 2026 21:08:51 +0100 Subject: [PATCH] Add double-click on entry to open edit modal Double-click any entry card/row (all views incl. detail) opens the edit modal. Excluded from trash view. --- js/app.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 89a3071..c0780a8 100644 --- a/js/app.js +++ b/js/app.js @@ -846,7 +846,7 @@ function detailC(list) { html += '' + (detailIndex + 1) + ' of ' + list.length + ''; html += ''; html += ''; - html += '
'; + html += '
'; html += '
Site🌐 ' + highlightText(e.site, searchQuery) + '
'; if (showMail) html += '
Username👤 ' + highlightText(e.username, searchQuery) + '
'; if (!showTrash) { @@ -984,7 +984,13 @@ function attachEvents() { document.querySelectorAll('.edit-btn').forEach(b => b.onclick = function(ev) { ev.stopPropagation(); openEdit(this.dataset.id); }); document.querySelectorAll('.star-btn').forEach(b => b.onclick = function(ev) { ev.stopPropagation(); toggleFavorite(this.dataset.id); }); document.querySelectorAll('.copy-p').forEach(b => b.onclick = async function(ev) { ev.stopPropagation(); const pw = entryPw(this.dataset.id); try { await navigator.clipboard.writeText(pw); this.textContent = '✓'; const btn = this; setTimeout(() => { btn.textContent = '📋'; }, 1000); showZigzagToast(this, '📋 Copied!', 'success'); playSound('copy'); } catch (e) { showZigzagToast(this, 'Failed', 'error'); } }); - // Password reveal on hover + // Double-click entry to edit + document.querySelectorAll('[draggable="true"], .detail-card').forEach(el => { + el.addEventListener('dblclick', function(ev) { + const id = this.dataset.id; + if (id && !showTrash) { ev.stopPropagation(); openEdit(id); } + }); + }); if (showView) { document.querySelectorAll('.pw-display.pw-hover').forEach(el => { el.addEventListener('mouseenter', function() {