mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-24 18:26:17 +03:00
fix: correct linking of theme colors (#2524)
This commit is contained in:
parent
c0bb6e293c
commit
07042b9f31
1 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ import type { ThemeColors } from '~/composables/settings'
|
|||
const themes = await import('~/constants/themes.json').then(r => r.default) as [string, ThemeColors][]
|
||||
const settings = $(useUserSettings())
|
||||
|
||||
const currentTheme = $computed(() => settings.themeColors?.['--theme-color-name'] || themes[0][0])
|
||||
const currentTheme = $computed(() => settings.themeColors?.['--theme-color-name'] || themes[0][1]['--theme-color-name'])
|
||||
|
||||
function updateTheme(theme: ThemeColors) {
|
||||
settings.themeColors = theme
|
||||
|
@ -19,8 +19,8 @@ function updateTheme(theme: ThemeColors) {
|
|||
'background': key,
|
||||
'--local-ring-color': key,
|
||||
}"
|
||||
:class="currentTheme === key ? 'ring-2' : 'scale-90'"
|
||||
:title="key"
|
||||
:class="currentTheme === theme['--theme-color-name'] ? 'ring-2' : 'scale-90'"
|
||||
:title="theme['--theme-color-name']"
|
||||
w-8 h-8 rounded-full transition-all
|
||||
ring="$local-ring-color offset-3 offset-$c-bg-base"
|
||||
@click="updateTheme(theme)"
|
||||
|
|
Loading…
Reference in a new issue