1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-12 13:48:28 +09:00

feat: devモードの時のみナビゲーションバーからキャッシュクリアができるように

This commit is contained in:
yukineko 2023-11-27 18:24:06 +09:00
parent 4395f4059b
commit 4d646c667f
No known key found for this signature in database
GPG Key ID: E5BACB72109B7B90

View File

@ -12,8 +12,9 @@ import * as os from '@/os.js';
import { i18n } from '@/i18n.js';
import { ui } from '@/config.js';
import { unisonReload } from '@/scripts/unison-reload.js';
import { clearCache } from './scripts/clear-cache.js';
export const navbarItemDef = reactive({
export const navbarItemDef = reactive(Object.assign({
notifications: {
title: i18n.ts.notifications,
icon: 'ti ti-bell',
@ -171,4 +172,12 @@ export const navbarItemDef = reactive({
show: computed(() => $i != null),
to: `/@${$i?.username}`,
},
});
}, _DEV_ ? {
cacheClear: {
title: i18n.ts.cacheClear,
icon: 'ti ti-trash',
action: (ev) => {
clearCache();
},
},
} : {}));