mirror of
https://github.com/Ellpeck/ObsidianSimpleTimeTracker.git
synced 2024-11-24 18:18:34 +01:00
Feature prompt before delete (#48)
* fix: file rename bug * feat: prompt user before deleting
This commit is contained in:
parent
6823de48a0
commit
bf9ac5636c
1 changed files with 3 additions and 0 deletions
|
@ -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());
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue