navbarにキャッシュクリア
This commit is contained in:
parent
9fe170a488
commit
235df532ef
|
@ -12,6 +12,7 @@ import * as os from '@/os.js';
|
|||
import { i18n } from '@/i18n.js';
|
||||
import { ui } from '@/config.js';
|
||||
import { unisonReload } from '@/scripts/unison-reload.js';
|
||||
import {fetchCustomEmojis} from "@/custom-emojis.js";
|
||||
|
||||
export const navbarItemDef = reactive({
|
||||
notifications: {
|
||||
|
@ -155,4 +156,17 @@ export const navbarItemDef = reactive({
|
|||
show: computed(() => $i != null),
|
||||
to: `/@${$i?.username}`,
|
||||
},
|
||||
cacheclear: {
|
||||
icon: 'ti ti-trash',
|
||||
title: i18n.ts.clearCache,
|
||||
action: async () => {
|
||||
os.waiting();
|
||||
miLocalStorage.removeItem('locale');
|
||||
miLocalStorage.removeItem('theme');
|
||||
miLocalStorage.removeItem('emojis');
|
||||
miLocalStorage.removeItem('lastEmojisFetchedAt');
|
||||
await fetchCustomEmojis(true);
|
||||
unisonReload();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
@ -133,6 +133,7 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
'search',
|
||||
'-',
|
||||
'ui',
|
||||
'cacheclear',
|
||||
],
|
||||
},
|
||||
visibility: {
|
||||
|
|
Loading…
Reference in New Issue