1
0

fix(frontend): 自動バックアップが設定されていない環境では設定が消滅する旨の警告を出すように (#15802)

* fix(frontend): 自動バックアップが設定されていない環境ではローカルの設定を削除しないように

* Update Changelog

* fix lint

* fix: 警告を出すだけのみにする

* fix

* apply suggestion
This commit is contained in:
かっこかり
2025-04-13 16:59:01 +09:00
committed by GitHub
parent 8edf1bc208
commit f7195d54d0
5 changed files with 14 additions and 5 deletions
+6 -4
View File
@@ -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);