refactor client

This commit is contained in:
syuilo
2021-10-24 14:50:00 +09:00
parent 2b4d5b73b9
commit 652588abed
9 changed files with 16 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ import { computed, ref } from 'vue';
import { search } from '@client/scripts/search';
import * as os from '@client/os';
import { i18n } from '@client/i18n';
import { ui } from '@client/config';
import { $i } from './account';
import { unisonReload } from '@client/scripts/unison-reload';
import { router } from './router';
@@ -184,35 +185,40 @@ export const menuDef = {
action: (ev) => {
os.popupMenu([{
text: i18n.locale.default,
active: ui === 'default' || ui === null,
action: () => {
localStorage.setItem('ui', 'default');
unisonReload();
}
}, {
text: i18n.locale.deck,
active: ui === 'deck',
action: () => {
localStorage.setItem('ui', 'deck');
unisonReload();
}
}, {
text: 'pope',
text: i18n.locale.classic,
active: ui === 'classic',
action: () => {
localStorage.setItem('ui', 'pope');
localStorage.setItem('ui', 'classic');
unisonReload();
}
}, {
text: 'Chat (β)',
active: ui === 'chat',
action: () => {
localStorage.setItem('ui', 'chat');
unisonReload();
}
}, {
}, /*{
text: i18n.locale.desktop + ' (β)',
active: ui === 'desktop',
action: () => {
localStorage.setItem('ui', 'desktop');
unisonReload();
}
}], ev.currentTarget || ev.target);
}*/], ev.currentTarget || ev.target);
},
},
};