mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 19:05:55 +02:00
fix: theme preference bug
This commit is contained in:
parent
f2b2ef2560
commit
1aa8334633
3 changed files with 4 additions and 1 deletions
1
frontend/components.d.ts
vendored
1
frontend/components.d.ts
vendored
|
@ -21,6 +21,7 @@ declare module '@vue/runtime-core' {
|
||||||
AFormItem: typeof import('ant-design-vue/es')['FormItem']
|
AFormItem: typeof import('ant-design-vue/es')['FormItem']
|
||||||
AInput: typeof import('ant-design-vue/es')['Input']
|
AInput: typeof import('ant-design-vue/es')['Input']
|
||||||
AInputGroup: typeof import('ant-design-vue/es')['InputGroup']
|
AInputGroup: typeof import('ant-design-vue/es')['InputGroup']
|
||||||
|
AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
|
||||||
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
|
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
|
||||||
ALayout: typeof import('ant-design-vue/es')['Layout']
|
ALayout: typeof import('ant-design-vue/es')['Layout']
|
||||||
ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
|
ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
|
||||||
|
|
|
@ -16,6 +16,8 @@ const callback = (media: { matches: any; }) => {
|
||||||
dark_mode(false)
|
dark_mode(false)
|
||||||
settings.set_theme('auto')
|
settings.set_theme('auto')
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
dark_mode(settings.preference_theme === 'dark')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {message} from 'ant-design-vue'
|
||||||
const {$gettext} = useGettext()
|
const {$gettext} = useGettext()
|
||||||
|
|
||||||
const settingsStore = useSettingsStore()
|
const settingsStore = useSettingsStore()
|
||||||
const theme = ref('auto')
|
const theme = ref(settingsStore.theme)
|
||||||
const data = ref({
|
const data = ref({
|
||||||
server: {
|
server: {
|
||||||
http_port: 9000,
|
http_port: 9000,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue