From eac02ed17caf83d60cf63d1ea2e680ff9abb9792 Mon Sep 17 00:00:00 2001 From: Zaki <18zaki18@gmail.com> Date: Sat, 9 May 2026 13:48:22 +0100 Subject: [PATCH] Replace batch mode toggle with click/Shift/Ctrl selection - Remove separate 'select mode' toggle and checkbox UI - Click any entry to select it (blue highlight border) - Shift+click for range selection between two entries - Ctrl/Cmd+click to toggle individual entries - Click entry background or press Escape to clear selection - Batch action bar appears automatically when items are selected - Selected entries get accent-color border and highlight - Single delEntry() cleans up selectedIds - Shortcut help updated with selection tips --- css/style.css | 3 +- index.html | 1 - js/app.js | 84 ++++++++++++++++++++++++--------------------------- 3 files changed, 42 insertions(+), 46 deletions(-) diff --git a/css/style.css b/css/style.css index 87cf5d1..3ade320 100644 --- a/css/style.css +++ b/css/style.css @@ -136,8 +136,9 @@ input:focus, select:focus { border-color:var(--accent); } #entriesContainer.table-view th { text-align:left; padding:0.4rem 0.6rem; color:var(--text2); font-size:0.75rem; border-bottom:1px solid var(--border); } #entriesContainer.table-view td { padding:0.4rem 0.6rem; font-size:0.8rem; border-bottom:1px solid rgba(255,255,255,0.03); } -.entry-card, .entry-row, .entry-compact, .table-row-drag { cursor:grab; user-select:none; } +.entry-card, .entry-row, .entry-compact, .table-row-drag { cursor:pointer; user-select:none; } .entry-card.drag-over, .entry-row.drag-over, .entry-compact.drag-over, .table-row-drag.drag-over { border-color:var(--accent)!important; box-shadow:0 0 15px rgba(59,130,246,0.3); } +.entry-card.selected, .entry-row.selected, .entry-compact.selected, .table-row-drag.selected { border-color:var(--accent)!important; box-shadow:0 0 0 2px var(--accent); background:rgba(59,130,246,0.08); } .entry-card { background:var(--card); border:1px solid var(--border); border-radius:0.8rem; padding:0.9rem 2.8rem 0.9rem 0.9rem; transition:0.2s; position:relative; word-break:break-word; } .entry-card:hover { border-color:rgba(255,255,255,0.15); transform:translateY(-2px); } .card-site { font-weight:700; font-size:0.9rem; color:var(--text); margin-bottom:0.2rem; } diff --git a/index.html b/index.html index f986e42..5cb64c5 100644 --- a/index.html +++ b/index.html @@ -155,7 +155,6 @@
| Site | ' + (showMail ? 'User | ' : '') + 'Password | ' + (!showTrash ? 'Folder | ' : 'Deleted | ') + 'Actions | |
|---|---|---|---|---|---|---|
| ' + (e.favorite ? 'â' : '') + ' | ' + 'đ ' + highlightText(e.site, searchQuery) + ' | ' + (showMail ? 'đ¤ ' + highlightText(e.username, searchQuery) + ' | ' : '') + @@ -665,7 +666,6 @@ function render() { if (!showTrash) { h += 'đ ' + esc(e.folder || 'All') + ' | ' + '' + - (selectMode ? `` : '') + ' ' + ' ' + ' ' + @@ -674,7 +674,6 @@ function render() { } else { h += ' | đī¸ ' + timeAgo(e.deleted_at) + ' | ' + '' + - (selectMode ? `` : '') + ' ' + '' + ' | '; @@ -695,10 +694,8 @@ function render() { } function gridC(e) { - let html = '