diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 17de04ebc..743640725 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -860,6 +860,7 @@ deleteAccount: "アカウント削除" document: "ドキュメント" numberOfPageCache: "ページキャッシュ数" numberOfPageCacheDescription: "多くすると利便性が向上しますが、負荷とメモリ使用量が増えます。" +logoutConfirm: "ログアウトしますか?" _emailUnavailable: used: "既に使用されています" diff --git a/packages/client/src/pages/settings/index.vue b/packages/client/src/pages/settings/index.vue index 011962c2e..8143298cc 100644 --- a/packages/client/src/pages/settings/index.vue +++ b/packages/client/src/pages/settings/index.vue @@ -32,6 +32,7 @@ import { unisonReload } from '@/scripts/unison-reload'; import { instance } from '@/instance'; import { useRouter } from '@/router'; import { definePageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata'; +import * as os from '@/os'; const props = withDefaults(defineProps<{ initialPage?: string; @@ -181,7 +182,12 @@ const menuDef = computed(() => [{ type: 'button', icon: 'fas fa-sign-in-alt fa-flip-horizontal', text: i18n.ts.logout, - action: () => { + action: async () => { + const { canceled } = await os.confirm({ + type: 'warning', + text: i18n.ts.logoutConfirm, + }); + if (canceled) return; signout(); }, danger: true,