Compare commits

...

1 Commits

Author SHA1 Message Date
01zulfi
5f0b961c93 web: add toasts in email verification dialog
Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
2026-03-26 13:27:10 +05:00
4 changed files with 13 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ import { useSessionState } from "../hooks/use-session-state";
import Accordion from "../components/accordion";
import { BaseDialogProps, DialogManager } from "../common/dialog-manager";
import { strings } from "@notesnook/intl";
import { showToast } from "../utils/toast";
let interval = 0;
type EmailVerificationDialogProps = BaseDialogProps<boolean>;
@@ -76,8 +77,10 @@ export const EmailVerificationDialog = DialogManager.register(
try {
await db.user.sendVerificationEmail();
setCanSendAgain(false);
showToast("success", strings.confirmationEmailSent());
} catch (e) {
console.error(e);
showToast("error", strings.somethingWentWrong());
} finally {
setIsSending(false);
}

View File

@@ -1765,6 +1765,10 @@ msgstr "Confirm password"
msgid "Confirm pin"
msgstr "Confirm pin"
#: src/strings.ts:2639
msgid "Confirmation email sent"
msgstr "Confirmation email sent"
#: src/strings.ts:2080
msgid "Congratulations!"
msgstr "Congratulations!"

View File

@@ -1754,6 +1754,10 @@ msgstr ""
msgid "Confirm pin"
msgstr ""
#: src/strings.ts:2639
msgid "Confirmation email sent"
msgstr ""
#: src/strings.ts:2080
msgid "Congratulations!"
msgstr ""

View File

@@ -2635,5 +2635,6 @@ Use this if changes from other devices are not appearing on this device. This wi
noContent: () => t`This note is empty`,
deleteData: () => t`Delete data`,
failedToAttachFile: () => t`Failed to attach file`,
unlockNoteToMergeConflicts: () => t`Unlock note to merge conflicts`
unlockNoteToMergeConflicts: () => t`Unlock note to merge conflicts`,
confirmationEmailSent: () => t`Confirmation email sent`
};