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

View File

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