mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 18:10:12 +01:00
🎨 Improve appearance setting theme name display https://github.com/siyuan-note/siyuan/issues/10903
This commit is contained in:
parent
0c450d9fcd
commit
d58d967522
3 changed files with 59 additions and 21 deletions
|
|
@ -17,22 +17,22 @@
|
|||
package conf
|
||||
|
||||
type Appearance struct {
|
||||
Mode int `json:"mode"` // 模式:0:明亮,1:暗黑
|
||||
ModeOS bool `json:"modeOS"` // 模式是否跟随系统
|
||||
DarkThemes []string `json:"darkThemes"` // 暗黑模式外观主题列表
|
||||
LightThemes []string `json:"lightThemes"` // 明亮模式外观主题列表
|
||||
ThemeDark string `json:"themeDark"` // 选择的暗黑模式外观主题
|
||||
ThemeLight string `json:"themeLight"` // 选择的明亮模式外观主题
|
||||
ThemeVer string `json:"themeVer"` // 选择的主题版本
|
||||
Icons []string `json:"icons"` // 图标列表
|
||||
Icon string `json:"icon"` // 选择的图标
|
||||
IconVer string `json:"iconVer"` // 选择的图标版本
|
||||
CodeBlockThemeLight string `json:"codeBlockThemeLight"` // 明亮模式下代码块主题
|
||||
CodeBlockThemeDark string `json:"codeBlockThemeDark"` // 暗黑模式下代码块主题
|
||||
Lang string `json:"lang"` // 选择的界面语言,同 AppConf.Lang
|
||||
ThemeJS bool `json:"themeJS"` // 是否启用了主题 JavaScript
|
||||
CloseButtonBehavior int `json:"closeButtonBehavior"` // 关闭按钮行为,0:退出,1:最小化到托盘
|
||||
HideStatusBar bool `json:"hideStatusBar"` // 是否隐藏底部状态栏
|
||||
Mode int `json:"mode"` // 模式:0:明亮,1:暗黑
|
||||
ModeOS bool `json:"modeOS"` // 模式是否跟随系统
|
||||
DarkThemes []*AppearanceTheme `json:"darkThemes"` // 暗黑模式外观主题列表
|
||||
LightThemes []*AppearanceTheme `json:"lightThemes"` // 明亮模式外观主题列表
|
||||
ThemeDark string `json:"themeDark"` // 选择的暗黑模式外观主题
|
||||
ThemeLight string `json:"themeLight"` // 选择的明亮模式外观主题
|
||||
ThemeVer string `json:"themeVer"` // 选择的主题版本
|
||||
Icons []string `json:"icons"` // 图标列表
|
||||
Icon string `json:"icon"` // 选择的图标
|
||||
IconVer string `json:"iconVer"` // 选择的图标版本
|
||||
CodeBlockThemeLight string `json:"codeBlockThemeLight"` // 明亮模式下代码块主题
|
||||
CodeBlockThemeDark string `json:"codeBlockThemeDark"` // 暗黑模式下代码块主题
|
||||
Lang string `json:"lang"` // 选择的界面语言,同 AppConf.Lang
|
||||
ThemeJS bool `json:"themeJS"` // 是否启用了主题 JavaScript
|
||||
CloseButtonBehavior int `json:"closeButtonBehavior"` // 关闭按钮行为,0:退出,1:最小化到托盘
|
||||
HideStatusBar bool `json:"hideStatusBar"` // 是否隐藏底部状态栏
|
||||
}
|
||||
|
||||
func NewAppearance() *Appearance {
|
||||
|
|
@ -49,3 +49,8 @@ func NewAppearance() *Appearance {
|
|||
HideStatusBar: false,
|
||||
}
|
||||
}
|
||||
|
||||
type AppearanceTheme struct {
|
||||
Name string `json:"name"` // daylight
|
||||
Label string `json:"label"` // i18n display name
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue