Skip to content

Commit 1aa8334

Browse files
committed
fix: theme preference bug
1 parent f2b2ef2 commit 1aa8334

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

frontend/components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ declare module '@vue/runtime-core' {
2121
AFormItem: typeof import('ant-design-vue/es')['FormItem']
2222
AInput: typeof import('ant-design-vue/es')['Input']
2323
AInputGroup: typeof import('ant-design-vue/es')['InputGroup']
24+
AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
2425
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
2526
ALayout: typeof import('ant-design-vue/es')['Layout']
2627
ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']

frontend/src/App.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ const callback = (media: { matches: any; }) => {
1616
dark_mode(false)
1717
settings.set_theme('auto')
1818
}
19+
} else {
20+
dark_mode(settings.preference_theme === 'dark')
1921
}
2022
}
2123

frontend/src/views/preference/Preference.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {message} from 'ant-design-vue'
1010
const {$gettext} = useGettext()
1111
1212
const settingsStore = useSettingsStore()
13-
const theme = ref('auto')
13+
const theme = ref(settingsStore.theme)
1414
const data = ref({
1515
server: {
1616
http_port: 9000,

0 commit comments

Comments
 (0)