Resolve #7106
This commit is contained in:
parent
3762cdc8c0
commit
08c2086167
9 changed files with 150 additions and 67 deletions
|
|
@ -33,9 +33,8 @@
|
|||
}
|
||||
|
||||
const res = await fetch(`/assets/locales/${lang}.${v}.json`);
|
||||
const json = await res.json();
|
||||
localStorage.setItem('lang', lang);
|
||||
localStorage.setItem('locale', JSON.stringify(json));
|
||||
localStorage.setItem('locale', await res.text());
|
||||
}
|
||||
//#endregion
|
||||
|
||||
|
|
@ -73,6 +72,10 @@
|
|||
head.appendChild(script);
|
||||
//#endregion
|
||||
|
||||
//#region Service Worker
|
||||
navigator.serviceWorker.register(`/sw.${v}.js`)
|
||||
//#endregion
|
||||
|
||||
//#region Theme
|
||||
const theme = localStorage.getItem('theme');
|
||||
if (theme) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue