Add undo to drag-drop trash. Fix toast undo button visibility (darker bg, border, max-width).

This commit is contained in:
2026-05-12 19:46:01 +01:00
parent ff9802e685
commit 73818e4e2e
2 changed files with 8 additions and 5 deletions
+5 -2
View File
@@ -1326,10 +1326,13 @@ if (token && curUser) {
if (!id) return;
const ids = selectedIds.has(id) && selectedIds.size > 1 ? [...selectedIds] : [id];
for (const sid of ids) await delEntry(sid, true);
toast('📦 Moved ' + ids.length + ' entries to trash');
playSound('delete');
clearSelection();
await loadEntries();
toast('📦 Moved ' + ids.length + ' entries to trash', 'success', {
label: '↩ Undo',
cb: async () => { for (const sid of ids) await restoreEntry(sid, true); await loadEntries(); toast('↩ Restored ' + ids.length + ' entries'); playSound('success'); }
});
playSound('delete');
});
}
})();