summaryrefslogtreecommitdiff
path: root/src/client/init.ts
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2021-08-20 19:38:16 +0900
committerGitHub <noreply@github.com>2021-08-20 19:38:16 +0900
commitfc56b1269084f4556e2a03f6dd3ffd893a5e0063 (patch)
treea12164680b0517457550595816862eeeabf6ec84 /src/client/init.ts
parentCreate dependabot.yml (diff)
downloadmisskey-fc56b1269084f4556e2a03f6dd3ffd893a5e0063.tar.gz
misskey-fc56b1269084f4556e2a03f6dd3ffd893a5e0063.tar.bz2
misskey-fc56b1269084f4556e2a03f6dd3ffd893a5e0063.zip
refactor: localStorageのaccountsはindexedDBで保持するように (#7609)
* accountsストアはindexedDBで保持するように * fix lint * fix indexeddb available detection * remove debugging code * fix lint * resolve https://github.com/misskey-dev/misskey/pull/7609/files/ba756204b77ce6e1189b8443e9641f2d02119621#diff-f565878e8202f0037b830c780b7c0932dc1bb5fd3d05ede14d72d10efbc3740c Firefoxでの動作を改善 * fix lint * fix lint * add changelog
Diffstat (limited to 'src/client/init.ts')
-rw-r--r--src/client/init.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/init.ts b/src/client/init.ts
index 1580ef3e08..0313af4374 100644
--- a/src/client/init.ts
+++ b/src/client/init.ts
@@ -4,6 +4,15 @@
import '@client/style.scss';
+//#region account indexedDB migration
+import { set } from '@client/scripts/idb-proxy';
+
+if (localStorage.getItem('accounts') != null) {
+ set('accounts', JSON.parse(localStorage.getItem('accounts')));
+ localStorage.removeItem('accounts');
+}
+//#endregion
+
import * as Sentry from '@sentry/browser';
import { Integrations } from '@sentry/tracing';
import { computed, createApp, watch, markRaw } from 'vue';