fix(frontend): 自動バックアップが設定されていない環境では設定が消滅する旨の警告を出すように (#15802)
* fix(frontend): 自動バックアップが設定されていない環境ではローカルの設定を削除しないように * Update Changelog * fix lint * fix: 警告を出すだけのみにする * fix * apply suggestion
This commit is contained in:
parent
8edf1bc208
commit
f7195d54d0
|
@ -5,6 +5,7 @@
|
|||
|
||||
### Client
|
||||
- Fix: ログアウトした際に処理が終了しない問題を修正
|
||||
- Fix: 自動バックアップが設定されている環境でログアウト直前に設定をバックアップするように
|
||||
|
||||
### Server
|
||||
- Fix: システムアカウントの名前がサーバー名と同期されない問題を修正
|
||||
|
|
|
@ -3934,6 +3934,10 @@ export interface Locale extends ILocale {
|
|||
* ログアウトしますか?
|
||||
*/
|
||||
"logoutConfirm": string;
|
||||
/**
|
||||
* ログアウトするとクライアントの設定情報がブラウザから消去されます。再ログイン時に設定情報を復元できるようにするためには、設定の自動バックアップを有効にしてください。
|
||||
*/
|
||||
"logoutWillClearClientData": string;
|
||||
/**
|
||||
* 最終利用日時
|
||||
*/
|
||||
|
|
|
@ -979,6 +979,7 @@ document: "ドキュメント"
|
|||
numberOfPageCache: "ページキャッシュ数"
|
||||
numberOfPageCacheDescription: "多くすると利便性が向上しますが、負荷とメモリ使用量が増えます。"
|
||||
logoutConfirm: "ログアウトしますか?"
|
||||
logoutWillClearClientData: "ログアウトするとクライアントの設定情報がブラウザから消去されます。再ログイン時に設定情報を復元できるようにするためには、設定の自動バックアップを有効にしてください。"
|
||||
lastActiveDate: "最終利用日時"
|
||||
statusbar: "ステータスバー"
|
||||
pleaseSelect: "選択してください"
|
||||
|
|
|
@ -177,7 +177,8 @@ const menuDef = computed<SuperMenuDef[]>(() => [{
|
|||
action: async () => {
|
||||
const { canceled } = await os.confirm({
|
||||
type: 'warning',
|
||||
text: i18n.ts.logoutConfirm,
|
||||
title: i18n.ts.logoutConfirm,
|
||||
text: i18n.ts.logoutWillClearClientData,
|
||||
});
|
||||
if (canceled) return;
|
||||
signout();
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
*/
|
||||
|
||||
import { apiUrl } from '@@/js/config.js';
|
||||
import { defaultMemoryStorage } from '@/memory-storage';
|
||||
import { cloudBackup } from '@/preferences/utility.js';
|
||||
import { store } from '@/store.js';
|
||||
import { waiting } from '@/os.js';
|
||||
import { unisonReload } from '@/utility/unison-reload.js';
|
||||
import { clear } from '@/utility/idb-proxy.js';
|
||||
|
@ -13,12 +14,13 @@ import { $i } from '@/i.js';
|
|||
export async function signout() {
|
||||
if (!$i) return;
|
||||
|
||||
// TODO: preferの自動バックアップがオンの場合、いろいろ消す前に強制バックアップ
|
||||
|
||||
waiting();
|
||||
|
||||
if (store.s.enablePreferencesAutoCloudBackup) {
|
||||
await cloudBackup();
|
||||
}
|
||||
|
||||
localStorage.clear();
|
||||
defaultMemoryStorage.clear();
|
||||
|
||||
const idbAbortController = new AbortController();
|
||||
const timeout = window.setTimeout(() => idbAbortController.abort(), 5000);
|
||||
|
|
Loading…
Reference in New Issue