From c6d132ef0a562cb8f4665a0cd914bf02f87928b1 Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 5 Jul 2025 11:23:09 +0800 Subject: [PATCH] =?UTF-8?q?issue=20=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/release.md | 3 +++ src/core/github.ts | 1 + src/types/color/github.ts | 6 ++++++ styles/components/issue.scss | 20 -------------------- styles/components/issue.tsx | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 42 insertions(+), 20 deletions(-) delete mode 100644 styles/components/issue.scss diff --git a/.github/release.md b/.github/release.md index a9eb8f1..5c42e61 100644 --- a/.github/release.md +++ b/.github/release.md @@ -22,6 +22,7 @@ - 提交列表样式和颜色同步 - 提交 SHA 颜色和样式优化 - 软件包标签颜色同步 +- Issue/PR 评论边框样式同步 ## 🎈 Perf @@ -32,6 +33,8 @@ - 统一全局标签圆角 - 仪表板动态信息图标大小优化 - Runner 列表标签颜色优化 +- 仓库动态活动标签样式统一 +- 合并请求分支样式统一 ## 🐞 Fix diff --git a/src/core/github.ts b/src/core/github.ts index b91ce50..f83e93c 100644 --- a/src/core/github.ts +++ b/src/core/github.ts @@ -274,6 +274,7 @@ export function defineGithubTheme(githubColor: GithubColor): Theme { bgColor: { accent: { emphasis: githubColor.bgColor.accent.emphasis, + muted: githubColor.bgColor.accent.muted, }, success: { emphasis: githubColor.bgColor.success.emphasis, diff --git a/src/types/color/github.ts b/src/types/color/github.ts index b1f0173..0bbefc7 100644 --- a/src/types/color/github.ts +++ b/src/types/color/github.ts @@ -3,6 +3,7 @@ export const github = { fgColor: { /** 强调色 * @actions `actionViewRight` 右侧日志标题颜色 + * @issue `prBranch` 分支名称文本颜色 */ accent: null, /** 默认的文本颜色 @@ -32,6 +33,10 @@ export const github = { * @actions `actionViewLeft` 左侧子作业激活伪元素颜色 */ emphasis: null, + /** 暗淡的背景颜色 + * @issue `prBranch` 分支名称背景颜色 + */ + muted: null, }, success: { /** 成功的背景颜色 @@ -50,6 +55,7 @@ export const github = { accent: { /** 强调色 * @input `input` 输入框被选中时的边框颜色 + * @issue `comment` 评论框被选中时的边框颜色 */ emphasis: null, }, diff --git a/styles/components/issue.scss b/styles/components/issue.scss deleted file mode 100644 index c18a9f1..0000000 --- a/styles/components/issue.scss +++ /dev/null @@ -1,20 +0,0 @@ -// Made by Luting ^-^ -// PR -#issue-list .flex-item-body .branches .branch { - color: var(--color-blue); - background-color: #121d2f; - font-size: 12px; -} - -// 评论焦点 -.comment:target { - .comment-container { - border-color: #1f6feb !important; - box-shadow: 0 0 0 1px #4493f8 !important; - } - - .header:before { - border-right-color: #1f6feb !important; - filter: drop-shadow(-1px 0 0 #4493f8) !important; - } -} diff --git a/styles/components/issue.tsx b/styles/components/issue.tsx index d121f2d..a694e5b 100644 --- a/styles/components/issue.tsx +++ b/styles/components/issue.tsx @@ -67,3 +67,35 @@ export const babel = css` } } `; + +// PR 分支标签 +export const prBranch = css` + .repository.view.issue .pull-desc code, + #issue-list .flex-item-body .branches .branch { + color: ${themeVars.github.fgColor.accent}; + background-color: ${themeVars.github.bgColor.accent.muted}; + font-size: 12px; + padding: 0 5px; + } +`; + +// 评论 +export const comment = css` + .comment { + // 去除评论标题左侧指向头像的小箭头 + .comment-header, + &:target .comment-header { + &:before, + &:after { + display: none; + } + } + // 评论焦点样式 + &:target { + .comment-container { + border-color: ${themeVars.github.borderColor.accent.emphasis} !important; + box-shadow: 0 0 0 1px ${themeVars.color.primary.self} !important; + } + } + } +`;