Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: add confirmation dialog for delete data option Signed-off-by: 01zulfi <[email protected]>

01zulfiafe57e41ce1c
diff --git a/apps/web/src/dialogs/settings/profile-settings.ts b/apps/web/src/dialogs/settings/profile-settings.ts
index 3cf13727a..830d17982 100644
--- a/apps/web/src/dialogs/settings/profile-settings.ts
+++ b/apps/web/src/dialogs/settings/profile-settings.ts
@@ -107,9 +107,17 @@ export const ProfileSettings: SettingsGroup[] = [
variant: "error",
title: strings.deleteData(),
action: async () => {
- Config.clear();
- await db.reset();
- window.location.reload();
+ const ok = await ConfirmDialog.show({
+ title: strings.deleteData(),
+ message: strings.deleteAccountDesc(),
+ positiveButtonText: strings.yes(),
+ negativeButtonText: strings.no()
+ });
+ if (ok) {
+ Config.clear();
+ await db.reset();
+ window.location.reload();
+ }
}
}
]