fix code quality issues
This commit is contained in:
parent
52cee46ef6
commit
86405fc0bd
|
@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { inject, onBeforeUnmount, provide, ref, shallowRef, computed, nextTick } from 'vue';
|
||||
import { IRouter, Resolved, RouteDef } from '@/nirax.js';
|
||||
import { IRouter, Resolved } from '@/nirax.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { globalEvents } from '@/events.js';
|
||||
import MkLoadingPage from '@/pages/_loading_.vue';
|
||||
|
@ -76,7 +76,7 @@ router.addListener('change', onChange);
|
|||
|
||||
/**
|
||||
* キャッシュクリアが有効になったら、全キャッシュをクリアする
|
||||
*
|
||||
*
|
||||
* keepAlive側にwatcherがあるのですぐ消えるとはおもうけど、念のためページ遷移完了まではキャッシュを無効化しておく。
|
||||
* キャッシュ有効時向けにexcludeを使いたい場合は、pageCacheControllerに並列に突っ込むのではなく、下に追記すること
|
||||
*/
|
||||
|
|
|
@ -18,9 +18,9 @@ export async function getTheme(mode: 'light' | 'dark', getName = false): Promise
|
|||
|
||||
if (theme.base) {
|
||||
const base = [lightTheme, darkTheme].find(x => x.id === theme.base);
|
||||
if (base && base.codeHighlighter) theme.codeHighlighter = Object.assign({}, base.codeHighlighter, theme.codeHighlighter);
|
||||
if (base?.codeHighlighter) theme.codeHighlighter = { ...base.codeHighlighter, ...theme.codeHighlighter };
|
||||
}
|
||||
|
||||
|
||||
if (theme.codeHighlighter) {
|
||||
let _res: ThemeRegistration = {};
|
||||
if (theme.codeHighlighter.base === '_none_') {
|
||||
|
@ -55,7 +55,7 @@ export async function getHighlighter(): Promise<Highlighter> {
|
|||
|
||||
export async function initHighlighter() {
|
||||
const aiScriptGrammar = await import('aiscript-vscode/aiscript/syntaxes/aiscript.tmLanguage.json');
|
||||
|
||||
|
||||
await loadWasm(import('shiki/onig.wasm?init'));
|
||||
|
||||
// テーマの重複を消す
|
||||
|
|
Loading…
Reference in New Issue