From bf9ac5636c0dd5c3fd82e8c7ef79e5ea26bbadf5 Mon Sep 17 00:00:00 2001 From: Jacobtread <33708767+jacobtread@users.noreply.github.com> Date: Wed, 1 May 2024 20:40:26 +1200 Subject: [PATCH] Feature prompt before delete (#48) * fix: file rename bug * feat: prompt user before deleting --- src/tracker.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tracker.ts b/src/tracker.ts index 6596a27..54bbb2f 100644 --- a/src/tracker.ts +++ b/src/tracker.ts @@ -363,6 +363,9 @@ function addEditableTableRow(tracker: Tracker, entry: Entry, table: HTMLTableEle .setIcon("lucide-trash") .setDisabled(entryRunning) .onClick(async () => { + if (!confirm("Are you sure you want to delete this entry?")) { + return; + } removeEntry(tracker.entries, entry); await saveTracker(tracker, this.app, getFile(), getSectionInfo()); });