mirror of
https://github.com/fmhy/edit.git
synced 2026-01-12 23:11:06 +11:00
swarm + catppuccin maybe?
This commit is contained in:
parent
e8a9e4efd9
commit
ff6e7092dd
1 changed files with 5 additions and 5 deletions
|
|
@ -25,9 +25,9 @@ const STORAGE_KEY_THEME_DATA = 'vitepress-theme-data'
|
||||||
|
|
||||||
export class ThemeHandler {
|
export class ThemeHandler {
|
||||||
private state = ref<ThemeState>({
|
private state = ref<ThemeState>({
|
||||||
currentTheme: 'christmas',
|
currentTheme: 'catppuccin',
|
||||||
currentMode: 'light' as DisplayMode,
|
currentMode: 'light' as DisplayMode,
|
||||||
theme: themeRegistry.christmas
|
theme: themeRegistry.catppuccin
|
||||||
})
|
})
|
||||||
private amoledEnabled = ref(false)
|
private amoledEnabled = ref(false)
|
||||||
|
|
||||||
|
|
@ -39,7 +39,7 @@ export class ThemeHandler {
|
||||||
if (typeof window === 'undefined') return
|
if (typeof window === 'undefined') return
|
||||||
|
|
||||||
// Load saved preferences
|
// Load saved preferences
|
||||||
const savedTheme = localStorage.getItem(STORAGE_KEY_THEME) || 'christmas'
|
const savedTheme = localStorage.getItem(STORAGE_KEY_THEME) || 'swarm'
|
||||||
const savedMode = localStorage.getItem(STORAGE_KEY_MODE) as DisplayMode | null
|
const savedMode = localStorage.getItem(STORAGE_KEY_MODE) as DisplayMode | null
|
||||||
const savedAmoled = localStorage.getItem(STORAGE_KEY_AMOLED) === 'true'
|
const savedAmoled = localStorage.getItem(STORAGE_KEY_AMOLED) === 'true'
|
||||||
|
|
||||||
|
|
@ -263,8 +263,8 @@ export class ThemeHandler {
|
||||||
|
|
||||||
public setTheme(themeName: string) {
|
public setTheme(themeName: string) {
|
||||||
if (!themeRegistry[themeName]) {
|
if (!themeRegistry[themeName]) {
|
||||||
console.warn(`Theme "${themeName}" not found. Using christmas theme.`)
|
console.warn(`Theme "${themeName}" not found. Using catppuccin theme.`)
|
||||||
themeName = 'christmas'
|
themeName = 'catppuccin'
|
||||||
}
|
}
|
||||||
|
|
||||||
this.state.value.currentTheme = themeName
|
this.state.value.currentTheme = themeName
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue