A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: don't show confirm dialog if delete note count is 1
thecodrr02a42661b02a
diff --git a/apps/web/src/common/multi-select.ts b/apps/web/src/common/multi-select.tsindex a364f768a..e737064d5 100644--- a/apps/web/src/common/multi-select.ts+++ b/apps/web/src/common/multi-select.ts@@ -8,9 +8,9 @@ import Vault from "./vault";import { showItemDeletedToast } from "./toasts";import { TaskManager } from "./task-manager";-async function moveNotesToTrash(notes: any[]) {+async function moveNotesToTrash(notes: any[], confirm = true) {const item = notes[0];- if (!(await showMultiDeleteConfirmation(notes.length))) return;+ if (confirm && !(await showMultiDeleteConfirmation(notes.length))) return;if (notes.length === 1) {if (diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.jsindex b1c96aecf..3ab58d6a6 100644--- a/apps/web/src/components/note/index.js+++ b/apps/web/src/components/note/index.js@@ -377,7 +377,7 @@ const menuItems = [items.length === 1 && db.monographs.isPublished(items[0].id),disableReason: "Please unpublish this note to move it to trash",onClick: async ({ items }) => {- await Multiselect.moveNotesToTrash(items);+ await Multiselect.moveNotesToTrash(items, items.length > 1);},multiSelect: true,},