feat: 后台语言包合并默认中文、日夜主题切换、官方侧栏收缩、追溯码分组与批量

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Nixevol
2026-06-28 18:37:57 +08:00
co-authored by Cursor
parent 6578007c9e
commit b5170fe84b
21 changed files with 873 additions and 666 deletions
+21
View File
@@ -0,0 +1,21 @@
import { computed, ref } from 'vue';
export type ThemeMode = 'light' | 'dark' | 'auto';
const KEY = 'artveris_theme';
const media = window.matchMedia('(prefers-color-scheme: dark)');
const systemDark = ref(media.matches);
media.addEventListener('change', (e) => (systemDark.value = e.matches));
const mode = ref<ThemeMode>((localStorage.getItem(KEY) as ThemeMode) || 'light');
const isDark = computed(() => mode.value === 'dark' || (mode.value === 'auto' && systemDark.value));
function setMode(m: ThemeMode): void {
mode.value = m;
localStorage.setItem(KEY, m);
}
export function useTheme() {
return { mode, isDark, setMode };
}