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
web: show correct toast when removing notes from topic
Abdullah Attae347922be9a9
diff --git a/apps/web/src/components/dialogs/move-note-dialog.tsx b/apps/web/src/components/dialogs/move-note-dialog.tsxindex 70cfb0d85..355db3621 100644--- a/apps/web/src/components/dialogs/move-note-dialog.tsx+++ b/apps/web/src/components/dialogs/move-note-dialog.tsx@@ -74,14 +74,28 @@ function MoveDialog({ onClose, noteIds }: MoveDialogProps) {}}notestore.refresh();- showToast(- "success",- `Added ${pluralize(noteIds.length, "note", "notes")} to ${pluralize(- selected.filter((a) => a.type === "add").length,- "topic",- "topics"- )}`- );+ const addedTopics = selected.filter((a) => a.type === "add").length;+ const removedTopics = selected.filter(+ (a) => a.type === "remove"+ ).length;+ if (addedTopics)+ showToast(+ "success",+ `Added ${pluralize(+ noteIds.length,+ "note",+ "notes"+ )} to ${pluralize(addedTopics, "topic", "topics")}`+ );+ if (removedTopics)+ showToast(+ "success",+ `Removed ${pluralize(+ noteIds.length,+ "note",+ "notes"+ )} from ${pluralize(removedTopics, "topic", "topics")}`+ );onClose(true);}}}