giteaColor support custom override github vars

This commit is contained in:
lutinglt committed 2026-06-10 09:45:55 +08:00
1 parent 638ff37b27
commit b85d34b0c1
1 file changed
+4 -1
+4 -1
View File
@@ -22,6 +22,7 @@ import type { ThemeVars } from "../core";
import { scaleColorLight } from "../functions";
import type { Ansi, Console, Diff, GitHub, Message, Named, Other, Primary, Secondary } from "../types";
import { themeVars } from "../types";
import { type DeepPartial, deepOverride } from "../utils";
export type GiteaColor = {
isDarkTheme: boolean;
@@ -33,6 +34,8 @@ export type GiteaColor = {
console: Console;
diff: Diff;
other: Other;
/** 自定义 GitHub 主题变量映射,未填写的字段自动使用默认值 */
github: DeepPartial<GitHub>;
};
export function gitea2ThemeVars(giteaColor: GiteaColor): ThemeVars {
@@ -176,6 +179,6 @@ export function gitea2ThemeVars(giteaColor: GiteaColor): ThemeVars {
console: giteaColor.console,
diff: giteaColor.diff,
},
github,
github: deepOverride(github, giteaColor.github),
};
}