Skip to content

Commit e2838df

Browse files
committed
Supplement the PR operation panel status style in PR
1 parent c1a0f96 commit e2838df

9 files changed

Lines changed: 90 additions & 38 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
#### More aligned with GitHub style
44

5-
- Optimize the selection style of items in the menu
6-
- Optimize code block styles
5+
- Optimize the selection style of items in the menu.
6+
- Optimize code block styles.
77

88
##### Template File
99

10-
- Synchronized repository commit page layout and styles
11-
- Synchronized repository code list page layout and styles
12-
- Synchronized repository add file button menu styles
10+
- Synchronized repository commit page layout and styles.
11+
- Synchronized repository code list page layout and styles.
12+
- Synchronized repository add file button menu styles.
1313

1414
### 🐞 Fix
1515

1616
- Fixed extra lines under heatmap.
17+
- Supplement the PR operation panel status style in PR.

src/core/github.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ export type GithubColor = {
4242
};
4343
bgColor: {
4444
accent: { emphasis: string; muted: string };
45-
attention: { muted: string };
45+
attention: { emphasis: string; muted: string };
4646
emphasis: string;
4747
success: { emphasis: string; muted: string };
48-
danger: { muted: string };
48+
danger: { emphasis: string; muted: string };
4949
done: { emphasis: string };
5050
default: string;
5151
inset: string;
@@ -240,6 +240,12 @@ export function github2ThemeColor(githubColor: GithubColor): ThemeColor {
240240
success: {
241241
emphasis: githubColor.bgColor.success.emphasis,
242242
},
243+
attention: {
244+
emphasis: githubColor.bgColor.attention.emphasis,
245+
},
246+
danger: {
247+
emphasis: githubColor.bgColor.danger.emphasis,
248+
},
243249
done: {
244250
emphasis: githubColor.bgColor.done.emphasis,
245251
},

src/types/color/github.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,22 @@ export const github = {
5353
*/
5454
emphasis: null,
5555
},
56+
attention: {
57+
/** 注意的背景颜色
58+
* @issue `prMerge` 头像颜色
59+
*/
60+
emphasis: null,
61+
},
62+
danger: {
63+
/** 危险的背景颜色
64+
* @issue `prMerge` 头像颜色
65+
*/
66+
emphasis: null,
67+
},
5668
done: {
5769
/** 完成的背景颜色
5870
* @issue `babel` 工单已关闭图标背景颜色
71+
* @issue `prMerge` 头像颜色
5972
*/
6073
emphasis: null,
6174
},

styles/components/issue.ts

Lines changed: 55 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ export const prMerge = css`
412412
.repository.view.issue .comment-list .timeline-item.pull-merge-box {
413413
// 头像
414414
.timeline-avatar {
415-
color: ${themeVars.color.white} !important;
416415
border-radius: 9999px;
417416
width: 40px;
418417
height: 40px;
@@ -423,34 +422,67 @@ export const prMerge = css`
423422
width: 24px;
424423
height: 24px;
425424
}
426-
// 可以合并
427-
&.green {
428-
background-color: ${themeVars.github.bgColor.success.emphasis};
425+
// PR 界面的 PR 操作评论
426+
&.text {
427+
color: ${themeVars.color.white} !important;
429428
border-radius: ${otherThemeVars.border.radius};
430-
// 操作评论边框色
429+
// 操作评论边框
431430
+ .content > .ui.attached.segment {
432-
border-left-color: ${themeVars.github.bgColor.success.emphasis};
433-
border-right-color: ${themeVars.github.bgColor.success.emphasis};
434-
&:first-child {
435-
border-top-color: ${themeVars.github.bgColor.success.emphasis};
431+
border-width: 1.5px;
432+
}
433+
&.grey {
434+
background-color: ${themeVars.color.text.light.num1};
435+
}
436+
&.green {
437+
background-color: ${themeVars.github.bgColor.success.emphasis};
438+
+ .content > .ui.attached.segment {
439+
border-left-color: ${themeVars.github.bgColor.success.emphasis};
440+
border-right-color: ${themeVars.github.bgColor.success.emphasis};
441+
&:first-child {
442+
border-top-color: ${themeVars.github.bgColor.success.emphasis};
443+
}
444+
&:last-child {
445+
border-bottom-color: ${themeVars.github.bgColor.success.emphasis};
446+
}
436447
}
437-
&:last-child {
438-
border-bottom-color: ${themeVars.github.bgColor.success.emphasis};
448+
}
449+
&.purple {
450+
background-color: ${themeVars.github.bgColor.done.emphasis};
451+
+ .content > .ui.attached.segment {
452+
border-left-color: ${themeVars.github.bgColor.done.emphasis};
453+
border-right-color: ${themeVars.github.bgColor.done.emphasis};
454+
&:first-child {
455+
border-top-color: ${themeVars.github.bgColor.done.emphasis};
456+
}
457+
&:last-child {
458+
border-bottom-color: ${themeVars.github.bgColor.done.emphasis};
459+
}
439460
}
440461
}
441-
}
442-
// 已合并
443-
&.purple {
444-
background-color: ${themeVars.github.bgColor.done.emphasis};
445-
border-radius: ${otherThemeVars.border.radius};
446-
+ .content > .ui.attached.segment {
447-
border-left-color: ${themeVars.github.bgColor.done.emphasis};
448-
border-right-color: ${themeVars.github.bgColor.done.emphasis};
449-
&:first-child {
450-
border-top-color: ${themeVars.github.bgColor.done.emphasis};
462+
&.yellow {
463+
background-color: ${themeVars.github.bgColor.attention.emphasis};
464+
+ .content > .ui.attached.segment {
465+
border-left-color: ${themeVars.github.bgColor.attention.emphasis};
466+
border-right-color: ${themeVars.github.bgColor.attention.emphasis};
467+
&:first-child {
468+
border-top-color: ${themeVars.github.bgColor.attention.emphasis};
469+
}
470+
&:last-child {
471+
border-bottom-color: ${themeVars.github.bgColor.attention.emphasis};
472+
}
451473
}
452-
&:last-child {
453-
border-bottom-color: ${themeVars.github.bgColor.done.emphasis};
474+
}
475+
&.red {
476+
background-color: ${themeVars.github.bgColor.danger.emphasis};
477+
+ .content > .ui.attached.segment {
478+
border-left-color: ${themeVars.github.bgColor.danger.emphasis};
479+
border-right-color: ${themeVars.github.bgColor.danger.emphasis};
480+
&:first-child {
481+
border-top-color: ${themeVars.github.bgColor.danger.emphasis};
482+
}
483+
&:last-child {
484+
border-bottom-color: ${themeVars.github.bgColor.danger.emphasis};
485+
}
454486
}
455487
}
456488
}

themes/colorblind-dark.css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const colorblindDarkGithubColors: GithubColor = {
2525
},
2626
bgColor: {
2727
...darkGithubColors.bgColor,
28-
danger: { muted: "#db6d281a" },
28+
danger: { emphasis: "#bd561d", muted: "#db6d281a" },
2929
success: { emphasis: "#1f6feb", muted: "#388bfd33" },
3030
},
3131
borderColor: {

themes/colorblind-light.css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const colorblindLightGithubColors: GithubColor = {
2525
},
2626
bgColor: {
2727
...lightGithubColors.bgColor,
28-
danger: { muted: "#fff1e5" },
28+
danger: { emphasis: "#bc4c00", muted: "#fff1e5" },
2929
success: { emphasis: "#0969da", muted: "#ddf4ff" },
3030
},
3131
borderColor: {

themes/dark.css.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export const darkGithubColors: GithubColor = {
4545
},
4646
bgColor: {
4747
accent: { emphasis: "#1f6feb", muted: "#388bfd1a" },
48-
attention: { muted: "#bb800926" },
49-
danger: { muted: "#f851491a" },
48+
attention: { emphasis: "#9e6a03", muted: "#bb800926" },
49+
danger: { emphasis: "#da3633", muted: "#f851491a" },
5050
default: "#0d1117",
5151
done: { emphasis: "#8957e5" },
5252
emphasis: "#3d444d",

themes/light.css.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export const lightGithubColors: GithubColor = {
4545
},
4646
bgColor: {
4747
accent: { emphasis: "#0969da", muted: "#ddf4ff" },
48-
attention: { muted: "#fff8c5" },
49-
danger: { muted: "#ffebe9" },
48+
attention: { emphasis: "#9a6700", muted: "#fff8c5" },
49+
danger: { emphasis: "#cf222e", muted: "#ffebe9" },
5050
default: "#ffffff",
5151
done: { emphasis: "#8250df" },
5252
emphasis: "#25292e",

themes/soft-dark.css.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export const softDarkGithubColors: GithubColor = {
3939
},
4040
bgColor: {
4141
accent: { emphasis: "#316dca", muted: "#4184e41a" },
42-
attention: { muted: "#ae7c1426" },
43-
danger: { muted: "#e5534b1a" },
42+
attention: { emphasis: "#966600", muted: "#ae7c1426" },
43+
danger: { emphasis: "#c93c37", muted: "#e5534b1a" },
4444
default: "#212830",
4545
done: { emphasis: "#8256d0" },
4646
emphasis: "#3d444d",

0 commit comments

Comments
 (0)