Implement unison reload
This commit is contained in:
tamaina
2021-02-14 21:23:36 +09:00
parent cc9bc7703a
commit 412db316cc
12 changed files with 89 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ import { search } from '@/scripts/search';
import * as os from '@/os';
import { i18n } from '@/i18n';
import { $i } from './account';
import { unisonReload } from '@/scripts/unison-reload';
export const sidebarDef = {
notifications: {
@@ -133,19 +134,19 @@ export const sidebarDef = {
text: i18n.locale.default,
action: () => {
localStorage.setItem('ui', 'default');
location.reload();
unisonReload();
}
}, {
text: i18n.locale.deck,
action: () => {
localStorage.setItem('ui', 'deck');
location.reload();
unisonReload();
}
}, {
text: i18n.locale.desktop + ' (β)',
action: () => {
localStorage.setItem('ui', 'desktop');
location.reload();
unisonReload();
}
}], ev.currentTarget || ev.target);
},