diff --git a/.github/release.md b/.github/release.md index 64e53bb..78fcd95 100644 --- a/.github/release.md +++ b/.github/release.md @@ -44,6 +44,7 @@ determined. - 优化仪表板动态信息间隔 - 微调仓库相关界面元素间隔 - 同步软件包页面样式 +- 同步提示框样式 ### 🐞 Fix diff --git a/src/core/github.ts b/src/core/github.ts index 0f72772..44d9bf3 100644 --- a/src/core/github.ts +++ b/src/core/github.ts @@ -36,10 +36,12 @@ export type GithubColor = { black: string; white: string; muted: string; + onEmphasis: string; }; bgColor: { accent: { emphasis: string; muted: string }; attention: { muted: string }; + emphasis: string; success: { emphasis: string; muted: string }; danger: { muted: string }; done: { emphasis: string }; @@ -193,8 +195,8 @@ export function github2ThemeColor(githubColor: GithubColor): ThemeColor { activeBg: githubColor.bgColor.accent.muted, }, tooltip: { - text: githubColor.fgColor.default, - bg: githubColor.bgColor.default, + text: githubColor.fgColor.onEmphasis, + bg: githubColor.bgColor.emphasis, }, nav: { bg: githubColor.bgColor.inset, diff --git a/src/types/color/other.ts b/src/types/color/other.ts index de94650..62d8f67 100644 --- a/src/types/color/other.ts +++ b/src/types/color/other.ts @@ -114,7 +114,7 @@ export const other = { /** 点击后颜色 */ activeBg: "color-reaction-active-bg", }, - /** 不知道是干啥的 */ + /** 鼠标悬浮时的提示文本, 比如提交的具体时间, 任务状态等 */ tooltip: { text: null, bg: null, diff --git a/styles/components/dashboard.ts b/styles/components/dashboard.ts index 15d7691..e2776cb 100644 --- a/styles/components/dashboard.ts +++ b/styles/components/dashboard.ts @@ -57,6 +57,7 @@ export const dashboard = css` padding: 8px; li { border-radius: ${otherThemeVars.border.radius}; + padding: 6px 8px !important; &:not(:last-child) { border-bottom: 0; } diff --git a/styles/public/tippy.ts b/styles/public/tippy.ts index 7a41803..15a1578 100644 --- a/styles/public/tippy.ts +++ b/styles/public/tippy.ts @@ -26,7 +26,7 @@ export const tippyBox = css` // 差异对比中文件路径行右侧的三个点菜单 &[data-theme="menu"] { .tippy-content { - padding: 0.5rem; + padding: 8px; .item { border-radius: ${otherThemeVars.border.radius}; &:hover { @@ -35,5 +35,14 @@ export const tippyBox = css` } } } + // 专门用于提示信息的提示框, 比如提交的具体时间, 任务状态等 + &[data-theme="tooltip"] { + border-radius: ${otherThemeVars.border.radius}; + .tippy-content { + font-size: 12px; + font-weight: 400; + padding: 4px 8px; + } + } } `; diff --git a/themes/dark.css.ts b/themes/dark.css.ts index 4034f86..eb00060 100644 --- a/themes/dark.css.ts +++ b/themes/dark.css.ts @@ -32,6 +32,7 @@ export const darkGithubColors: GithubColor = { success: "#3fb950", black: "#010409", white: "#ffffff", + onEmphasis: "#ffffff", }, bgColor: { accent: { emphasis: "#1f6feb", muted: "#388bfd1a" }, @@ -39,6 +40,7 @@ export const darkGithubColors: GithubColor = { danger: { muted: "#f851491a" }, default: "#0d1117", done: { emphasis: "#8957e5" }, + emphasis: "#3d444d", muted: "#151b23", neutral: { muted: "#656c7633" }, success: { emphasis: "#238636", muted: "#2ea04326" }, diff --git a/themes/light.css.ts b/themes/light.css.ts index 292245b..a3bfb60 100644 --- a/themes/light.css.ts +++ b/themes/light.css.ts @@ -32,6 +32,7 @@ export const lightGithubColors: GithubColor = { success: "#1a7f37", black: "#1f2328", white: "#ffffff", + onEmphasis: "#ffffff", }, bgColor: { accent: { emphasis: "#0969da", muted: "#ddf4ff" }, @@ -39,6 +40,7 @@ export const lightGithubColors: GithubColor = { danger: { muted: "#ffebe9" }, default: "#ffffff", done: { emphasis: "#8250df" }, + emphasis: "#25292e", muted: "#f6f8fa", neutral: { muted: "#818b981f" }, success: { emphasis: "#1f883d", muted: "#dafbe1" }, diff --git a/themes/soft-dark.css.ts b/themes/soft-dark.css.ts index 2c7aaac..1a7c5af 100644 --- a/themes/soft-dark.css.ts +++ b/themes/soft-dark.css.ts @@ -27,6 +27,7 @@ export const softDarkGithubColors: GithubColor = { success: "#57ab5a", black: "#010409", white: "#cdd9e5", + onEmphasis: "#ffffff", }, bgColor: { accent: { emphasis: "#316dca", muted: "#4184e41a" }, @@ -34,6 +35,7 @@ export const softDarkGithubColors: GithubColor = { danger: { muted: "#e5534b1a" }, default: "#212830", done: { emphasis: "#8256d0" }, + emphasis: "#3d444d", muted: "#262c36", neutral: { muted: "#656c7633" }, success: { emphasis: "#347d39", muted: "#46954a26" },