From 94bcbdfe13ac9e2d7a109a65e4ce5a6a0b210590 Mon Sep 17 00:00:00 2001 From: tiny-craft <137850705+tiny-craft@users.noreply.github.com> Date: Fri, 25 Aug 2023 00:07:29 +0800 Subject: [PATCH] perf: set the default value of the theme to "Auto" --- frontend/src/stores/preferences.js | 13 +++++-------- main.go | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/frontend/src/stores/preferences.js b/frontend/src/stores/preferences.js index b5e383a..820cce5 100644 --- a/frontend/src/stores/preferences.js +++ b/frontend/src/stores/preferences.js @@ -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() { diff --git a/main.go b/main.go index 53c0ceb..62ea620 100644 --- a/main.go +++ b/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,