From c0da0c95bd23def1a4696f7eacc18b1735f60e29 Mon Sep 17 00:00:00 2001 From: lutinglt Date: Fri, 3 Jul 2026 10:18:35 +0800 Subject: [PATCH 01/16] Increase the corner angle of the pop-up window. --- CHANGELOG.md | 1 + styles/components/actions/actions.ts | 6 ------ styles/public/modal.ts | 14 +++++++++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 186c3bd..f7a05bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fine tune the spacing of elements in menu sub items. - Optimize the spacing of warehouse themes on exploration pages. +- Increase the corner angle of the pop-up window. ### 🐞 Fix diff --git a/styles/components/actions/actions.ts b/styles/components/actions/actions.ts index 9898b9e..8a1a435 100644 --- a/styles/components/actions/actions.ts +++ b/styles/components/actions/actions.ts @@ -134,12 +134,6 @@ const label = css` // 手动工作流 const runWorkflow = css` - /* 手动工作流弹窗 */ - #runWorkflowDispatchModal { - > .content { - border-radius: ${otherThemeVars.border.radius}; - } - } /* 手动工作流下拉列表 */ #runWorkflowDispatchForm { font-size: 12px; diff --git a/styles/public/modal.ts b/styles/public/modal.ts index e9bc4c4..94fc793 100644 --- a/styles/public/modal.ts +++ b/styles/public/modal.ts @@ -21,25 +21,33 @@ import { css, cssCombine, themeVars } from "@lutinglt/gitea-github-theme/core"; import { animationDown } from "@lutinglt/gitea-github-theme/styles/common"; const modal = css` - .ui.modal { + .ui.ui.modal { ${animationDown}; border: 1.5px solid ${themeVars.color.light.border}; + border-radius: 12px; + > :first-child:not(.icon):not(.dimmer) { + border-top-left-radius: 12px; + border-top-right-radius: 12px; + } + > :last-child:not(.icon):not(.dimmer) { + border-bottom-left-radius: 12px; + border-bottom-right-radius: 12px; + } > .header { background-color: ${themeVars.color.menu}; border-bottom: 1.5px solid ${themeVars.color.light.border}; } - > .content, form > .content { background-color: ${themeVars.color.menu}; } - > .actions, .content + .actions, .content + form > .actions { background-color: ${themeVars.color.menu}; border-top: 1.5px solid ${themeVars.color.light.border}; + border-radius: 0 0 12px 12px; } .actions > .ui.button { padding: 8px 12px; From 7e62973004a4fb2d8b7a01cc30013a1f1c0b912e Mon Sep 17 00:00:00 2001 From: lutinglt Date: Fri, 3 Jul 2026 10:23:56 +0800 Subject: [PATCH 02/16] fix and optimize --- .github/workflows/build.yml | 2 +- package.json | 6 +++--- styles/components/issues/issue_list.ts | 17 ++++++++--------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e242438..73126fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: if: steps.changes.outputs.src == 'true' run: | bun install - bun bundle:ci + bun ci - name: Upload css assets if: steps.build.outcome == 'success' diff --git a/package.json b/package.json index 273a1db..f19013a 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,8 @@ "lint": "bun eslint .", "fmt": "bun prettier --write .", "bundle": "tsgo -b && bunx --bun vite build", + "dev": "bun bundle && bun sync:theme", + "ci": "bun lint && bun bundle && bun vitest ", "commit": "bun fmt && bun lint && bun bundle && bun vitest", "version": "bun scripts/version.ts", "release": "bun bundle && bun update:locale", @@ -29,9 +31,7 @@ "update:primer": "bun scripts/buildPrimerTSToken.ts", "update:locale": "bun scripts/translate.ts", "update:gitea": "bun scripts/updateGitea.ts", - "install:clean": "rm -rf node_modules bun.lock bun.lockb && bun install", - "bundle:ci": "bun lint && bun bundle && bun vitest ", - "bundle:dev": "bun bundle && bun sync:theme" + "install:clean": "rm -rf node_modules bun.lock bun.lockb && bun install" }, "devDependencies": { "@catppuccin/palette": "^1.8.0", diff --git a/styles/components/issues/issue_list.ts b/styles/components/issues/issue_list.ts index 80a9fe2..365d0f3 100644 --- a/styles/components/issues/issue_list.ts +++ b/styles/components/issues/issue_list.ts @@ -154,21 +154,20 @@ const issueList = css` /* [TODO] 暂时排除项目的列表 */ .page-content.repository.milestones:not(.projects) .milestone-list, /* 仪表板的里程碑列表 */ - .page-content.repository.milestones.dashboard .flex-divided-list { + .page-content.repository.milestones.dashboard .flex-divided-list { border: 1px solid ${themeVars.color.light.border}; border-bottom-left-radius: ${otherThemeVars.border.radius}; border-bottom-right-radius: ${otherThemeVars.border.radius}; .item { padding: 8px 16px 10px 16px; .list-item-large-title { - font-size: 16px; - font-weight: 500; - } - div span { - font-size: 14px; - font-weight: 600; - } - + font-size: 16px; + font-weight: 500; + } + div span { + font-size: 14px; + font-weight: 600; + } } .list-item-secondary-bar { font-size: 12px; From 294f4123eed194ed46299a9f7065a71cc56ff344 Mon Sep 17 00:00:00 2001 From: lutinglt Date: Fri, 3 Jul 2026 10:49:37 +0800 Subject: [PATCH 03/16] Synchronize the style of the search bar. --- CHANGELOG.md | 1 + styles/common/button.ts | 18 ++++++++++++++++++ styles/common/index.ts | 2 +- styles/components/setting.ts | 21 ++++++--------------- styles/public/button.ts | 16 ++++++---------- styles/public/menu/secondary_menu.ts | 18 +++++++++++++++++- styles/public/menu/vertical_menu.ts | 3 +++ 7 files changed, 52 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7a05bb..1446af2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Fine tune the spacing of elements in menu sub items. - Optimize the spacing of warehouse themes on exploration pages. - Increase the corner angle of the pop-up window. +- Synchronize the style of the search bar. ### 🐞 Fix diff --git a/styles/common/button.ts b/styles/common/button.ts index d5afd7f..d9514f8 100644 --- a/styles/common/button.ts +++ b/styles/common/button.ts @@ -19,6 +19,24 @@ import { cssStyle, themeVars } from "@lutinglt/gitea-github-theme/core"; +/** 普通按钮样式 */ +export const basicButtonStyle = cssStyle({ + backgroundColor: themeVars.color.button, + color: themeVars.color.text.light.self, + border: `1px solid ${themeVars.color.light.border}`, + boxShadow: "none", + "&:hover": { + backgroundColor: themeVars.color.hover.self, + color: themeVars.color.text.self, + borderColor: themeVars.color.light.border, + }, + "&:active": { + backgroundColor: themeVars.github.button.default.bgColor.active, + color: themeVars.color.text.self, + borderColor: themeVars.color.light.border, + }, +}); + /** 主色调按钮样式 */ export const primaryButtonStyle = cssStyle({ color: themeVars.github.button.primary.fgColor.rest, diff --git a/styles/common/index.ts b/styles/common/index.ts index 9e6137f..1b67fbc 100644 --- a/styles/common/index.ts +++ b/styles/common/index.ts @@ -19,6 +19,6 @@ export { activeItemAfterStyle } from "./after"; export { animation, animationDown, animationUp } from "./animation"; -export { primaryButtonHoverStyle, primaryButtonStyle } from "./button"; +export { basicButtonStyle, primaryButtonHoverStyle, primaryButtonStyle } from "./button"; export { deleteHoverActiveStyle } from "./delete"; export { botLabelStyle, labelStyle } from "./label"; diff --git a/styles/components/setting.ts b/styles/components/setting.ts index 4d5ba85..0962957 100644 --- a/styles/components/setting.ts +++ b/styles/components/setting.ts @@ -18,7 +18,11 @@ */ import { css, cssCombine, cssStyle, themeVars } from "@lutinglt/gitea-github-theme/core"; -import { primaryButtonHoverStyle, primaryButtonStyle } from "@lutinglt/gitea-github-theme/styles/common"; +import { + basicButtonStyle, + primaryButtonHoverStyle, + primaryButtonStyle, +} from "@lutinglt/gitea-github-theme/styles/common"; const tinyStyle = cssStyle({ color: themeVars.github.themeExtra.button.primary.fgColor.accent, @@ -41,20 +45,7 @@ const button = css` .org-setting-content { /* 主色调按钮替换为普通按钮 */ .ui.primary.button { - color: ${themeVars.color.text.light.self}; - background-color: ${themeVars.color.button}; - border-color: ${themeVars.color.light.border}; - box-shadow: none; - &:hover { - background-color: ${themeVars.color.hover.self}; - color: ${themeVars.color.text.self}; - border-color: ${themeVars.color.light.border}; - } - &:active { - background-color: ${themeVars.github.button.default.bgColor.active}; - color: ${themeVars.color.text.self}; - border-color: ${themeVars.color.light.border}; - } + ${basicButtonStyle} } /* 迷你按钮替换为自定义的主色调按钮 (例: SSH 验证按钮) */ .ui.primary.button.tiny { diff --git a/styles/public/button.ts b/styles/public/button.ts index 8ff9381..6dc4156 100644 --- a/styles/public/button.ts +++ b/styles/public/button.ts @@ -18,7 +18,11 @@ */ import { css, cssCombine, themeVars } from "@lutinglt/gitea-github-theme/core"; -import { primaryButtonHoverStyle, primaryButtonStyle } from "@lutinglt/gitea-github-theme/styles/common"; +import { + basicButtonStyle, + primaryButtonHoverStyle, + primaryButtonStyle, +} from "@lutinglt/gitea-github-theme/styles/common"; // 普通按钮和主色调按钮 const baseButton = css` @@ -62,15 +66,7 @@ const baseButton = css` /* 主色调基本按钮和普通按钮一样 */ /* 作者的关注按钮 */ .ui.basic.primary.button { - background-color: ${themeVars.color.button}; - color: ${themeVars.color.text.self}; - border-color: ${themeVars.color.light.border}; - box-shadow: none; - &:hover { - background-color: ${themeVars.color.hover.self}; - color: ${themeVars.color.text.self}; - border-color: ${themeVars.color.light.border}; - } + ${basicButtonStyle} } /* 普通按钮边框色不变 */ .ui.basic.button, diff --git a/styles/public/menu/secondary_menu.ts b/styles/public/menu/secondary_menu.ts index 058ac9b..b80b21c 100644 --- a/styles/public/menu/secondary_menu.ts +++ b/styles/public/menu/secondary_menu.ts @@ -18,6 +18,7 @@ */ import { css, cssCombine, otherThemeVars, themeVars } from "@lutinglt/gitea-github-theme/core"; +import { basicButtonStyle } from "@lutinglt/gitea-github-theme/styles/common"; const secondaryMenu = css` /* 二级菜单, 比如 Issue/PR/Actions 的筛选菜单 */ @@ -83,4 +84,19 @@ const secondaryMenu = css` } `; -export default cssCombine(secondaryMenu); +// 小型的一般带搜索框和下拉菜单按钮的二级菜单栏 +// 例: 探索页面搜索框和筛选菜单/排序菜单, 关注/用户/组织仓库的搜索栏和筛选菜单/排序菜单 +const secondarySmallFilterMenu = css` + .ui.small.secondary.filter.menu { + /* 下拉菜单按钮 */ + .ui.small.dropdown.item { + ${basicButtonStyle} + } + /* 搜索框 */ + input[type="search"] { + background: unset; + } + } +`; + +export default cssCombine(secondaryMenu, secondarySmallFilterMenu); diff --git a/styles/public/menu/vertical_menu.ts b/styles/public/menu/vertical_menu.ts index 6d9e4cf..d7b2242 100644 --- a/styles/public/menu/vertical_menu.ts +++ b/styles/public/menu/vertical_menu.ts @@ -81,6 +81,9 @@ const verticalMenu = css` > summary, > .menu.items-full-width > .item { padding: 6px 8px; + &:hover { + background: ${themeVars.github.control.transparent.bgColor.hover}; + } } > .menu { margin: 0; From f84e27fac1d1f05e845fd6129c7e23d9b7dd19eb Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 4 Jul 2026 00:04:13 +0800 Subject: [PATCH 04/16] Synchronize workflow summary style. --- CHANGELOG.md | 1 + styles/components/actions/workflow_runs.ts | 17 +- styles/components/actions/workflow_steps.ts | 3 +- styles/components/actions/workflow_summary.ts | 236 +++++++++++------- styles/components/heatmap.ts | 3 +- styles/public/transition.ts | 2 + 6 files changed, 167 insertions(+), 95 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1446af2..476ef44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Optimize the spacing of warehouse themes on exploration pages. - Increase the corner angle of the pop-up window. - Synchronize the style of the search bar. +- Synchronize workflow summary style. ### 🐞 Fix diff --git a/styles/components/actions/workflow_runs.ts b/styles/components/actions/workflow_runs.ts index f42c02c..d57fa27 100644 --- a/styles/components/actions/workflow_runs.ts +++ b/styles/components/actions/workflow_runs.ts @@ -21,7 +21,19 @@ import { css, cssCombine, otherThemeVars, themeVars } from "@lutinglt/gitea-gith // 工作流详情页标题 const actionViewHeader = css` - .action-view-header { + .action-view-header.action-view-header { + margin: 16px 0; + .action-info-summary { + .ui.basic.button { + font-size: 14px; + } + .ui.dropdown.compact.button { + z-index: 1; /* 避免被遮挡 */ + > .menu > .item { + align-items: start; + } + } + } .action-commit-summary { /* yml 文件名 */ > span:first-child { @@ -64,7 +76,8 @@ const actionViewHeader = css` const actionViewLeft = css` .action-view-left.action-view-left.action-view-left { margin-right: 28px; - max-width: 22vw; + min-width: 224px; + max-width: 18vw; .left-list-header { font-size: 12px; font-weight: 600; diff --git a/styles/components/actions/workflow_steps.ts b/styles/components/actions/workflow_steps.ts index 3d40f38..aef6607 100644 --- a/styles/components/actions/workflow_steps.ts +++ b/styles/components/actions/workflow_steps.ts @@ -17,12 +17,13 @@ * limitations under the License. */ -import { css, cssCombine, themeVars } from "@lutinglt/gitea-github-theme/core"; +import { css, cssCombine, otherThemeVars, themeVars } from "@lutinglt/gitea-github-theme/core"; import { animationDown } from "@lutinglt/gitea-github-theme/styles/common"; // 工作流右侧作业步骤日志详情 const actionViewRight = css` .action-view-right { + border-radius: ${otherThemeVars.border.radius}; box-shadow: ${themeVars.github.shadow.resting.small}; /* 提前加载高度和滚动条 */ min-height: calc(100vh - 245px); diff --git a/styles/components/actions/workflow_summary.ts b/styles/components/actions/workflow_summary.ts index 940bc1f..21d62f7 100644 --- a/styles/components/actions/workflow_summary.ts +++ b/styles/components/actions/workflow_summary.ts @@ -17,113 +17,167 @@ * limitations under the License. */ -import { css, cssCombine, themeVars } from "@lutinglt/gitea-github-theme/core"; +import { css, cssCombine, otherThemeVars, themeVars } from "@lutinglt/gitea-github-theme/core"; const summaryView = css` .action-view-right:has(.action-run-summary-view) { min-height: auto; } - .action-view-right .action-run-summary-view { - /* 工作流运行信息 */ - .action-run-summary-block { - background: ${themeVars.color.body}; - border-color: ${themeVars.color.console.border}; - > .flex-text-block { - /* 工作流触发方式和触发时间 */ - &:first-child { - font-size: 12px; - gap: 4px; - } - /* 工作流运行状态和运行时间 */ - &:last-child { - color: ${themeVars.color.console.fg.self}; - gap: 8px; - span { - font-weight: 600; - line-height: 1; - } - } - } - } - /* 流程图 */ - .workflow-graph { - /* 流程图工作流信息标题 */ - .graph-header { - background: ${themeVars.color.console.bg}; - border-bottom: 0; - padding: 16px; - gap: 16px; - /* 流程图标题(目前仅为解释, 内容为 Workflow Dependencies), 无需显示 */ - .graph-title { - display: none; - } - /* 流程图信息 */ - .graph-stats { - align-self: flex-start; - font-size: 12px; - column-gap: 4px; - } - /* 流程图操作按钮组 */ - > .flex-text-block { - gap: 8px; - .ui.compact.tiny.button { - width: 28px; - height: 28px; - min-height: 28px; - padding: 0; + .action-view-right:has(.action-run-summary-view) { + border-radius: ${otherThemeVars.border.radius}; + box-shadow: none; + .action-view-right-panel { + background: unset; + border: unset; + .action-run-summary-view { + > div { + border: 1px solid ${themeVars.color.console.border}; + border-radius: ${otherThemeVars.border.radius}; + box-shadow: ${themeVars.github.shadow.resting.small}; + margin-bottom: 16px; + &:last-child { + margin-bottom: 0; } } - } - /* 流程图 */ - .graph-container { - background: ${themeVars.color.console.bg}; - .graph-svg { - /* 节点之间的连线 */ - .node-edge { - stroke: ${themeVars.color.light.border}; - stroke-width: 2px; + /* 工作流运行信息 */ + .action-run-summary-block { + background: ${themeVars.color.body}; + padding: 16px; + > div { + gap: 4px; } - /* 高亮连线 */ - .highlighted-edge { - stroke-width: 3px !important; - } - &:has(.highlighted-edge) { - /* 有高亮线时, 降低其他线的颜色, 避免后面 path 未高亮元素遮挡高亮线 */ - .node-edge { - opacity: 0.3; - &.highlighted-edge { - opacity: 1; + /* 工作流触发信息 */ + > .action-run-summary-trigger { + .action-run-summary-trigger-content { + gap: 4px; + /* 工作流触发者头像 */ + .action-run-summary-user .ui.avatar { + border-radius: 9999px; + } + /* 工作流触发分支 */ + .action-run-summary-branch-label { + background: ${themeVars.github.bgColor.accent.muted}; + color: ${themeVars.github.fgColor.accent}; + min-height: unset; + line-height: unset; } } } - .job-node-group { - /* 节点 */ - .job-rect { - fill: ${themeVars.github.workflowCardBg}; - stroke-width: 1px; + /* 工作流运行时间 */ + > .action-run-summary-stat-divider + .action-run-summary-stat + .action-run-summary-stat { + .action-run-summary-stat-value { + text-decoration: underline; + text-underline-offset: 0.2rem; } - /* 节点上的端口 */ - .node-port { - r: 5.5; - fill: ${themeVars.github.bgColor.neutral.emphasis}; - stroke: ${themeVars.color.menu}; - stroke-width: 3px; + } + } + /* 流程图 */ + .workflow-graph { + /* 流程图工作流信息标题 */ + .graph-header { + border-top-left-radius: ${otherThemeVars.border.radius}; + border-top-right-radius: ${otherThemeVars.border.radius}; + padding: 16px; + /* 流程图信息 */ + .graph-stats { + font-size: 12px; + } + /* 流程图操作按钮组 */ + .graph-controls { + .ui.compact.tiny.button { + width: 28px; + height: 28px; + min-height: 28px; + padding: 0; + } } - &:hover { - filter: ${themeVars.github.shadow.resting.medium}; - /* 保留 Gitea 节点悬浮色, 因为无法实现 GitHub 悬浮时降低其他节点颜色 */ - .job-rect { - fill: ${themeVars.color.hover.self}; + } + /* 流程图 */ + .graph-container { + background: ${themeVars.color.console.bg}; + .graph-svg { + /* 节点之间的连线 */ + .node-edge { + stroke: ${themeVars.color.light.border}; + stroke-width: 2px; + opacity: 1; } - /* 节点上的端口 */ - .node-port { - fill: ${themeVars.color.workflowEdgeHover}; + /* 高亮连线 */ + .highlighted-edge { + stroke-width: 3px !important; + } + /* 高亮节点 */ + .job-node-group.related-node { + filter: ${themeVars.github.shadow.resting.medium}; + } + /* 统一节点上的端口 */ + .job-node-group, + .highlighted-edge-layer { + .node-port { + r: 5.5; + stroke: ${themeVars.color.menu}; + stroke-width: 3px; + } + } + .job-node-group { + /* 节点 */ + .job-rect { + fill: ${themeVars.github.workflowCardBg}; + stroke: ${themeVars.color.light.border}; + stroke-width: 1px; + } + /* 节点上的端口 */ + .node-port { + fill: ${themeVars.github.bgColor.neutral.emphasis}; + } + /* 节点上的步骤状态图标 */ + .job-row-main, + /* 任务组节点 */ + .graph-list-row-main, + /* 矩阵节点 */ + .matrix-panel-summary-row { + span { + line-height: 1; /* 使图标垂直居中 */ + } + } + /* 节点中的任务项 */ + .graph-list-row { + padding: 6px; + border-radius: ${otherThemeVars.border.radius}; + } + /* 矩阵节点 */ + .matrix-panel { + .matrix-panel-jobs { + padding: 6px 0 0 0; + } + .matrix-panel-collapsed { + padding: 10px 0 0 10px; + } + } + } + /* 高亮连线 */ + .highlighted-edge-layer { + /* 节点上的端口 */ + .node-port { + fill: ${themeVars.color.workflowEdgeHover}; + } + /* 节点之间的连线 */ + .node-edge { + stroke: ${themeVars.color.workflowEdgeHover}; + } } } - /* 节点上的步骤状态图标 */ - .job-status-icon-wrap { - span { - line-height: 1; /* 使图标垂直居中 */ + /* 流程图上有鼠标悬停时 */ + .graph-svg.has-hover { + .job-node-group:not(.related-node) { + opacity: 0.5; + .job-rect { + fill: ${themeVars.color.console.bg}; + stroke: ${themeVars.color.console.border}; + } + } + .node-edge:not(.highlighted-edge) { + opacity: 0.5; } } } diff --git a/styles/components/heatmap.ts b/styles/components/heatmap.ts index b2c958f..267a1c0 100644 --- a/styles/components/heatmap.ts +++ b/styles/components/heatmap.ts @@ -27,7 +27,8 @@ const heatmap = css` } .heatmap-footer { color: ${themeVars.color.text.light.num1}; - padding: 2px 20px 0px 25px; + padding-left: 20px; + padding-right: 8px; } > div { padding: 12px 20px; diff --git a/styles/public/transition.ts b/styles/public/transition.ts index 0b525f9..e84dd1c 100644 --- a/styles/public/transition.ts +++ b/styles/public/transition.ts @@ -39,6 +39,8 @@ const transition = css` .job-step-summary, .job-step-logs, .job-brief-item, + /* 流程图 */ + .workflow-graph svg rect, .repo-file-cell, .tippy-box .flex-items-block .item, .clone-panel-tab .item, From b27b7a1f94901c41cca276ce29dd7709d3267d88 Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 4 Jul 2026 00:24:40 +0800 Subject: [PATCH 05/16] Fix filter button overlaps with profile menu. #39 --- CHANGELOG.md | 3 ++- styles/components/actions/workflow_runs.ts | 2 +- styles/public/transition.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 476ef44..3d0affc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,4 +20,5 @@ ### 🐞 Fix -- Fix the issue where the branch menu under the manual workflow pop-up window is obscured. +- Fix filter button overlaps with profile menu. #39 +- Fix the issue where the branch menu under the manual workflow pop-up window is obscured. \ No newline at end of file diff --git a/styles/components/actions/workflow_runs.ts b/styles/components/actions/workflow_runs.ts index d57fa27..e0eb6b6 100644 --- a/styles/components/actions/workflow_runs.ts +++ b/styles/components/actions/workflow_runs.ts @@ -28,7 +28,7 @@ const actionViewHeader = css` font-size: 14px; } .ui.dropdown.compact.button { - z-index: 1; /* 避免被遮挡 */ + z-index: 11; /* 避免被遮挡 */ > .menu > .item { align-items: start; } diff --git a/styles/public/transition.ts b/styles/public/transition.ts index e84dd1c..0965ab4 100644 --- a/styles/public/transition.ts +++ b/styles/public/transition.ts @@ -95,7 +95,7 @@ const transition = css` } /* 下拉图标的过渡会导致在下移过程中出现的菜单被短暂遮挡 */ &.dropdown { - z-index: 999; + z-index: 1; } .button:active { transform: none; From 87646f5bb24677116e3ede9a23f14b37cdc65ec5 Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 4 Jul 2026 00:26:27 +0800 Subject: [PATCH 06/16] fix test --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d0affc..d80db8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,4 +21,4 @@ ### 🐞 Fix - Fix filter button overlaps with profile menu. #39 -- Fix the issue where the branch menu under the manual workflow pop-up window is obscured. \ No newline at end of file +- Fix the issue where the branch menu under the manual workflow pop-up window is obscured. From b8e1d73597dec8be57702617dd617289d2742f7f Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 4 Jul 2026 10:10:29 +0800 Subject: [PATCH 07/16] fix action step style & gitea workflow edge color --- styles/components/actions/workflow_steps.ts | 27 +++++++++------------ themes/giteaDark.ts | 4 ++- themes/giteaLight.ts | 4 ++- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/styles/components/actions/workflow_steps.ts b/styles/components/actions/workflow_steps.ts index aef6607..635be70 100644 --- a/styles/components/actions/workflow_steps.ts +++ b/styles/components/actions/workflow_steps.ts @@ -65,33 +65,28 @@ const actionViewRight = css` color: ${themeVars.color.console.fg.subtle}; padding: 8px !important; height: 36px; + gap: 12px; &.selected { /* 滚动时固定在顶部的高度与 job-info-header 高度相同 */ top: 80px; - } + /* 不被 hover 效果影响 */ + color: ${themeVars.color.console.fg.self} !important; + background-color: ${themeVars.color.console.activeBg} !important; - &.step-expandable:hover { - color: ${themeVars.color.console.fg.subtle}; } - - .tw-mr-2:not(.svg) svg.svg { - margin: 1.5px 6px 0px 2px; + /* 步骤标题三角号, 折叠展开图标 */ + > svg.step-summary-chevron { + margin: 0 !important; + } + /* 步骤状态图标 */ + > span:not([class]):has(svg) { + display: inline-flex; } /* 绿色步骤状态改为白色 */ svg.tw-text-green { color: ${themeVars.color.console.fg.subtle} !important; } - - &.selected { - /* 不被 hover 效果影响 */ - color: ${themeVars.color.console.fg.self} !important; - background-color: ${themeVars.color.console.activeBg} !important; - - svg.tw-text-green { - color: ${themeVars.color.console.fg.self} !important; - } - } /* 步骤耗时 */ .step-summary-duration { font-size: 12px; diff --git a/themes/giteaDark.ts b/themes/giteaDark.ts index 1cd4894..2784266 100644 --- a/themes/giteaDark.ts +++ b/themes/giteaDark.ts @@ -290,7 +290,9 @@ const other: Other = { overlayBackdrop: "#080808c0", danger: themeVars.color.red.self, transparency: { grid: { light: "#2a2a2a", dark: "#1a1a1a" } }, - workflowEdgeHover: "#666a73", + // workflowEdgeHover: "#666a73", + // 此颜色在 Gitea 中使用在 1.27 版本中出现偏差, CSS 高亮使用 primary 覆盖, 这里还原视觉效果与主题文件有偏差 + workflowEdgeHover: primary.self, }; export const giteaDarkColor: GiteaColor = { diff --git a/themes/giteaLight.ts b/themes/giteaLight.ts index 2d91f2e..8b045c8 100644 --- a/themes/giteaLight.ts +++ b/themes/giteaLight.ts @@ -290,7 +290,9 @@ const other: Other = { overlayBackdrop: "#080808c0", danger: themeVars.color.red.self, transparency: { grid: { light: "#fafafa", dark: "#e2e2e2" } }, - workflowEdgeHover: "#b1b7bd", + // workflowEdgeHover: "#b1b7bd", + // 此颜色在 Gitea 中使用在 1.27 版本中出现偏差, CSS 高亮使用 primary 覆盖, 这里还原视觉效果与主题文件有偏差 + workflowEdgeHover: primary.self, }; export const giteaLightColor: GiteaColor = { From 141fe31709c5a3dd78c19ebe8828e0eec6205b6e Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 4 Jul 2026 10:15:35 +0800 Subject: [PATCH 08/16] fix action button z-index --- styles/components/actions/workflow_runs.ts | 2 +- styles/components/actions/workflow_steps.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/styles/components/actions/workflow_runs.ts b/styles/components/actions/workflow_runs.ts index e0eb6b6..7954f41 100644 --- a/styles/components/actions/workflow_runs.ts +++ b/styles/components/actions/workflow_runs.ts @@ -28,7 +28,7 @@ const actionViewHeader = css` font-size: 14px; } .ui.dropdown.compact.button { - z-index: 11; /* 避免被遮挡 */ + z-index: 2; /* 避免被遮挡 */ > .menu > .item { align-items: start; } diff --git a/styles/components/actions/workflow_steps.ts b/styles/components/actions/workflow_steps.ts index 635be70..d898d11 100644 --- a/styles/components/actions/workflow_steps.ts +++ b/styles/components/actions/workflow_steps.ts @@ -73,7 +73,6 @@ const actionViewRight = css` /* 不被 hover 效果影响 */ color: ${themeVars.color.console.fg.self} !important; background-color: ${themeVars.color.console.activeBg} !important; - } /* 步骤标题三角号, 折叠展开图标 */ > svg.step-summary-chevron { From 1e4614a5dcad54e0ac989faba0da5c7d2df8944f Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 4 Jul 2026 10:26:56 +0800 Subject: [PATCH 09/16] update test --- .github/workflows/build.yml | 2 +- .github/workflows/pr.yml | 10 +++++----- .github/workflows/release.yml | 2 +- package.json | 5 +++-- src/palette/__snapshots__/gitea.test.ts.snap | 4 ++-- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73126fc..25cff57 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: dorny/paths-filter@v4 id: changes with: diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cf20109..3258df6 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -18,13 +18,13 @@ jobs: - vitest - build steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: oven-sh/setup-bun@v2 with: bun-version: "1.3.14" - - uses: actions/cache@v4 + - uses: actions/cache@v6 with: path: | node_modules @@ -34,13 +34,13 @@ jobs: - run: bun install - if: matrix.check == 'eslint' - run: bun eslint . + run: bun lint - if: matrix.check == 'prettier' - run: bun prettier --check . + run: bun fmt --check - if: matrix.check == 'tsgo' - run: bunx --bun tsgo -b + run: bun tsgo -b - if: matrix.check == 'vitest' run: bun vitest --run diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32425cf..9936953 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: oven-sh/setup-bun@v2 with: bun-version: "1.3.14" diff --git a/package.json b/package.json index f19013a..e8a87ef 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "./primer": "./primer/index.ts" }, "scripts": { - "lint": "bun eslint .", - "fmt": "bun prettier --write .", + "lint": "bunx --bun eslint .", + "fmt": "bunx --bun prettier --write .", "bundle": "tsgo -b && bunx --bun vite build", "dev": "bun bundle && bun sync:theme", "ci": "bun lint && bun bundle && bun vitest ", @@ -31,6 +31,7 @@ "update:primer": "bun scripts/buildPrimerTSToken.ts", "update:locale": "bun scripts/translate.ts", "update:gitea": "bun scripts/updateGitea.ts", + "update:snapshot": "bun vitest --update", "install:clean": "rm -rf node_modules bun.lock bun.lockb && bun install" }, "devDependencies": { diff --git a/src/palette/__snapshots__/gitea.test.ts.snap b/src/palette/__snapshots__/gitea.test.ts.snap index c677742..a65b3f0 100644 --- a/src/palette/__snapshots__/gitea.test.ts.snap +++ b/src/palette/__snapshots__/gitea.test.ts.snap @@ -385,7 +385,7 @@ exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 1`] = ` "text": "#d29922", }, "white": "#ffffff", - "workflowEdgeHover": "#666a73", + "workflowEdgeHover": "#4183c4", "yellow": { "badge": { "bg": "#fbbd081a", @@ -980,7 +980,7 @@ exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 2`] = ` "text": "#9a6700", }, "white": "#ffffff", - "workflowEdgeHover": "#b1b7bd", + "workflowEdgeHover": "#4183c4", "yellow": { "badge": { "bg": "#fbbd081a", From dbc61e7f8c0f0d8b8f69766bd06f93469e80265e Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 4 Jul 2026 11:10:20 +0800 Subject: [PATCH 10/16] optimize workflow graph --- styles/components/actions/workflow_summary.ts | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/styles/components/actions/workflow_summary.ts b/styles/components/actions/workflow_summary.ts index 21d62f7..24849b6 100644 --- a/styles/components/actions/workflow_summary.ts +++ b/styles/components/actions/workflow_summary.ts @@ -104,7 +104,7 @@ const summaryView = css` } /* 高亮连线 */ .highlighted-edge { - stroke-width: 3px !important; + stroke-width: 2.5px; } /* 高亮节点 */ .job-node-group.related-node { @@ -114,7 +114,7 @@ const summaryView = css` .job-node-group, .highlighted-edge-layer { .node-port { - r: 5.5; + r: 5; stroke: ${themeVars.color.menu}; stroke-width: 3px; } @@ -137,7 +137,7 @@ const summaryView = css` /* 矩阵节点 */ .matrix-panel-summary-row { span { - line-height: 1; /* 使图标垂直居中 */ + display: inline-flex; /* 使图标垂直居中 */ } } /* 节点中的任务项 */ @@ -145,13 +145,30 @@ const summaryView = css` padding: 6px; border-radius: ${otherThemeVars.border.radius}; } + .job-name, + .graph-list-row-name { + font-size: 12px; + } + .grouped-panel, + .matrix-panel { + padding: 6px 8px; /* 避免被端口遮挡 */ + } /* 矩阵节点 */ .matrix-panel { + .matrix-panel-label { + font-size: 10px; + color: ${themeVars.color.text.self}; + padding-left: 6px; + } .matrix-panel-jobs { padding: 6px 0 0 0; } .matrix-panel-collapsed { - padding: 10px 0 0 10px; + padding: 10px 0 0 8px; + .matrix-panel-toggle { + padding-left: 0; + padding-top: 4px; + } } } } From 15d38ea971f849096fd957cfb6cfb5bf205f9069 Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 4 Jul 2026 19:50:33 +0800 Subject: [PATCH 11/16] series 16 colors --- .github/workflows/pr.yml | 30 ++++- CHANGELOG.md | 2 + gitea/web_src/css/themes/theme-gitea-dark.css | 17 +++ .../web_src/css/themes/theme-gitea-light.css | 17 +++ package.json | 2 +- src/index.ts | 15 ++- .../__snapshots__/catppuccin.test.ts.snap | 112 +++++++++++++++--- src/palette/__snapshots__/gitea.test.ts.snap | 40 +++++++ src/palette/__snapshots__/github.test.ts.snap | 40 +++++++ src/palette/catppuccin.ts | 2 +- src/palette/gitea.ts | 4 +- src/palette/github.ts | 24 +++- src/palette/theme.ts | 23 +++- src/types/color/index.ts | 2 + src/types/color/series.ts | 37 ++++++ src/types/index.ts | 2 + src/types/vars.ts | 1 + styles/components/repo/commit.ts | 1 + themes/giteaDark.ts | 21 ++++ themes/giteaLight.ts | 21 ++++ 20 files changed, 385 insertions(+), 28 deletions(-) create mode 100644 src/types/color/series.ts diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3258df6..a64be79 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -33,17 +33,37 @@ jobs: - run: bun install - - if: matrix.check == 'eslint' + - name: Lint + if: matrix.check == 'eslint' run: bun lint - - if: matrix.check == 'prettier' + - name: Format check + if: matrix.check == 'prettier' run: bun fmt --check - - if: matrix.check == 'tsgo' + - name: Type check + if: matrix.check == 'tsgo' run: bun tsgo -b - - if: matrix.check == 'vitest' + - name: Test + if: matrix.check == 'vitest' run: bun vitest --run - - if: matrix.check == 'build' + - name: Build + id: build + if: matrix.check == 'build' run: bun bundle + + - name: Upload css assets + if: steps.build.outcome == 'success' + uses: actions/upload-artifact@v7 + with: + name: themes + path: dist/*.css + + - name: Upload templates assets + if: steps.build.outcome == 'success' + uses: actions/upload-artifact@v7 + with: + name: templates + path: templates diff --git a/CHANGELOG.md b/CHANGELOG.md index d80db8f..93acc57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ - Fix some border corner issues. - Fix the horizontal alignment issue of check boxes in some drop-down menus. - Optimize heat map style. +- Optimize transparency when stacking avatars. +- Synchronize the color of branches in Git commit graph. #### More GitHub-like style diff --git a/gitea/web_src/css/themes/theme-gitea-dark.css b/gitea/web_src/css/themes/theme-gitea-dark.css index 188a30c..f07d94c 100644 --- a/gitea/web_src/css/themes/theme-gitea-dark.css +++ b/gitea/web_src/css/themes/theme-gitea-dark.css @@ -141,6 +141,23 @@ gitea-theme-meta-info { --color-ansi-bright-magenta: #d74397; --color-ansi-bright-cyan: #00b6ad; --color-ansi-bright-white: var(--color-console-fg); + /* 16-color series */ + --color-series-16-0: #7db233; + --color-series-16-1: #499a37; + --color-series-16-2: #ce4751; + --color-series-16-3: #8f9121; + --color-series-16-4: #ac32a6; + --color-series-16-5: #7445e9; + --color-series-16-6: #c67d28; + --color-series-16-7: #4db392; + --color-series-16-8: #aa4d30; + --color-series-16-9: #2a6f84; + --color-series-16-10: #c45327; + --color-series-16-11: #3d965c; + --color-series-16-12: #792a93; + --color-series-16-13: #439d73; + --color-series-16-14: #103aad; + --color-series-16-15: #982e85; /* other colors */ --color-grey: #3d3f44; --color-grey-light: #898d96; diff --git a/gitea/web_src/css/themes/theme-gitea-light.css b/gitea/web_src/css/themes/theme-gitea-light.css index fb9b897..1bd7dd0 100644 --- a/gitea/web_src/css/themes/theme-gitea-light.css +++ b/gitea/web_src/css/themes/theme-gitea-light.css @@ -141,6 +141,23 @@ gitea-theme-meta-info { --color-ansi-bright-magenta: #d74397; --color-ansi-bright-cyan: #00b6ad; --color-ansi-bright-white: var(--color-console-fg); + /* 16-color series */ + --color-series-16-0: #7db233; + --color-series-16-1: #499a37; + --color-series-16-2: #ce4751; + --color-series-16-3: #8f9121; + --color-series-16-4: #ac32a6; + --color-series-16-5: #7445e9; + --color-series-16-6: #c67d28; + --color-series-16-7: #4db392; + --color-series-16-8: #aa4d30; + --color-series-16-9: #2a6f84; + --color-series-16-10: #c45327; + --color-series-16-11: #3d965c; + --color-series-16-12: #792a93; + --color-series-16-13: #439d73; + --color-series-16-14: #103aad; + --color-series-16-15: #982e85; /* other colors */ --color-grey: #697077; --color-grey-light: #7c838a; diff --git a/package.json b/package.json index e8a87ef..0082c22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lutinglt/gitea-github-theme", - "version": "1.26.3", + "version": "1.27.0-rc0", "license": "Apache-2.0", "author": { "name": "lutinglt", diff --git a/src/index.ts b/src/index.ts index 6f47ee1..32da3c7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -30,7 +30,20 @@ export { } from "./palette"; export type { DisplayColor, GitHubColor, GiteaColor, ThemeColor } from "./palette"; export { chromaVars, customThemeVars, otherThemeVars, syntaxVars, themeVars } from "./types"; -export type { Ansi, Chroma, Console, Diff, GitHub, Message, Named, Other, Primary, Secondary, Syntax } from "./types"; +export type { + Ansi, + Chroma, + Console, + Diff, + GitHub, + Message, + Named, + Other, + Primary, + Secondary, + Series16, + Syntax, +} from "./types"; export { deepOverride } from "./utils"; export { defineThemeConfig } from "./vite-plugin/themeConfig"; export { selectors }; diff --git a/src/palette/__snapshots__/catppuccin.test.ts.snap b/src/palette/__snapshots__/catppuccin.test.ts.snap index 3658ae5..8827b91 100644 --- a/src/palette/__snapshots__/catppuccin.test.ts.snap +++ b/src/palette/__snapshots__/catppuccin.test.ts.snap @@ -192,11 +192,11 @@ exports[`catppuccin 暗/亮模式语义 > light 主题 base.black 应为深色 1 }, "olive": { "dark": { - "num1": "hsla(115, 54%, 68%, 1)", - "num2": "hsla(115, 54%, 61%, 1)", + "num1": "hsla(66, 49%, 70%, 1)", + "num2": "hsla(66, 49%, 62%, 1)", }, - "light": "hsla(115, 54%, 80%, 1)", - "self": "#a6e3a1", + "light": "hsla(66, 49%, 81%, 1)", + "self": "rgba(220, 226, 170, 1)", }, "orange": { "badge": { @@ -332,6 +332,26 @@ exports[`catppuccin 暗/亮模式语义 > light 主题 base.black 应为深色 1 }, "secondaryBg": "unset", "secondaryNavBg": "var(--color-body)", + "series": { + "num16": { + "num0": "#a6e3a1", + "num1": "hsla(115, 54%, 67%, 1)", + "num10": "hsla(23, 92%, 66%, 1)", + "num11": "hsla(115, 54%, 58%, 1)", + "num12": "#cba6f7", + "num13": "hsla(170, 57%, 65%, 1)", + "num14": "#89b4fa", + "num15": "hsla(316, 72%, 76%, 1)", + "num2": "#f38ba8", + "num3": "rgba(220, 226, 170, 1)", + "num4": "#f5c2e7", + "num5": "#b4befe", + "num6": "#fab387", + "num7": "#94e2d5", + "num8": "#f2cdcd", + "num9": "#89dceb", + }, + }, "shadow": { "opaque": "var(--color-shadow)", "self": "rgba(17, 17, 27, 0.1)", @@ -787,11 +807,11 @@ exports[`catppuccin 暗/亮模式语义 > light 主题 base.black 应为深色 2 }, "olive": { "dark": { - "num1": "hsla(109, 58%, 36%, 1)", - "num2": "hsla(109, 58%, 32%, 1)", + "num1": "hsla(51, 66%, 35%, 1)", + "num2": "hsla(51, 66%, 32%, 1)", }, - "light": "hsla(109, 58%, 55%, 1)", - "self": "#40a02b", + "light": "hsla(51, 66%, 55%, 1)", + "self": "rgba(167, 148, 34, 1)", }, "orange": { "badge": { @@ -927,6 +947,26 @@ exports[`catppuccin 暗/亮模式语义 > light 主题 base.black 应为深色 2 }, "secondaryBg": "unset", "secondaryNavBg": "var(--color-body)", + "series": { + "num16": { + "num0": "#40a02b", + "num1": "hsla(109, 58%, 35%, 1)", + "num10": "hsla(22, 99%, 46%, 1)", + "num11": "hsla(109, 58%, 30%, 1)", + "num12": "#8839ef", + "num13": "hsla(183, 74%, 30%, 1)", + "num14": "#1e66f5", + "num15": "hsla(316, 73%, 61%, 1)", + "num2": "#d20f39", + "num3": "rgba(167, 148, 34, 1)", + "num4": "#ea76cb", + "num5": "#7287fd", + "num6": "#fe640b", + "num7": "#179299", + "num8": "#dd7878", + "num9": "#04a5e5", + }, + }, "shadow": { "opaque": "var(--color-shadow)", "self": "rgba(220, 224, 232, 0.1)", @@ -1382,11 +1422,11 @@ exports[`catppuccin 暗/亮模式语义 > light 主题 base.black 应为深色 3 }, "olive": { "dark": { - "num1": "hsla(96, 44%, 61%, 1)", - "num2": "hsla(96, 44%, 54%, 1)", + "num1": "hsla(56, 40%, 62%, 1)", + "num2": "hsla(56, 40%, 55%, 1)", }, - "light": "hsla(96, 44%, 73%, 1)", - "self": "#a6d189", + "light": "hsla(56, 40%, 73%, 1)", + "self": "rgba(207, 203, 142, 1)", }, "orange": { "badge": { @@ -1522,6 +1562,26 @@ exports[`catppuccin 暗/亮模式语义 > light 主题 base.black 应为深色 3 }, "secondaryBg": "unset", "secondaryNavBg": "var(--color-body)", + "series": { + "num16": { + "num0": "#a6d189", + "num1": "hsla(96, 44%, 60%, 1)", + "num10": "hsla(20, 79%, 62%, 1)", + "num11": "hsla(96, 44%, 52%, 1)", + "num12": "#ca9ee6", + "num13": "hsla(172, 39%, 57%, 1)", + "num14": "#8caaee", + "num15": "hsla(316, 73%, 74%, 1)", + "num2": "#e78284", + "num3": "rgba(207, 203, 142, 1)", + "num4": "#f4b8e4", + "num5": "#babbf1", + "num6": "#ef9f76", + "num7": "#81c8be", + "num8": "#eebebe", + "num9": "#99d1db", + }, + }, "shadow": { "opaque": "var(--color-shadow)", "self": "rgba(35, 38, 52, 0.1)", @@ -1977,11 +2037,11 @@ exports[`catppuccin 暗/亮模式语义 > light 主题 base.black 应为深色 4 }, "olive": { "dark": { - "num1": "hsla(105, 48%, 65%, 1)", - "num2": "hsla(105, 48%, 58%, 1)", + "num1": "hsla(61, 41%, 65%, 1)", + "num2": "hsla(61, 41%, 58%, 1)", }, - "light": "hsla(105, 48%, 76%, 1)", - "self": "#a6da95", + "light": "hsla(61, 41%, 77%, 1)", + "self": "rgba(213, 214, 156, 1)", }, "orange": { "badge": { @@ -2117,6 +2177,26 @@ exports[`catppuccin 暗/亮模式语义 > light 主题 base.black 应为深色 4 }, "secondaryBg": "unset", "secondaryNavBg": "var(--color-body)", + "series": { + "num16": { + "num0": "#a6da95", + "num1": "hsla(105, 48%, 63%, 1)", + "num10": "hsla(21, 86%, 64%, 1)", + "num11": "hsla(105, 48%, 55%, 1)", + "num12": "#c6a0f6", + "num13": "hsla(171, 47%, 61%, 1)", + "num14": "#8aadf4", + "num15": "hsla(316, 74%, 75%, 1)", + "num2": "#ed8796", + "num3": "rgba(213, 214, 156, 1)", + "num4": "#f5bde6", + "num5": "#b7bdf8", + "num6": "#f5a97f", + "num7": "#8bd5ca", + "num8": "#f0c6c6", + "num9": "#91d7e3", + }, + }, "shadow": { "opaque": "var(--color-shadow)", "self": "rgba(24, 25, 38, 0.1)", diff --git a/src/palette/__snapshots__/gitea.test.ts.snap b/src/palette/__snapshots__/gitea.test.ts.snap index a65b3f0..025dd99 100644 --- a/src/palette/__snapshots__/gitea.test.ts.snap +++ b/src/palette/__snapshots__/gitea.test.ts.snap @@ -332,6 +332,26 @@ exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 1`] = ` }, "secondaryBg": "#2e3033", "secondaryNavBg": "#1a1b1e", + "series": { + "num16": { + "num0": "#7db233", + "num1": "#499a37", + "num10": "#c45327", + "num11": "#3d965c", + "num12": "#792a93", + "num13": "#439d73", + "num14": "#103aad", + "num15": "#982e85", + "num2": "#ce4751", + "num3": "#8f9121", + "num4": "#ac32a6", + "num5": "#7445e9", + "num6": "#c67d28", + "num7": "#4db392", + "num8": "#aa4d30", + "num9": "#2a6f84", + }, + }, "shadow": { "opaque": "#0b0b0c", "self": "#0b0b0c58", @@ -927,6 +947,26 @@ exports[`gitea2ThemeVars > dark 输出含 color 和 github 顶层键 2`] = ` }, "secondaryBg": "#f2f5f8", "secondaryNavBg": "#f9fafb", + "series": { + "num16": { + "num0": "#7db233", + "num1": "#499a37", + "num10": "#c45327", + "num11": "#3d965c", + "num12": "#792a93", + "num13": "#439d73", + "num14": "#103aad", + "num15": "#982e85", + "num2": "#ce4751", + "num3": "#8f9121", + "num4": "#ac32a6", + "num5": "#7445e9", + "num6": "#c67d28", + "num7": "#4db392", + "num8": "#aa4d30", + "num9": "#2a6f84", + }, + }, "shadow": { "opaque": "#c7ced5", "self": "#00001726", diff --git a/src/palette/__snapshots__/github.test.ts.snap b/src/palette/__snapshots__/github.test.ts.snap index 4b729bc..830a82d 100644 --- a/src/palette/__snapshots__/github.test.ts.snap +++ b/src/palette/__snapshots__/github.test.ts.snap @@ -332,6 +332,26 @@ exports[`github2ThemeColor > dark isDarkTheme 为 true 1`] = ` }, "secondaryBg": "unset", "secondaryNavBg": "var(--color-body)", + "series": { + "num16": { + "num0": "#7dae37", + "num1": "#41b445", + "num10": "#c46212", + "num11": "#1bb673", + "num12": "#d07ef7", + "num13": "#14714c", + "num14": "#4da0ff", + "num15": "#ac2f74", + "num2": "#f27d83", + "num3": "#a2a626", + "num4": "#e57bb2", + "num5": "#b687f7", + "num6": "#ed8326", + "num7": "#1cb0ab", + "num8": "#984b10", + "num9": "#07ace4", + }, + }, "shadow": { "opaque": "var(--color-shadow)", "self": "#01040966", @@ -927,6 +947,26 @@ exports[`github2ThemeColor > dark isDarkTheme 为 true 2`] = ` }, "secondaryBg": "unset", "secondaryNavBg": "var(--color-body)", + "series": { + "num16": { + "num0": "#476c28", + "num1": "#2b6e3f", + "num10": "#b8500f", + "num11": "#156f4b", + "num12": "#961edc", + "num13": "#167e53", + "num14": "#005fcc", + "num15": "#ce2c85", + "num2": "#c50d28", + "num3": "#56682c", + "num4": "#b12f79", + "num5": "#783ae4", + "num6": "#a24610", + "num7": "#106e75", + "num8": "#b8500f", + "num9": "#006a80", + }, + }, "shadow": { "opaque": "var(--color-shadow)", "self": "#25292e0a", diff --git a/src/palette/catppuccin.ts b/src/palette/catppuccin.ts index 723b6b2..b0eac60 100644 --- a/src/palette/catppuccin.ts +++ b/src/palette/catppuccin.ts @@ -277,7 +277,7 @@ export function catppuccin2ThemeColor(flavor: CatppuccinFlavor): ThemeColor { red: flavor.colors.red.hex, orange: flavor.colors.peach.hex, yellow: flavor.colors.yellow.hex, - olive: flavor.colors.green.hex, + olive: mix(flavor.colors.yellow.hex, flavor.colors.green.hex, 0.35), green: flavor.colors.green.hex, teal: flavor.colors.teal.hex, cyan: flavor.colors.sky.hex, diff --git a/src/palette/gitea.ts b/src/palette/gitea.ts index 6330f29..73d463c 100644 --- a/src/palette/gitea.ts +++ b/src/palette/gitea.ts @@ -20,7 +20,7 @@ import { opacify, saturate } from "color2k"; import type { ThemeVars } from "../core"; import { scaleColorLight } from "../functions"; -import type { Ansi, Console, Diff, GitHub, Message, Named, Other, Primary, Secondary } from "../types"; +import type { Ansi, Console, Diff, GitHub, Message, Named, Other, Primary, Secondary, Series16 } from "../types"; import { themeVars } from "../types"; import { type DeepPartial, deepOverride } from "../utils"; @@ -34,6 +34,7 @@ export type GiteaColor = { console: Console; diff: Diff; other: Other; + series16: Series16; /** 自定义 GitHub 主题变量映射,未填写的字段自动使用默认值 */ github?: DeepPartial; }; @@ -178,6 +179,7 @@ export function gitea2ThemeVars(giteaColor: GiteaColor): ThemeVars { ansi: giteaColor.ansi, console: giteaColor.console, diff: giteaColor.diff, + series: { num16: giteaColor.series16 }, }, github: deepOverride(github, giteaColor.github ?? {}), }; diff --git a/src/palette/github.ts b/src/palette/github.ts index a6f3d01..24339ea 100644 --- a/src/palette/github.ts +++ b/src/palette/github.ts @@ -20,7 +20,7 @@ import type { Primer } from "@lutinglt/gitea-github-theme/primer"; import { mix, saturate } from "color2k"; import { scaleColorLight } from "../functions"; -import type { Ansi, Console, Diff, GitHub, Message, Other } from "../types"; +import type { Ansi, Console, Diff, GitHub, Message, Other, Series16 } from "../types"; import { themeVars } from "../types"; import type { ThemeColor } from "./theme"; @@ -175,6 +175,26 @@ export function github2ThemeColor(githubColor: GitHubColor): ThemeColor { transparency: { grid: { light: "#ffffff", dark: "#e5e5e5" } }, workflowEdgeHover: githubColor.bgColor.accent.emphasis, }; + + const series16: Series16 = { + num0: githubColor.display.lime.fgColor, + num1: githubColor.display.green.fgColor, + num2: githubColor.display.red.fgColor, + num3: githubColor.display.olive.fgColor, + num4: githubColor.display.pink.fgColor, + num5: githubColor.display.purple.fgColor, + num6: githubColor.display.orange.fgColor, + num7: githubColor.display.teal.fgColor, + num8: githubColor.display.orange.bgColor.emphasis, + num9: githubColor.display.cyan.fgColor, + num10: githubColor.display.orange.borderColor.emphasis, + num11: githubColor.display.pine.fgColor, + num12: githubColor.display.plum.fgColor, + num13: githubColor.display.pine.bgColor.emphasis, + num14: githubColor.display.blue.fgColor, + num15: githubColor.display.pink.bgColor.emphasis, + }; + const github: GitHub = { avatar: { bgColor: githubColor.avatar.bgColor, borderColor: githubColor.avatar.borderColor }, fgColor: { @@ -337,6 +357,6 @@ export function github2ThemeColor(githubColor: GitHubColor): ThemeColor { diff, other, github, - override: { message, ansi }, + override: { message, ansi, series16 }, }; } diff --git a/src/palette/theme.ts b/src/palette/theme.ts index 92c2986..684ec25 100644 --- a/src/palette/theme.ts +++ b/src/palette/theme.ts @@ -20,13 +20,14 @@ import { saturate } from "color2k"; import type { ThemeVars } from "../core"; import { rgba, scaleColorLight } from "../functions"; -import type { Ansi, Console, Diff, GitHub, Message, Named, Other, Primary, Secondary } from "../types"; +import type { Ansi, Console, Diff, GitHub, Message, Named, Other, Primary, Secondary, Series16 } from "../types"; import { themeVars } from "../types"; type OverrideColor = { ansi?: Ansi; message?: Message; named?: Named; + series16?: Series16; }; export type ThemeColor = { /** 用于标识当前是否为暗色主题: `true` 暗色 `false` 亮色 */ @@ -374,6 +375,25 @@ export function theme2ThemeVars(themeColor: ThemeColor): ThemeVars { white: themeVars.color.console.fg.self, }, }; + /** AI 仿照 Gitea 的色值映射 */ + const series16: Series16 = themeColor.override?.series16 ?? { + num0: themeColor.base.green, + num1: scaleColorLight(themeColor.base.green, -12), + num2: themeColor.base.red, + num3: themeColor.base.olive, + num4: themeColor.base.pink, + num5: themeColor.base.violet, + num6: themeColor.base.orange, + num7: themeColor.base.teal, + num8: themeColor.base.brown, + num9: themeColor.base.cyan, + num10: scaleColorLight(themeColor.base.orange, -12), + num11: scaleColorLight(themeColor.base.green, -24), + num12: themeColor.base.purple, + num13: scaleColorLight(themeColor.base.teal, -12), + num14: themeColor.base.blue, + num15: scaleColorLight(themeColor.base.pink, -12), + }; return { isDarkTheme: themeColor.isDarkTheme, @@ -384,6 +404,7 @@ export function theme2ThemeVars(themeColor: ThemeColor): ThemeVars { ansi, console: themeColor.console, diff: themeColor.diff, + series: { num16: series16 }, ...message, ...themeColor.other, }, diff --git a/src/types/color/index.ts b/src/types/color/index.ts index 2f0be01..9418eae 100644 --- a/src/types/color/index.ts +++ b/src/types/color/index.ts @@ -26,6 +26,7 @@ import { primary, secondary } from "./main"; import { message } from "./message"; import { named } from "./named"; import { other, otherAuto } from "./other"; +import { series16 } from "./series"; import { syntax } from "./syntax"; export default { @@ -42,4 +43,5 @@ export default { other, otherAuto, syntax, + series16, }; diff --git a/src/types/color/series.ts b/src/types/color/series.ts new file mode 100644 index 0000000..ca694de --- /dev/null +++ b/src/types/color/series.ts @@ -0,0 +1,37 @@ +/*! + * Copyright (c) https://github.com/lutinglt + * + * See the NOTICE file distributed with this work for additional + * information regarding copyright ownership. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const series16 = { + num0: null, + num1: null, + num2: null, + num3: null, + num4: null, + num5: null, + num6: null, + num7: null, + num8: null, + num9: null, + num10: null, + num11: null, + num12: null, + num13: null, + num14: null, + num15: null, +}; diff --git a/src/types/index.ts b/src/types/index.ts index af28342..a4ea457 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -42,6 +42,8 @@ export type Console = MapLeafNodes; export type Diff = MapLeafNodes; /** 其他颜色 */ export type Other = MapLeafNodes; +/** 16 色调色板 */ +export type Series16 = MapLeafNodes; /** 仅限本主题的 GitHub 颜色 */ export type GitHub = MapLeafNodes; diff --git a/src/types/vars.ts b/src/types/vars.ts index 0b6f184..8a1b1c7 100644 --- a/src/types/vars.ts +++ b/src/types/vars.ts @@ -44,6 +44,7 @@ const vars = { ansi: color.ansi, console: color.console, diff: color.diff, + series: { num16: color.series16 }, }, github: color.github, }; diff --git a/styles/components/repo/commit.ts b/styles/components/repo/commit.ts index e2e310b..dea5aaa 100644 --- a/styles/components/repo/commit.ts +++ b/styles/components/repo/commit.ts @@ -28,6 +28,7 @@ const commit = css` .author { img.ui.avatar { border-radius: 9999px; + backdrop-filter: blur(12px); } /* 作者名称 */ .author-wrapper { diff --git a/themes/giteaDark.ts b/themes/giteaDark.ts index 2784266..bed4e96 100644 --- a/themes/giteaDark.ts +++ b/themes/giteaDark.ts @@ -31,6 +31,7 @@ import type { Other, Primary, Secondary, + Series16, Syntax, } from "@lutinglt/gitea-github-theme/core"; import { defineTheme, themeVars } from "@lutinglt/gitea-github-theme/core"; @@ -295,6 +296,25 @@ const other: Other = { workflowEdgeHover: primary.self, }; +const series16: Series16 = { + num0: "#7db233", + num1: "#499a37", + num2: "#ce4751", + num3: "#8f9121", + num4: "#ac32a6", + num5: "#7445e9", + num6: "#c67d28", + num7: "#4db392", + num8: "#aa4d30", + num9: "#2a6f84", + num10: "#c45327", + num11: "#3d965c", + num12: "#792a93", + num13: "#439d73", + num14: "#103aad", + num15: "#982e85", +}; + export const giteaDarkColor: GiteaColor = { isDarkTheme: true, primary, @@ -305,6 +325,7 @@ export const giteaDarkColor: GiteaColor = { console, diff, other, + series16, }; export const giteaDarkSyntax: Syntax = { diff --git a/themes/giteaLight.ts b/themes/giteaLight.ts index 8b045c8..caf2d9e 100644 --- a/themes/giteaLight.ts +++ b/themes/giteaLight.ts @@ -31,6 +31,7 @@ import type { Other, Primary, Secondary, + Series16, Syntax, } from "@lutinglt/gitea-github-theme/core"; import { defineTheme, themeVars } from "@lutinglt/gitea-github-theme/core"; @@ -295,6 +296,25 @@ const other: Other = { workflowEdgeHover: primary.self, }; +const series16: Series16 = { + num0: "#7db233", + num1: "#499a37", + num2: "#ce4751", + num3: "#8f9121", + num4: "#ac32a6", + num5: "#7445e9", + num6: "#c67d28", + num7: "#4db392", + num8: "#aa4d30", + num9: "#2a6f84", + num10: "#c45327", + num11: "#3d965c", + num12: "#792a93", + num13: "#439d73", + num14: "#103aad", + num15: "#982e85", +}; + export const giteaLightColor: GiteaColor = { isDarkTheme: false, primary, @@ -305,6 +325,7 @@ export const giteaLightColor: GiteaColor = { console, diff, other, + series16, }; export const giteaLightSyntax: Syntax = { From 9f07983f4cecc484b08287b8755cd8e7ddc2f6a4 Mon Sep 17 00:00:00 2001 From: lutinglt Date: Sat, 4 Jul 2026 20:08:58 +0800 Subject: [PATCH 12/16] optimize author name & avatar --- styles/components/repo/commit.ts | 10 ++-------- styles/public/other.ts | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/styles/components/repo/commit.ts b/styles/components/repo/commit.ts index dea5aaa..d6c4962 100644 --- a/styles/components/repo/commit.ts +++ b/styles/components/repo/commit.ts @@ -25,16 +25,10 @@ const commit = css` /* 提交列表 (选择器保证同等优先级覆盖了 gitea 原生的样式) */ .ui.attached.table.segment.commit-table tbody.commit-list { /* 作者 */ - .author { + .author .avatar-stack-names { + color: ${themeVars.color.text.light.num1}; img.ui.avatar { border-radius: 9999px; - backdrop-filter: blur(12px); - } - /* 作者名称 */ - .author-wrapper { - display: flex; - color: ${themeVars.color.text.light.num1}; - overflow: visible; } } /* SHA 标签 */ diff --git a/styles/public/other.ts b/styles/public/other.ts index e5581c6..6ac953e 100644 --- a/styles/public/other.ts +++ b/styles/public/other.ts @@ -69,6 +69,7 @@ const avatar = css` .ui.avatar svg { background-color: ${themeVars.github.avatar.bgColor}; box-shadow: 0 0 0 1px ${themeVars.github.avatar.borderColor}; + backdrop-filter: blur(12px); } `; // 切换按钮 From 6d42116c4500ea98b47d564f85656490c1c615df Mon Sep 17 00:00:00 2001 From: lutinglt Date: Mon, 6 Jul 2026 00:01:30 +0800 Subject: [PATCH 13/16] sync pr panel & workflow summary --- CHANGELOG.md | 2 + styles/components/actions/workflow_runs.ts | 50 +++++- styles/components/actions/workflow_steps.ts | 166 +++++++++--------- styles/components/actions/workflow_summary.ts | 16 +- styles/components/issues/issue.ts | 126 +------------ styles/components/issues/issue_comment.ts | 116 +++++++++++- styles/components/setting.ts | 4 +- styles/public/label/checkbox_label.ts | 2 +- styles/public/other.ts | 21 +-- 9 files changed, 269 insertions(+), 234 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93acc57..3e8e4c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### 🌈 Style - Reduce the displacement when the button is clicked. +- Remove the shadow of the administrator interface button. #### Adaptation for version 1.27 @@ -11,6 +12,7 @@ - Optimize heat map style. - Optimize transparency when stacking avatars. - Synchronize the color of branches in Git commit graph. +- Synchronize PR operation comment panel style. #### More GitHub-like style diff --git a/styles/components/actions/workflow_runs.ts b/styles/components/actions/workflow_runs.ts index 7954f41..bd6e5a5 100644 --- a/styles/components/actions/workflow_runs.ts +++ b/styles/components/actions/workflow_runs.ts @@ -28,7 +28,7 @@ const actionViewHeader = css` font-size: 14px; } .ui.dropdown.compact.button { - z-index: 2; /* 避免被遮挡 */ + z-index: 3; /* 避免被遮挡, 比 ActionViewLeft 的 z-index 高 */ > .menu > .item { align-items: start; } @@ -155,5 +155,51 @@ const actionViewLeftMobile = css` } } `; +// 工作流顶部作业输出的总结信息 +const actionViewJobSummary = css` + .action-view-right.action-view-right { + gap: 16px; + .action-view-right-panel.job-summary-section { + overflow: visible; + .job-summary-section-header { + display: none; + } + /* 作业输出总结列表 */ + .job-summary-list { + padding: 0; + gap: 16px; + .job-summary-item { + padding: 0; + background: ${themeVars.color.body}; + box-shadow: ${themeVars.github.shadow.resting.small}; + border: 1px solid ${themeVars.color.light.border}; + border-radius: ${otherThemeVars.border.radius}; + /* 作业名称 */ + .job-summary-header { + background: ${themeVars.color.box.header}; + border-top-left-radius: ${otherThemeVars.border.radius}; + border-top-right-radius: ${otherThemeVars.border.radius}; + border-bottom: 1px solid ${themeVars.color.light.border}; + padding: 12px 20px; + margin-bottom: 0; + font-size: 16px; + font-weight: 600; + &::after { + content: "summary"; + font-size: inherit; + font-weight: inherit; + display: inline; + margin-left: 4px; + } + } + /* 作业输出总结内容 */ + .job-summary-body { + padding: 16px 20px; + } + } + } + } + } +`; -export default cssCombine(actionViewHeader, actionViewLeft, actionViewLeftMobile); +export default cssCombine(actionViewHeader, actionViewLeft, actionViewLeftMobile, actionViewJobSummary); diff --git a/styles/components/actions/workflow_steps.ts b/styles/components/actions/workflow_steps.ts index d898d11..294c938 100644 --- a/styles/components/actions/workflow_steps.ts +++ b/styles/components/actions/workflow_steps.ts @@ -23,100 +23,102 @@ import { animationDown } from "@lutinglt/gitea-github-theme/styles/common"; // 工作流右侧作业步骤日志详情 const actionViewRight = css` .action-view-right { - border-radius: ${otherThemeVars.border.radius}; - box-shadow: ${themeVars.github.shadow.resting.small}; /* 提前加载高度和滚动条 */ min-height: calc(100vh - 245px); - /* 作业详情页标题 */ - .job-info-header { - padding: 16px 12px 16px 24px !important; - height: 80px !important; - .job-info-header-left { - .job-info-header-title { - color: ${themeVars.github.fgColor.accent} !important; - } - .job-info-header-detail { - margin-top: 8px; + .action-view-right-panel { + border-radius: ${otherThemeVars.border.radius}; + box-shadow: ${themeVars.github.shadow.resting.small}; + /* 作业详情页标题 */ + .job-info-header { + padding: 16px 12px 16px 24px !important; + height: 80px !important; + .job-info-header-left { + .job-info-header-title { + color: ${themeVars.github.fgColor.accent} !important; + } + .job-info-header-detail { + margin-top: 8px; + } } - } - .job-info-header-right { - .ui.dropdown { - > .button { - background: unset; - border: unset; - padding: 7px !important; - &:hover { - background: ${themeVars.github.control.transparent.bgColor.hover}; + .job-info-header-right { + .ui.dropdown { + > .button { + background: unset; + border: unset; + padding: 7px !important; + &:hover { + background: ${themeVars.github.control.transparent.bgColor.hover}; + } + } + .menu > .item > i.icon { + margin-right: 2px; } - } - .menu > .item > i.icon { - margin-right: 2px; } } } - } - .job-step-container { - padding: 8px; - .job-step-section { - margin: 0 4px 4px; - /* 步骤标题, 双重确保覆盖原始样式 */ - .job-step-summary.job-step-summary { - color: ${themeVars.color.console.fg.subtle}; - padding: 8px !important; - height: 36px; - gap: 12px; + .job-step-container { + padding: 8px; + .job-step-section { + margin: 0 4px 4px; + /* 步骤标题, 双重确保覆盖原始样式 */ + .job-step-summary.job-step-summary { + color: ${themeVars.color.console.fg.subtle}; + padding: 8px !important; + height: 36px; + gap: 12px; - &.selected { - /* 滚动时固定在顶部的高度与 job-info-header 高度相同 */ - top: 80px; - /* 不被 hover 效果影响 */ - color: ${themeVars.color.console.fg.self} !important; - background-color: ${themeVars.color.console.activeBg} !important; - } - /* 步骤标题三角号, 折叠展开图标 */ - > svg.step-summary-chevron { - margin: 0 !important; - } - /* 步骤状态图标 */ - > span:not([class]):has(svg) { - display: inline-flex; - } - /* 绿色步骤状态改为白色 */ - svg.tw-text-green { - color: ${themeVars.color.console.fg.subtle} !important; - } - /* 步骤耗时 */ - .step-summary-duration { - font-size: 12px; - font-family: var(--fonts-monospace); + &.selected { + /* 滚动时固定在顶部的高度与 job-info-header 高度相同 */ + top: 80px; + /* 不被 hover 效果影响 */ + color: ${themeVars.color.console.fg.self} !important; + background-color: ${themeVars.color.console.activeBg} !important; + } + /* 步骤标题三角号, 折叠展开图标 */ + > svg.step-summary-chevron { + margin: 0 !important; + } + /* 步骤状态图标 */ + > span:not([class]):has(svg) { + display: inline-flex; + } + /* 绿色步骤状态改为白色 */ + svg.tw-text-green { + color: ${themeVars.color.console.fg.subtle} !important; + } + /* 步骤耗时 */ + .step-summary-duration { + font-size: 12px; + font-family: var(--fonts-monospace); + } } - } - /* 步骤日志 */ - .job-step-logs { - ${animationDown}; - /* 日志字体颜色白色 */ - .job-log-line { - color: ${themeVars.color.console.fg.self}; - /* 日志 */ - .log-msg:hover { - /*被 hover 时覆盖 ANSI 颜色 */ - * { - color: ${themeVars.color.console.fg.self}; - } - /* 日志超链接 */ - a:hover { - color: ${themeVars.color.primary.self} !important; + /* 步骤日志 */ + .job-step-logs { + ${animationDown}; + /* 日志字体颜色白色 */ + .job-log-line { + color: ${themeVars.color.console.fg.self}; + /* 日志 */ + .log-msg:hover { + /*被 hover 时覆盖 ANSI 颜色 */ + * { + color: ${themeVars.color.console.fg.self}; + } + /* 日志超链接 */ + a:hover { + color: ${themeVars.color.primary.self} !important; + } } } - } - /* 可展开折叠的日志 */ - .job-log-group { - /* 日志所属的命令 */ - .job-log-group-summary { - /* summary 的 三角号对齐, 而不是偏左 */ - /* job-step-summary padding 8px + SVG 16px */ - padding-left: calc(8px + 16px); + /* 可展开折叠的日志 */ + .job-log-group { + /* 日志所属的命令 */ + .job-log-group-summary { + /* summary 的 三角号对齐, 而不是偏左 */ + /* job-step-summary padding 8px + SVG 16px */ + padding-left: calc(8px + 16px); + } } } } diff --git a/styles/components/actions/workflow_summary.ts b/styles/components/actions/workflow_summary.ts index 24849b6..5d8c422 100644 --- a/styles/components/actions/workflow_summary.ts +++ b/styles/components/actions/workflow_summary.ts @@ -24,14 +24,13 @@ const summaryView = css` min-height: auto; } .action-view-right:has(.action-run-summary-view) { - border-radius: ${otherThemeVars.border.radius}; - box-shadow: none; .action-view-right-panel { background: unset; + box-shadow: none; border: unset; .action-run-summary-view { > div { - border: 1px solid ${themeVars.color.console.border}; + border: 1px solid ${themeVars.color.light.border}; border-radius: ${otherThemeVars.border.radius}; box-shadow: ${themeVars.github.shadow.resting.small}; margin-bottom: 16px; @@ -42,7 +41,7 @@ const summaryView = css` /* 工作流运行信息 */ .action-run-summary-block { background: ${themeVars.color.body}; - padding: 16px; + padding: 16px 20px; > div { gap: 4px; } @@ -63,13 +62,6 @@ const summaryView = css` } } } - /* 工作流运行时间 */ - > .action-run-summary-stat-divider + .action-run-summary-stat + .action-run-summary-stat { - .action-run-summary-stat-value { - text-decoration: underline; - text-underline-offset: 0.2rem; - } - } } /* 流程图 */ .workflow-graph { @@ -77,7 +69,7 @@ const summaryView = css` .graph-header { border-top-left-radius: ${otherThemeVars.border.radius}; border-top-right-radius: ${otherThemeVars.border.radius}; - padding: 16px; + padding: 16px 20px; /* 流程图信息 */ .graph-stats { font-size: 12px; diff --git a/styles/components/issues/issue.ts b/styles/components/issues/issue.ts index 518e135..2328226 100644 --- a/styles/components/issues/issue.ts +++ b/styles/components/issues/issue.ts @@ -108,130 +108,6 @@ const dropdown = css` } `; -// PR 界面的 PR 操作评论 -const prMerge = css` - .repository.view.issue .comment-list .timeline-item.pull-merge-box { - /* 头像 */ - .timeline-avatar { - border-radius: 9999px; - width: 40px; - height: 40px; - display: flex; - align-items: center; - justify-content: center; - color: ${themeVars.github.button.primary.fgColor.rest} !important; - border-radius: ${otherThemeVars.border.radius}; - /* 操作评论边框 */ - + .content > .ui.attached.segment { - border-width: 1.5px; - } - svg { - width: 24px; - height: 24px; - } - &.tw-text-text-light { - background-color: ${themeVars.color.text.light.num1}; - } - &.tw-text-green { - background-color: ${themeVars.github.bgColor.success.emphasis}; - + .content > .ui.attached.segment { - border-left-color: ${themeVars.github.bgColor.success.emphasis}; - border-right-color: ${themeVars.github.bgColor.success.emphasis}; - &:first-child { - border-top-color: ${themeVars.github.bgColor.success.emphasis}; - } - &:last-child { - border-bottom-color: ${themeVars.github.bgColor.success.emphasis}; - } - } - } - &.tw-text-purple { - background-color: ${themeVars.github.bgColor.done.emphasis}; - + .content > .ui.attached.segment { - border-left-color: ${themeVars.github.bgColor.done.emphasis}; - border-right-color: ${themeVars.github.bgColor.done.emphasis}; - &:first-child { - border-top-color: ${themeVars.github.bgColor.done.emphasis}; - } - &:last-child { - border-bottom-color: ${themeVars.github.bgColor.done.emphasis}; - } - } - } - &.tw-text-yellow { - background-color: ${themeVars.github.bgColor.attention.emphasis}; - + .content > .ui.attached.segment { - border-left-color: ${themeVars.github.bgColor.attention.emphasis}; - border-right-color: ${themeVars.github.bgColor.attention.emphasis}; - &:first-child { - border-top-color: ${themeVars.github.bgColor.attention.emphasis}; - } - &:last-child { - border-bottom-color: ${themeVars.github.bgColor.attention.emphasis}; - } - } - } - &.tw-text-red { - background-color: ${themeVars.github.bgColor.danger.emphasis}; - + .content > .ui.attached.segment { - border-left-color: ${themeVars.github.bgColor.danger.emphasis}; - border-right-color: ${themeVars.github.bgColor.danger.emphasis}; - &:first-child { - border-top-color: ${themeVars.github.bgColor.danger.emphasis}; - } - &:last-child { - border-bottom-color: ${themeVars.github.bgColor.danger.emphasis}; - } - } - } - } - /* 检查状态 */ - .commit-status-panel { - .commit-status-header { - background: ${themeVars.color.body}; - padding: 16px; - font-size: 16px; - font-weight: 600; - .ui.right { - color: ${themeVars.color.text.light.num1}; - font-size: 14px; - font-weight: 400; - } - } - /* 检查状态列表 */ - .commit-status-list { - background: ${themeVars.color.menu}; - .commit-status-item { - border-radius: ${otherThemeVars.border.radius}; - padding: 2px 8px; - margin: 0px 8px; - height: 37px; - &:first-child { - margin-top: 8px; - } - &:last-child { - margin-bottom: 8px; - } - &:hover { - background-color: ${themeVars.color.hover.opaque}; - } - } - } - } - /* 合并信息和操作 */ - .merge-section { - color: ${themeVars.color.text.light.num1}; - padding: 16px; - display: grid; - gap: 8px; - &::before, - &::after { - display: none; - } - } - } -`; - // 工单标题 const issueTitle = css` .page-content.repository.issue { @@ -248,4 +124,4 @@ const issueTitle = css` } `; -export default cssCombine(button, babel, prBranch, dropdown, prMerge, issueTitle); +export default cssCombine(button, babel, prBranch, dropdown, issueTitle); diff --git a/styles/components/issues/issue_comment.ts b/styles/components/issues/issue_comment.ts index 9220c86..682e0ce 100644 --- a/styles/components/issues/issue_comment.ts +++ b/styles/components/issues/issue_comment.ts @@ -154,4 +154,118 @@ const commentForm = css` } `; -export default cssCombine(comment, commentForm); +// PR 界面的 PR 操作评论 +const prMerge = css` + .repository.view.issue .comment-list .timeline-item.pull-merge-box { + /* 头像 */ + .timeline-avatar { + border-radius: 9999px; + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + color: ${themeVars.github.button.primary.fgColor.rest} !important; + border-radius: ${otherThemeVars.border.radius}; + /* 操作评论边框 */ + + .content > .ui.segment { + border-width: 1.5px; + } + svg { + width: 24px; + height: 24px; + } + &.tw-text-text-light { + background-color: ${themeVars.color.text.light.num1}; + } + &.tw-text-green { + background-color: ${themeVars.github.bgColor.success.emphasis}; + + .content > .ui.segment { + border-color: ${themeVars.github.bgColor.success.emphasis}; + } + } + &.tw-text-purple { + background-color: ${themeVars.github.bgColor.done.emphasis}; + + .content > .ui.segment { + border-color: ${themeVars.github.bgColor.done.emphasis}; + } + } + &.tw-text-yellow { + background-color: ${themeVars.github.bgColor.attention.emphasis}; + + .content > .ui.segment { + border-color: ${themeVars.github.bgColor.attention.emphasis}; + } + } + &.tw-text-red { + background-color: ${themeVars.github.bgColor.danger.emphasis}; + + .content > .ui.segment { + border-color: ${themeVars.github.bgColor.danger.emphasis}; + } + } + } + .avatar-content-left-arrow { + &::before, + &::after { + display: none; + } + /* 合并信息和操作 */ + .merge-section { + /* 检查状态 */ + .item.commit-status-toggle { + padding: 16px; + font-size: 16px; + font-weight: 600; + .btn { + color: ${themeVars.color.text.light.num1} !important; + font-size: 14px; + font-weight: 400; + } + } + .item { + /* 覆盖 Gitea 的样式 */ + + .item { + border-top: 0; + } + &:has(+ .item) { + border-bottom: 1px solid ${themeVars.color.light.border}; + } + /* 检查状态列表 */ + .commit-status-list { + background: ${themeVars.color.console.bg}; + padding: 0 8px; + .commit-status-item { + padding: 0; + margin: 0px 16px; + height: 37px; + &:hover { + background-color: ${themeVars.color.hover.opaque}; + border-radius: ${otherThemeVars.border.radius}; + padding-left: 14px; + padding-right: 14px; + margin-left: 2px; + margin-right: 2px; + } + &:first-child { + margin-top: 8px; + } + &:last-child { + margin-bottom: 8px; + } + .gt-ellipsis span { + font-size: 12px; + margin-left: 4px; + } + a { + color: ${themeVars.color.text.light.num1}; + &:hover { + color: ${themeVars.color.primary.self}; + } + } + } + } + } + } + } + } +`; +export default cssCombine(comment, commentForm, prMerge); diff --git a/styles/components/setting.ts b/styles/components/setting.ts index 0962957..f6c6a9c 100644 --- a/styles/components/setting.ts +++ b/styles/components/setting.ts @@ -86,10 +86,13 @@ const button = css` ${tinyStyle} padding: 5px 16px; line-height: 22px; + box-shadow: none; &:hover { ${tinyHoverStyle} + box-shadow: ${themeVars.github.shadow.resting.small}; } &:active { + box-shadow: ${themeVars.github.shadow.resting.small}; background-color: ${themeVars.github.button.primary.bgColor.active}; /* 保持鼠标移开时边框颜色和文字颜色不变 */ border-color: ${themeVars.github.button.primary.borderColor.hover}; @@ -97,7 +100,6 @@ const button = css` } } .ui.red.button { - box-shadow: ${themeVars.github.shadow.resting.small}; padding: 5px 16px; line-height: 22px; } diff --git a/styles/public/label/checkbox_label.ts b/styles/public/label/checkbox_label.ts index 031d1c1..29427be 100644 --- a/styles/public/label/checkbox_label.ts +++ b/styles/public/label/checkbox_label.ts @@ -20,7 +20,7 @@ import { css, cssCombine } from "@lutinglt/gitea-github-theme/core"; const checkboxLabel = css` - .ui.checkbox label { + .ui.checkbox label:not(:has(+ *)) { display: inline-flex; align-items: center; gap: 2px; diff --git a/styles/public/other.ts b/styles/public/other.ts index 6ac953e..dfc84f5 100644 --- a/styles/public/other.ts +++ b/styles/public/other.ts @@ -48,18 +48,19 @@ const svg = css` color: #429cf0 !important; } /* 重新打开工单按钮设置为绿色 */ - .tw-text-green { - .octicon-issue-reopened, - &.octicon-issue-reopened { - color: ${themeVars.github.fgColor.success} !important; - } + .tw-text-green .octicon-issue-reopened, + .tw-text-green.octicon-issue-reopened { + color: ${themeVars.github.fgColor.success} !important; } /* 关闭工单按钮设置为紫色 */ - .tw-text-red { - .octicon-issue-closed, - &.octicon-issue-closed { - color: ${themeVars.github.fgColor.done} !important; - } + .tw-text-red .octicon-issue-closed, + .tw-text-red.octicon-issue-closed { + color: ${themeVars.github.fgColor.done} !important; + } + /* 关闭 PR 按钮设置为红色 */ + .tw-text-red .octicon-git-pull-request-closed, + .tw-text-red.octicon-git-pull-request-closed { + color: ${themeVars.color.red.self} !important; } `; // 头像 From 4076808b7696be8c10eb9003f0a2ff49d60d191c Mon Sep 17 00:00:00 2001 From: lutinglt Date: Mon, 6 Jul 2026 10:13:54 +0800 Subject: [PATCH 14/16] update tmpls --- gitea/templates/repo/commit_sign_badge.tmpl | 4 ++-- gitea/templates/repo/view_content.tmpl | 2 +- gitea/templates/repo/view_list.tmpl | 14 ++++++++++---- templates/repo/commit_sign_badge.tmpl | 4 ++-- templates/repo/view_content.tmpl | 2 +- templates/repo/view_list.tmpl | 14 ++++++++++---- 6 files changed, 26 insertions(+), 14 deletions(-) diff --git a/gitea/templates/repo/commit_sign_badge.tmpl b/gitea/templates/repo/commit_sign_badge.tmpl index f63e4ec..bf8185f 100644 --- a/gitea/templates/repo/commit_sign_badge.tmpl +++ b/gitea/templates/repo/commit_sign_badge.tmpl @@ -64,10 +64,10 @@ so this template should be kept as small as possible, DO NOT put large component {{- if $verified -}} {{- if and $signingUser $signingUser.ID -}} {{svg "gitea-lock"}} - {{ctx.AvatarUtils.Avatar $signingUser 16}} + {{ctx.AvatarUtils.Avatar $signingUser 20}} {{- else -}} {{svg "gitea-lock-cog"}} - {{ctx.AvatarUtils.AvatarByEmail $signingEmail "" 16}} + {{ctx.AvatarUtils.AvatarByEmail $signingEmail "" 20}} {{- end -}} {{- else -}} {{svg "gitea-unlock"}} diff --git a/gitea/templates/repo/view_content.tmpl b/gitea/templates/repo/view_content.tmpl index 3413c09..77e051d 100644 --- a/gitea/templates/repo/view_content.tmpl +++ b/gitea/templates/repo/view_content.tmpl @@ -92,7 +92,7 @@