Added dark theme and white theme switching

This commit is contained in:
2025-06-09 02:29:15 +08:00
parent 7f97b4a937
commit aff08f4d3d
23 changed files with 630 additions and 218 deletions

View File

@@ -114,6 +114,11 @@ export class AppearanceConfig {
*/
"theme": ThemeType;
/**
* 系统界面主题
*/
"systemTheme": SystemThemeType;
/** Creates a new AppearanceConfig instance. */
constructor($$source: Partial<AppearanceConfig> = {}) {
if (!("language" in $$source)) {
@@ -122,6 +127,9 @@ export class AppearanceConfig {
if (!("theme" in $$source)) {
this["theme"] = ("" as ThemeType);
}
if (!("systemTheme" in $$source)) {
this["systemTheme"] = ("" as SystemThemeType);
}
Object.assign(this, $$source);
}
@@ -509,6 +517,31 @@ export enum LanguageType {
LangEnUS = "en-US",
};
/**
* SystemThemeType 系统主题类型定义
*/
export enum SystemThemeType {
/**
* The Go zero value for the underlying type of the enum.
*/
$zero = "",
/**
* SystemThemeDark 深色系统主题
*/
SystemThemeDark = "dark",
/**
* SystemThemeLight 浅色系统主题
*/
SystemThemeLight = "light",
/**
* SystemThemeAuto 跟随系统主题
*/
SystemThemeAuto = "auto",
};
/**
* TabType 定义了制表符类型
*/