mirror of
https://github.com/tiny-craft/tiny-rdm.git
synced 2025-04-07 21:48:04 +08:00
perf: set the default value of the theme to "Auto"
This commit is contained in:
parent
484e6a5f6b
commit
94bcbdfe13
@ -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() {
|
||||
|
2
main.go
2
main.go
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user