Implement in-unison reload (#7196)

* Resolve #6804
Implement unison reload

* ✌️

* fix

* Update share.vue

fix

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
tamaina
2021-02-17 21:36:56 +09:00
committed by GitHub
parent 9bc0110b86
commit 126826eb5a
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,13 +134,13 @@ 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: 'Chat (β)',
@@ -151,7 +152,7 @@ export const sidebarDef = {
text: i18n.locale.desktop + ' (β)',
action: () => {
localStorage.setItem('ui', 'desktop');
location.reload();
unisonReload();
}
}], ev.currentTarget || ev.target);
},