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
feat: add toast when trash is cleared
thecodrra91c263cbc0e
diff --git a/apps/web/src/views/trash.js b/apps/web/src/views/trash.jsindex 5f6ffa6eb..9856673df 100644--- a/apps/web/src/views/trash.js+++ b/apps/web/src/views/trash.js@@ -8,6 +8,7 @@ import { confirm } from "../components/dialogs/confirm";import { useStore, store } from "../stores/trash-store";import { toTitleCase } from "../utils/string";import TrashPlaceholder from "../components/placeholders/trash-placeholder";+import { showToast } from "../utils/toast";function menuItems(item, index) {return [@@ -69,10 +70,18 @@ function Trash() {confirm(Icon.Trash,"Clear",- `This action is irreversible. Are you sure you want to proceed?s`+ `This action is irreversible. Are you sure you want to proceed?`).then(async (res) => {if (res) {- await clearTrash();+ try {+ await clearTrash();+ showToast("success", "Trash cleared successfully!");+ } catch (e) {+ showToast(+ "error",+ `Could not clear trash. Error: ${e.message}`+ );+ }}});},