diff options
author | Sebastian <sebasjm@gmail.com> | 2023-11-18 09:55:23 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-11-18 09:55:23 -0300 |
commit | 7ed3e78f790837479fc2bb2eb6ddc40c78ce59b5 (patch) | |
tree | d914627537315e15240034fed441239448dfff07 /packages/aml-backoffice-ui/src/hooks/useSettings.ts | |
parent | c797d551d9716924120d6ce6f270793c7bb5a4f9 (diff) | |
download | wallet-core-7ed3e78f790837479fc2bb2eb6ddc40c78ce59b5.tar.xz |
sync page with history
Diffstat (limited to 'packages/aml-backoffice-ui/src/hooks/useSettings.ts')
-rw-r--r-- | packages/aml-backoffice-ui/src/hooks/useSettings.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/aml-backoffice-ui/src/hooks/useSettings.ts b/packages/aml-backoffice-ui/src/hooks/useSettings.ts index 52f6f1614..f1610576e 100644 --- a/packages/aml-backoffice-ui/src/hooks/useSettings.ts +++ b/packages/aml-backoffice-ui/src/hooks/useSettings.ts @@ -27,25 +27,29 @@ import { buildStorageKey, useLocalStorage, useTranslationContext } from "@gnu-ta interface Settings { allowInsecurePassword: boolean; + keepSessionAfterReload: boolean; } export function getAllBooleanSettings(): Array<keyof Settings> { - return ["allowInsecurePassword"] + return ["allowInsecurePassword", "keepSessionAfterReload"] } export function getLabelForSetting(k: keyof Settings, i18n: ReturnType<typeof useTranslationContext>["i18n"]): TranslatedString { switch (k) { case "allowInsecurePassword": return i18n.str`Allow Insecure password` + case "keepSessionAfterReload": return i18n.str`Keep session after reload` } } export const codecForSettings = (): Codec<Settings> => buildCodecForObject<Settings>() - .property("allowInsecurePassword", (codecForBoolean())) - .build("Settings"); + .property("allowInsecurePassword", (codecForBoolean())) + .property("keepSessionAfterReload", (codecForBoolean())) + .build("Settings"); const defaultSettings: Settings = { allowInsecurePassword: false, + keepSessionAfterReload: false, }; const EXCHANGE_SETTINGS_KEY = buildStorageKey( |