From ea41cc6ec0f7b79fc753d37b4586abfef87bf23f Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 4 Jan 2024 15:30:40 +0900 Subject: refactor(frontend): reduce type errors --- packages/frontend/src/pages/settings/2fa.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'packages/frontend/src/pages/settings/2fa.vue') diff --git a/packages/frontend/src/pages/settings/2fa.vue b/packages/frontend/src/pages/settings/2fa.vue index 4c165ef4ee..35331738fd 100644 --- a/packages/frontend/src/pages/settings/2fa.vue +++ b/packages/frontend/src/pages/settings/2fa.vue @@ -80,9 +80,11 @@ import MkSwitch from '@/components/MkSwitch.vue'; import FormSection from '@/components/form/section.vue'; import MkFolder from '@/components/MkFolder.vue'; import * as os from '@/os.js'; -import { $i } from '@/account.js'; +import { signinRequired } from '@/account.js'; import { i18n } from '@/i18n.js'; +const $i = signinRequired(); + // メモ: 各エンドポイントはmeUpdatedを発行するため、refreshAccountは不要 withDefaults(defineProps<{ @@ -91,7 +93,7 @@ withDefaults(defineProps<{ first: false, }); -const usePasswordLessLogin = computed(() => $i?.usePasswordLessLogin ?? false); +const usePasswordLessLogin = computed(() => $i.usePasswordLessLogin ?? false); async function registerTOTP(): Promise { const auth = await os.authenticateDialog(); -- cgit v1.2.3-freya