Fix dblclick: clear selection, select entry, render, open edit. closeEdit calls render. Trash FAB: moved from toolbar to floating button at bottom-left (like add FAB).

This commit is contained in:
2026-05-12 15:14:39 +01:00
parent d55be5f19e
commit 5836bd168d
5 changed files with 9 additions and 5 deletions
+4 -3
View File
@@ -291,7 +291,7 @@ function toggleTrash() {
showTrash = !showTrash;
const btn = document.getElementById('trashBtn');
const actions = document.getElementById('trashActions');
if (btn) { btn.textContent = showTrash ? '📋 Active' : '🗑️ Trash'; btn.classList.toggle('btn-danger', showTrash); }
if (btn) { btn.textContent = showTrash ? '📋' : '🗑️'; btn.classList.toggle('active', showTrash); btn.title = showTrash ? 'Active entries' : 'Trash'; }
if (actions) actions.classList.toggle('hidden', !showTrash);
loadEntries();
playSound('click');
@@ -1000,10 +1000,11 @@ function attachEvents() {
el.addEventListener('dblclick', function(ev) {
const id = this.dataset.id;
if (id && !showTrash) {
ev.stopPropagation();
ev.preventDefault();
selectedIds.clear();
selectedIds.add(parseInt(id));
updateBatchBar();
render();
openEdit(id);
}
});
@@ -1056,7 +1057,7 @@ function openEdit(id) {
document.getElementById('editSite').focus();
playSound('open');
}
function closeEdit() { document.getElementById('editModal').classList.remove('show'); playSound('close'); }
function closeEdit() { document.getElementById('editModal').classList.remove('show'); render(); playSound('close'); }
function toggleEditPassword() { const f = document.getElementById('editPassword'); f.type = f.type === 'password' ? 'text' : 'password'; }
async function saveEdit() {
const id = document.getElementById('editId').value;