refactor(client): typed localStorage

This commit is contained in:
syuilo
2023-01-07 10:13:02 +09:00
parent a42b03c154
commit 91503405b4
25 changed files with 157 additions and 88 deletions

View File

@@ -33,6 +33,7 @@ import { instance } from '@/instance';
import { useRouter } from '@/router';
import { definePageMetadata, provideMetadataReceiver, setPageMetadata } from '@/scripts/page-metadata';
import * as os from '@/os';
import { miLocalStorage } from '@/local-storage';
const indexInfo = {
title: i18n.ts.settings,
@@ -180,8 +181,8 @@ const menuDef = computed(() => [{
icon: 'ti ti-trash',
text: i18n.ts.clearCache,
action: () => {
localStorage.removeItem('locale');
localStorage.removeItem('theme');
miLocalStorage.removeItem('locale');
miLocalStorage.removeItem('theme');
unisonReload();
},
}, {