perf: set the default value of the theme to "Auto"

This commit is contained in:
tiny-craft 2023-08-25 00:07:29 +08:00
parent 484e6a5f6b
commit 94bcbdfe13
2 changed files with 6 additions and 9 deletions

View File

@ -30,7 +30,7 @@ const usePreferencesStore = defineStore('preferences', {
*/ */
state: () => ({ state: () => ({
general: { general: {
theme: 'light', theme: 'auto',
language: 'en', language: 'en',
font: '', font: '',
fontSize: 14, fontSize: 14,
@ -134,14 +134,11 @@ const usePreferencesStore = defineStore('preferences', {
isDark() { isDark() {
const th = get(this.general, 'theme', 'auto') const th = get(this.general, 'theme', 'auto')
if (th === 'auto') { if (th !== 'auto') {
if (osTheme.value === 'dark') { return th === 'dark'
return true } else {
return osTheme.value === 'dark'
} }
} else if (th === 'dark') {
return true
}
return false
}, },
autoCheckUpdate() { autoCheckUpdate() {

View File

@ -67,7 +67,7 @@ func main() {
}, },
About: &mac.AboutInfo{ About: &mac.AboutInfo{
Title: "Tiny RDM", Title: "Tiny RDM",
Message: "Copyright © 2023", Message: "A modern lightweight cross-platform Redis desktop client\nCopyright © 2023",
Icon: icon, Icon: icon,
}, },
//WebviewIsTransparent: true, //WebviewIsTransparent: true,