wip: refactor(client): migrate components to composition api

Fix #8155
This commit is contained in:
syuilo
2022-01-18 21:30:17 +09:00
parent 9885c6ba6c
commit 7588397fb8
3 changed files with 57 additions and 93 deletions

View File

@ -16,6 +16,8 @@ const data = localStorage.getItem('account');
// TODO: 外部からはreadonlyに
export const $i = data ? reactive(JSON.parse(data) as Account) : null;
export const iAmModerator = $i != null && ($i.isAdmin || $i.isModerator);
export async function signout() {
waiting();
localStorage.removeItem('account');
@ -197,10 +199,3 @@ export async function openAccountMenu(ev: MouseEvent) {
align: 'left'
});
}
// このファイルに書きたくないけどここに書かないと何故かVeturが認識しない
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$i: typeof $i;
}
}