Resurrect Service Worker (#7108)

* Resolve #7106

* fix lint

* fix lint

* save lang in idb

* fix lint

* fix

* cache locale file

* fix lint

* ✌️

* wip

* fix [wip]

* fix [wip]

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
tamaina
2021-02-06 18:55:53 +09:00
committed by GitHub
parent 9b3458fba0
commit 40bfa3ef04
12 changed files with 217 additions and 98 deletions

View File

@@ -57,6 +57,7 @@ import { fetchInstance, instance } from '@/instance';
import { makeHotkey } from './scripts/hotkey';
import { search } from './scripts/search';
import { getThemes } from './theme-store';
import { initializeSw } from './scripts/initialize-sw';
console.info(`Misskey v${version}`);
@@ -171,7 +172,7 @@ fetchInstance().then(() => {
localStorage.setItem('v', instance.version);
// Init service worker
//if (this.store.state.instance.meta.swPublickey) this.registerSw(this.store.state.instance.meta.swPublickey);
initializeSw();
});
stream.init($i);