部分 label 迁移

This commit is contained in:
lutinglt
2025-07-03 22:38:48 +08:00
parent 186f58815b
commit 1c6b7540f3
9 changed files with 69 additions and 41 deletions

1
.github/release.md vendored
View File

@@ -18,6 +18,7 @@
- 设置界面右上角小按钮样式同步 - 设置界面右上角小按钮样式同步
- 弹窗背景色和叠加背景色同步 - 弹窗背景色和叠加背景色同步
- 全局圆角样式同步 - 全局圆角样式同步
- 工单标签颜色同步
## 🎈 Perf ## 🎈 Perf

View File

@@ -45,11 +45,15 @@ export type GithubColor = {
muted: string; muted: string;
}; };
success: { success: {
emphasis: string;
muted: string; muted: string;
}; };
danger: { danger: {
muted: string; muted: string;
}; };
done: {
emphasis: string;
};
default: string; default: string;
inset: string; inset: string;
muted: string; muted: string;
@@ -262,6 +266,12 @@ export function defineGithubTheme(githubColor: GithubColor): Theme {
accent: { accent: {
emphasis: githubColor.bgColor.accent.emphasis, emphasis: githubColor.bgColor.accent.emphasis,
}, },
success: {
emphasis: githubColor.bgColor.success.emphasis,
},
done: {
emphasis: githubColor.bgColor.done.emphasis,
},
}, },
borderColor: { borderColor: {
accent: { accent: {

View File

@@ -32,6 +32,18 @@ export const github = {
*/ */
emphasis: null, emphasis: null,
}, },
success: {
/** 成功的背景颜色
* @issue `babel` 重新开启图标背景颜色
*/
emphasis: null,
},
done: {
/** 完成的背景颜色
* @issue `babel` 工单已关闭图标背景颜色
*/
emphasis: null
}
}, },
borderColor: { borderColor: {
accent: { accent: {

View File

@@ -23,3 +23,44 @@ export const button = css`
} }
} }
`; `;
export const babel = css`
.issue-content-left {
.badge {
// 时间线打开状态标签
&.tw-bg-green {
background-color: ${themeVars.github.bgColor.success.emphasis} !important;
border-color: ${themeVars.github.bgColor.success.emphasis} !important;
}
// 时间线关闭状态标签
&.tw-bg-red {
background-color: ${themeVars.github.bgColor.done.emphasis} !important;
border-color: ${themeVars.github.bgColor.done.emphasis} !important;
}
// 时间线合并状态标签
&.tw-bg-purple {
background-color: ${themeVars.github.bgColor.done.emphasis} !important;
border-color: ${themeVars.github.bgColor.done.emphasis} !important;
}
}
}
// 工单&PR状态标签
.ui.label.issue-state-label {
border-radius: 25px !important;
&.green {
background-color: ${themeVars.github.bgColor.success.emphasis} !important;
border-color: ${themeVars.github.bgColor.success.emphasis} !important;
}
&.red {
background-color: ${themeVars.github.bgColor.done.emphasis} !important;
border-color: ${themeVars.github.bgColor.done.emphasis} !important;
}
&.purple {
background-color: ${themeVars.github.bgColor.done.emphasis} !important;
border-color: ${themeVars.github.bgColor.done.emphasis} !important;
}
}
`;

View File

@@ -2,6 +2,7 @@ import "./button"; // 按钮
import "./chroma"; // 代码高亮 import "./chroma"; // 代码高亮
import "./codemirror"; // codemirror 样式 import "./codemirror"; // codemirror 样式
import "./input"; // 输入框 import "./input"; // 输入框
import "./label"; // 标签
import "./modal"; // 弹窗 import "./modal"; // 弹窗
import "./radius"; // 圆角 import "./radius"; // 圆角
import "./svg"; // svg 图标 import "./svg"; // svg 图标

View File

@@ -1,13 +1,4 @@
// Made by Luting ^-^ // Made by Luting ^-^
.repo-buttons .ui.basic.label {
color: #f0f6fc;
}
a.ui.basic.label:hover {
color: #f0f6fc;
background-color: #262c36;
border-color: var(--color-light-border);
}
span, span,
.org-visibility div { .org-visibility div {
@@ -17,30 +8,7 @@ span,
} }
} }
.badge.tw-bg-green,
.ui.green.label.issue-state-label {
background-color: #238636 !important;
}
.badge.tw-bg-red {
background-color: var(--color-purple) !important;
}
.ui.ui.ui { .ui.ui.ui {
&.purple.label {
border-radius: 25px !important;
}
&.green.label.issue-state-label {
background: var(--color-primary);
border-radius: 25px !important;
}
&.red.label.issue-state-label {
background: var(--color-purple);
border-radius: 25px !important;
}
&.primary.label { &.primary.label {
color: var(--color-blue); color: var(--color-blue);
background-color: #388bfd33; background-color: #388bfd33;
@@ -86,10 +54,6 @@ a.ui.ui.ui {
} }
} }
.issue-list .text.red {
color: #ab7df8 !important;
}
// Runner&软件包&提交 标签 // Runner&软件包&提交 标签
.ui.label { .ui.label {
&.sha { &.sha {

0
styles/public/label.tsx Normal file
View File

View File

@@ -58,8 +58,6 @@ export const radius = css`
.ui.search.selection .prompt, .ui.search.selection .prompt,
.ui.pointing.dropdown > .menu, .ui.pointing.dropdown > .menu,
.ui.loading.form.segments:before, .ui.loading.form.segments:before,
.ui.secondary.menu .item,
.ui.secondary.menu .active.item,
.ui.secondary.menu .dropdown.item > .menu, .ui.secondary.menu .dropdown.item > .menu,
.ui.vertical.menu > .active.item:only-child, .ui.vertical.menu > .active.item:only-child,
.ui.segments:not(.horizontal) > .segment:only-child, .ui.segments:not(.horizontal) > .segment:only-child,

View File

@@ -41,14 +41,15 @@ const github: GithubColor = {
muted: "#bb800926", muted: "#bb800926",
}, },
success: { success: {
emphasis: "#238636",
muted: "#2ea04326", muted: "#2ea04326",
}, },
danger: { danger: {
muted: "#f851491a", muted: "#f851491a",
}, },
// done: { done: {
// emphasis: "#8957e5", emphasis: "#8957e5",
// }, },
default: "#0d1117", default: "#0d1117",
inset: "#010409", inset: "#010409",
muted: "#151b23", muted: "#151b23",