mirror of
https://github.com/paricafe/misskey.git
synced 2025-04-01 09:09:29 -05:00
enhance(frontend): clear all client data when logout
This commit is contained in:
parent
bcb891e4fd
commit
833a232262
3 changed files with 12 additions and 12 deletions
|
@ -9,6 +9,7 @@
|
|||
- 任意の設定項目をデバイス間で同期できるように(実験的)
|
||||
- Enhance: プラグインの管理が強化されました
|
||||
- インストール/アンインストール/設定の変更時にリロード不要になりました
|
||||
- Enhance: ログアウト時、ブラウザに保存されたWebクライアントのデータを全て消去するように
|
||||
- Enhance: CWの注釈テキストが入力されていない場合, Postボタンを非アクティブに
|
||||
- Enhance: CWを無効にした場合, 注釈テキストが最大入力文字数を超えていても投稿できるように
|
||||
- Enhance: テーマ設定画面のデザインを改善
|
||||
|
|
|
@ -17,8 +17,6 @@ import { store } from '@/store.js';
|
|||
import { $i } from '@/i.js';
|
||||
import { signout } from '@/signout.js';
|
||||
|
||||
// TODO: 他のタブと永続化されたstateを同期
|
||||
|
||||
type AccountWithToken = Misskey.entities.MeDetailed & { token: string };
|
||||
|
||||
export async function getAccounts(): Promise<{
|
||||
|
|
|
@ -3,26 +3,27 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { defineAsyncComponent, ref } from 'vue';
|
||||
import { apiUrl, host } from '@@/js/config.js';
|
||||
import { apiUrl } from '@@/js/config.js';
|
||||
import { defaultMemoryStorage } from '@/memory-storage';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import { waiting, popup, popupMenu, success, alert } from '@/os.js';
|
||||
import { waiting } from '@/os.js';
|
||||
import { unisonReload, reloadChannel } from '@/utility/unison-reload.js';
|
||||
import { prefer } from '@/preferences.js';
|
||||
import { store } from '@/store.js';
|
||||
import { $i } from '@/i.js';
|
||||
|
||||
export async function signout() {
|
||||
if (!$i) return;
|
||||
|
||||
defaultMemoryStorage.clear();
|
||||
// TODO: preferの自動バックアップがオンの場合、いろいろ消す前に強制バックアップ
|
||||
|
||||
waiting();
|
||||
miLocalStorage.removeItem('account');
|
||||
|
||||
// TODO: preferencesも削除
|
||||
localStorage.clear();
|
||||
defaultMemoryStorage.clear();
|
||||
|
||||
const idbPromises = ['MisskeyClient', 'keyval-store'].map((name, i, arr) => new Promise((res, rej) => {
|
||||
indexedDB.deleteDatabase(name);
|
||||
}));
|
||||
|
||||
await Promise.all(idbPromises);
|
||||
|
||||
//#region Remove service worker registration
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue