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