mirror of
https://github.com/lutinglt/gitea-github-theme.git
synced 2026-10-28 09:44:55 +00:00
giteaColor support custom override github vars
This commit is contained in:
1 file changed
+4
-1
@@ -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),
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user