mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 12:55:14 +00:00
enhance(client): show confirm dialog when logout
This commit is contained in:
parent
47dcb1b41f
commit
6f2d2a71f9
2 changed files with 8 additions and 1 deletions
|
@ -860,6 +860,7 @@ deleteAccount: "アカウント削除"
|
|||
document: "ドキュメント"
|
||||
numberOfPageCache: "ページキャッシュ数"
|
||||
numberOfPageCacheDescription: "多くすると利便性が向上しますが、負荷とメモリ使用量が増えます。"
|
||||
logoutConfirm: "ログアウトしますか?"
|
||||
|
||||
_emailUnavailable:
|
||||
used: "既に使用されています"
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue