Compare commits

...

6 Commits

Author SHA1 Message Date
lutinglt
8792a43644 Issue/PR 的时间线样式间隔和大小 2025-07-12 00:02:21 +08:00
lutinglt
453fc5383d 同步 Issue/PR 的时间线样式 2025-07-11 23:38:49 +08:00
lutinglt
4fa1d4ff18 同步 PR 的合并提交头像样式 2025-07-11 22:50:14 +08:00
lutinglt
efe5e6ecbb 优化按钮样式 2025-07-11 22:26:39 +08:00
lutinglt
1c05717011 优化 PR 中的合并提交按钮颜色 2025-07-11 22:06:58 +08:00
lutinglt
9804a4e5c6 弹窗动画 2025-07-11 21:53:10 +08:00
9 changed files with 104 additions and 28 deletions

9
.github/release.md vendored
View File

@@ -2,11 +2,12 @@
#### 更符合 GitHub 风格
- 同步 PR 的合并提交头像样式
- 同步 PR 中的合并提交按钮颜色
- 同步 Issue/PR 的时间线样式
## 🎈 Perf
- 优化提交中 Action 状态标签的位置
- 优化按钮和菜单下的图标颜色
- 优化仓库发布中的分支选择按钮样式
- 优化向上弹窗的菜单动画
- 优化全局按钮样式
## 🐞 Fix

View File

@@ -350,6 +350,9 @@ export function defineGithubTheme(githubColor: GithubColor): Theme {
},
},
control: {
bgColor: {
rest: githubColor.control.bgColor.rest,
},
transparent: {
bgColor: {
hover: githubColor.control.transparent.bgColor.hover,

View File

@@ -41,6 +41,7 @@ export const github = {
success: {
/** 成功的背景颜色
* @issue `babel` 重新开启图标背景颜色
* @issue `prMerge` 合并提交的图标背景色
*/
emphasis: null,
},
@@ -157,6 +158,12 @@ export const github = {
},
},
control: {
bgColor: {
/** 背景色
* @issue `timeline` 时间线标签背景色
*/
rest: null,
},
transparent: {
bgColor: {
/** 悬停色

View File

@@ -16,16 +16,6 @@ export const branchButton = css`
}
`;
// 仓库按钮
export const repoButton = css`
.page-content.repository.file.list {
// clone 按钮调整
.repo-button-row .repo-button-row-right .ui.primary.button span {
margin: 0px 3px;
}
}
`;
// 仓库文件列表
export const repoFiles = css`
.repository.file.list {
@@ -198,7 +188,7 @@ export const repoSidebarBottom = css`
.color-icon {
height: 8px;
width: 8px;
margin-right: 6px;
margin-right: 8px;
}
.tw-font-semibold {
color: ${themeVars.color.text.self};

View File

@@ -1,4 +1,4 @@
import { css, themeVars } from "src/types/vars";
import { css, otherThemeVars, themeVars } from "src/types/vars";
import { activeItemAfterStyle } from "styles/public/menu";
export const button = css`
@@ -26,17 +26,14 @@ export const babel = css`
// 时间线打开状态标签
&.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;
}
}
}
@@ -121,3 +118,73 @@ export const dropdown = css`
}
}
`;
// PR 界面的 PR 操作评论头像
export const prMerge = css`
.repository.view.issue .comment-list .timeline-item.pull-merge-box {
.timeline-avatar {
background-color: ${themeVars.github.bgColor.success.emphasis};
color: ${themeVars.color.text.self} !important;
border-radius: ${otherThemeVars.border.radius};
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
svg {
width: 24px;
height: 24px;
}
}
}
`;
// 时间线
export const timeline = css`
.repository.view.issue {
.comment-list {
.timeline-item,
.timeline-item-group {
padding: 16px 0;
// 事件
&.event {
// 修复覆盖后的位置问题
padding-left: 15px;
.avatar {
width: 20px;
height: 20px;
}
.badge {
border: 2px solid ${themeVars.color.body};
}
// 仅匹配只有 badge
.badge:not([class*=" "]) {
background-color: ${themeVars.github.control.bgColor.rest};
svg {
color: ${themeVars.color.text.light.num1};
}
}
}
// 提交
&.commits-list {
// 每个提交之间的间隔
.flex-text-block {
padding-top: 4px;
}
.badge svg {
color: ${themeVars.color.text.light.num1};
}
// 仅覆盖左侧 commit 不覆盖右侧 SHA
a.muted {
font-size: 12px;
color: ${themeVars.color.text.light.num1};
text-decoration-line: underline;
&:hover {
color: ${themeVars.color.primary.self};
}
}
}
}
}
}
`;

View File

@@ -6,10 +6,6 @@ export const repoHeader = css`
// 点星/关注/克隆/RSS 按钮
.ui.compact.button {
padding: 3px 12px;
// 文本跟图标间隔, 文本在手机下不显示
span {
margin-left: 0.5rem;
}
}
// 仓库图标
img.ui.avatar {

View File

@@ -18,16 +18,27 @@ export const baseButton = css`
min-height: 30px;
font-weight: 500;
padding: 9px 16px;
&.ui {
gap: 8px;
}
}
.ui.button:not(.primary):not(.red) svg {
color: ${themeVars.color.text.light.num1};
}
.ui.primary.button {
// 主色调按钮保持白色
.ui.primary.buttons .button svg {
color: ${themeVars.color.text.self};
}
.ui.primary {
&.button,
// 按钮组, PR 里的压缩合并按钮
&.buttons .button {
${primaryStyle}
&:hover {
${primaryHoverStyle}
}
}
}
// 主色调基本按钮和普通按钮一样
// 作者的关注按钮
.ui.basic.primary.button {

View File

@@ -1,7 +1,9 @@
import { animationDown } from "src/core/theme";
import { css, themeVars } from "src/types/vars";
export const modal = css`
.ui.modal {
animation: ${animationDown};
border: 1.5px solid ${themeVars.color.light.border};
> .header {

View File

@@ -37,7 +37,6 @@
textarea,
.ui.form input,
.menu .item,
.ui.modal,
.job-step-summary,
.job-step-logs,
.job-brief-item {