refactor: change dark theme color
This commit is contained in:
@@ -117,6 +117,13 @@ const (
|
||||
LLMProviderOpenAI = "openai"
|
||||
)
|
||||
|
||||
// Theme preference identifiers stored in AppConfig.Theme.
|
||||
const (
|
||||
ThemeAuto = "auto"
|
||||
ThemeLight = "light"
|
||||
ThemeDark = "dark"
|
||||
)
|
||||
|
||||
const DefaultSummaryPrompt = `你是一个截图内容总结助手。请阅读截图,并用中文输出一段适合直接粘贴到聊天、工单、Issue 或 PR 中的说明。
|
||||
|
||||
要求:
|
||||
@@ -141,6 +148,9 @@ type AppConfig struct {
|
||||
// in the infrastructure hotkey adapter.
|
||||
Hotkey string `json:"hotkey"`
|
||||
|
||||
// Theme controls the settings UI appearance: "auto", "light", or "dark".
|
||||
Theme string `json:"theme"`
|
||||
|
||||
// S3 holds the active S3-compatible storage configuration.
|
||||
S3 S3Config `json:"s3"`
|
||||
|
||||
@@ -156,6 +166,7 @@ type AppConfig struct {
|
||||
func DefaultAppConfig() AppConfig {
|
||||
cfg := AppConfig{
|
||||
Hotkey: "cmd+shift+a",
|
||||
Theme: ThemeAuto,
|
||||
S3: S3Config{
|
||||
PathPrefix: "snapgo/",
|
||||
UsePathStyle: true,
|
||||
@@ -214,6 +225,9 @@ func (c *AppConfig) Normalize() {
|
||||
if c.Hotkey == "" {
|
||||
c.Hotkey = "cmd+shift+a"
|
||||
}
|
||||
if c.Theme != ThemeLight && c.Theme != ThemeDark && c.Theme != ThemeAuto {
|
||||
c.Theme = ThemeAuto
|
||||
}
|
||||
if c.S3.PathPrefix == "" {
|
||||
c.S3.PathPrefix = "snapgo/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user