Skip to content

Commit

Permalink
enh(Tree): Add confirmation before deleting items
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr committed Nov 28, 2024
1 parent e4eba24 commit cb47926
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@
"LabelDeleteitem": {
"message": "Delete"
},
"DescriptionReallydeleteitem": {
"message": "Do you really want to delete this item?"
},
"LabelNobookmarks": {
"message": "No bookmarks here"
},
Expand Down
3 changes: 3 additions & 0 deletions src/ui/views/native/Tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,9 @@ export default {
}
},
deleteItem(item) {
if (!confirm(this.t('DescriptionReallydeleteitem'))) {
return
}
if (item.type === 'bookmark') {
this.$store.dispatch(actions.DELETE_BOOKMARK, {
accountId: this.id,
Expand Down

0 comments on commit cb47926

Please sign in to comment.