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 for note export
thecodrrefa30824b812
diff --git a/apps/web/src/components/dialogs/exportdialog.js b/apps/web/src/components/dialogs/exportdialog.jsindex 58915a911..adaa5bfaf 100644--- a/apps/web/src/components/dialogs/exportdialog.js+++ b/apps/web/src/components/dialogs/exportdialog.js@@ -2,6 +2,7 @@ import React from "react";import { Flex, Button, Text, Box } from "rebass";import { db } from "../../common";import download from "../../utils/download";+import { showToast } from "../../utils/toast";import * as Icon from "../icons";import Dialog, { showDialog } from "./dialog";@@ -47,15 +48,17 @@ function ExportDialog(props) {);}-export function showExportDialog(note) {+export function showExportDialog(noteId) {return showDialog((perform) => (<ExportDialogtitle={"Export Note"}icon={Icon.Export}onClose={() => perform(false)}exportNote={async (format) => {- const content = await db.notes.note(note.id).export(format);+ const note = db.notes.note(noteId);+ const content = await note.export(format);download(note.title, content, format);+ showToast("success", `Note exported as ${format} successfully!`);perform(true);}}/>