Skip to content

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

web: remove security key config on app lock disable

Abdullah Attaa042f6d41871
diff --git a/apps/web/src/dialogs/settings/app-lock-settings.tsx b/apps/web/src/dialogs/settings/app-lock-settings.tsx
index cabc78b1e..42eaa4bfa 100644
--- a/apps/web/src/dialogs/settings/app-lock-settings.tsx
+++ b/apps/web/src/dialogs/settings/app-lock-settings.tsx
@@ -77,9 +77,14 @@ export const AppLockSettings: SettingsGroup[] = [
}
});
if (result)
- useSettingStore.getState().setAppLockSettings({
- enabled: !isEnabled
- });
+ useSettingStore.getState().setAppLockSettings(
+ isEnabled
+ ? {
+ enabled: false,
+ securityKey: undefined
+ }
+ : { enabled: true }
+ );
},
isToggled: () => useSettingStore.getState().appLockSettings.enabled
}