1
0
forked from mirror/misskey

navbarにキャッシュクリア

This commit is contained in:
mattyatea 2023-09-25 02:07:30 +09:00
parent 9fe170a488
commit 235df532ef
2 changed files with 15 additions and 0 deletions

View File

@ -12,6 +12,7 @@ import * as os from '@/os.js';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';
import { ui } from '@/config.js'; import { ui } from '@/config.js';
import { unisonReload } from '@/scripts/unison-reload.js'; import { unisonReload } from '@/scripts/unison-reload.js';
import {fetchCustomEmojis} from "@/custom-emojis.js";
export const navbarItemDef = reactive({ export const navbarItemDef = reactive({
notifications: { notifications: {
@ -155,4 +156,17 @@ export const navbarItemDef = reactive({
show: computed(() => $i != null), show: computed(() => $i != null),
to: `/@${$i?.username}`, 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();
}
},
}); });

View File

@ -133,6 +133,7 @@ export const defaultStore = markRaw(new Storage('base', {
'search', 'search',
'-', '-',
'ui', 'ui',
'cacheclear',
], ],
}, },
visibility: { visibility: {