Skip to content

fix(webui): align home page scale#819

Merged
qiin2333 merged 6 commits into
masterfrom
codex/home-typography-cards
Jul 21, 2026
Merged

fix(webui): align home page scale#819
qiin2333 merged 6 commits into
masterfrom
codex/home-typography-cards

Conversation

@qiin2333

Copy link
Copy Markdown
Collaborator

改了啥呀

  • 统一首页标题、副标题、状态信息、主机摘要和快捷入口的字号层级
  • 恢复首页资源卡片的可读尺寸,放大卡片高度、图标、标题和描述文字
  • 将资源卡片尺寸收拢到 ResourceCard / ResourceLink,移除首页重复的大屏覆盖样式
  • 保持 1280px、1600px 和窄屏布局的响应式表现

为啥要改

首页的文字和资源卡片被压得太紧,和 Apps、配置等页面的视觉节奏不一致。现在首页终于不用像被缩小一圈的杂鱼了。

验证

  • npm run test:webui(74 passed)
  • npm run build
  • 浏览器视觉验证:1280×720、1600×900、900×800
  • 1280×720 和 1600×900 首页无默认滚动条
  • 首页与 Apps 页标题/副标题实测字号分别为 30.4px / 16px
  • 窄屏无横向溢出

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 47162f30-f381-4951-9907-53a518394dc6

📥 Commits

Reviewing files that changed from the base of the PR and between ea5e1a3 and 1209cd6.

📒 Files selected for processing (2)
  • src_assets/common/assets/web/components/layout/Navbar.vue
  • src_assets/common/assets/web/styles/global.less
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
src_assets/**/*.{vue,js,html}

⚙️ CodeRabbit configuration file

src_assets/**/*.{vue,js,html}: 基于 Vue.js 的 Web 配置面板。审查 XSS/CSRF 安全性、 组件设计、状态管理和可访问性。

Files:

  • src_assets/common/assets/web/components/layout/Navbar.vue
🔇 Additional comments (2)
src_assets/common/assets/web/components/layout/Navbar.vue (1)

162-164: LGTM!

src_assets/common/assets/web/styles/global.less (1)

3-67: LGTM!


Summary by CodeRabbit

  • 界面优化
    • 调整资源卡片/资源链接的间距、对齐与紧凑模式尺寸,优化移动端网格高度表现。
    • 调整首页、应用页、配置页及 PIN 页的标题与容器间距,并完善响应式字号适配。
    • 更新导航栏的过渡表现,配合全局动效过渡与减少动态设置。
  • 文案更新
    • 更新首页英文与中文宣传语。
  • 字体与排版
    • 统一全局字体体系与字号令牌,优化中日韩文字显示与字体栈一致性。

Walkthrough

Changes

网页视觉刷新

Layer / File(s) Summary
字体令牌与首页排版
src_assets/common/assets/web/styles/var.css, src_assets/common/assets/web/styles/welcome.less, src_assets/common/assets/web/views/Home.vue
新增统一字体令牌,并调整首页及欢迎页的字号、内边距和响应式覆盖规则。
资源卡片布局与紧凑链接
src_assets/common/assets/web/components/common/ResourceCard.vue, src_assets/common/assets/web/components/common/ResourceLink.vue
调整资源分组、网格、页脚及紧凑资源链接的尺寸、间距和字体。
页面间距与品牌文案
src_assets/common/assets/web/views/Apps.vue, src_assets/common/assets/web/views/Config.vue, src_assets/common/assets/web/views/Pin.vue, src_assets/common/assets/web/public/assets/locale/*.json
调整应用、配置和 PIN 页面间距,并更新英文及中文首页描述文案。
导航 View Transitions
src_assets/common/assets/web/components/layout/Navbar.vue, src_assets/common/assets/web/styles/global.less
为导航栏关联 View Transition 名称,并新增页面淡入淡出、减少动效及导航栏动画规则。

控制面板子模块更新

Layer / File(s) Summary
子模块提交指针
src_assets/common/sunshine-control-panel
将 sunshine-control-panel 子模块切换至新的提交版本。

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题简洁且准确概括了本次首页视觉尺度与排版统一的主要改动。
Description check ✅ Passed 描述与实际变更一致,涵盖了首页字号、资源卡片尺寸及响应式调整。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/home-typography-cards

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qiin2333
qiin2333 force-pushed the codex/home-typography-cards branch from 7b86fd0 to 4f50d8b Compare July 20, 2026 16:27
@qiin2333
qiin2333 marked this pull request as ready for review July 21, 2026 02:24

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src_assets/common/assets/web/styles/var.css (1)

24-32: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

建议为特定字体名称添加引号以解决静态分析警告。

Stylelint 提示了 value-keyword-case 错误,因为 InterBlinkMacSystemFontMenloMonacoConsolas 等未加引号的特定字体名称被其规则识别为了不规范的关键字格式。虽然在 CSS 中这些未加引号的用法也是有效的,但前端的最佳实践建议为非通用(non-generic)的特定字体系列名称添加引号,这样不仅可以消除规范检查工具的误报,还能确保更严谨的浏览器解析兼容性。

💡 建议的修复
-  --font-family-sans: Inter, 'Segoe UI Variable Text', 'Segoe UI Variable', -apple-system,
-    BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC',
+  --font-family-sans: 'Inter', 'Segoe UI Variable Text', 'Segoe UI Variable', -apple-system,
+    'BlinkMacSystemFont', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC',
     'Noto Sans SC', 'Noto Sans', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
   --font-family-base: var(--font-family-sans);
-  --font-family-mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', Menlo, Monaco, Consolas,
+  --font-family-mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas',
     'Liberation Mono', monospace;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src_assets/common/assets/web/styles/var.css` around lines 24 - 32, 在
`--font-family-sans` 和 `--font-family-mono` 中为所有非通用字体系列名称添加引号,尤其是
`Inter`、`BlinkMacSystemFont`、`Menlo`、`Monaco` 和 `Consolas`,以通过
`value-keyword-case` 检查;保留 `-apple-system`、`ui-monospace` 和 `sans-serif`
等系统关键字及现有字体顺序不变。

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src_assets/common/assets/web/styles/var.css`:
- Around line 24-32: 在 `--font-family-sans` 和 `--font-family-mono`
中为所有非通用字体系列名称添加引号,尤其是 `Inter`、`BlinkMacSystemFont`、`Menlo`、`Monaco` 和
`Consolas`,以通过 `value-keyword-case` 检查;保留 `-apple-system`、`ui-monospace` 和
`sans-serif` 等系统关键字及现有字体顺序不变。

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4cb9ce91-4c54-4e6e-9b6d-844e74cf43e6

📥 Commits

Reviewing files that changed from the base of the PR and between 1ee2df2 and ea5e1a3.

📒 Files selected for processing (11)
  • src_assets/common/assets/web/components/common/ResourceCard.vue
  • src_assets/common/assets/web/components/common/ResourceLink.vue
  • src_assets/common/assets/web/public/assets/locale/en.json
  • src_assets/common/assets/web/public/assets/locale/zh.json
  • src_assets/common/assets/web/styles/var.css
  • src_assets/common/assets/web/styles/welcome.less
  • src_assets/common/assets/web/views/Apps.vue
  • src_assets/common/assets/web/views/Config.vue
  • src_assets/common/assets/web/views/Home.vue
  • src_assets/common/assets/web/views/Pin.vue
  • src_assets/common/sunshine-control-panel
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Windows
🧰 Additional context used
📓 Path-based instructions (1)
src_assets/**/*.{vue,js,html}

⚙️ CodeRabbit configuration file

src_assets/**/*.{vue,js,html}: 基于 Vue.js 的 Web 配置面板。审查 XSS/CSRF 安全性、 组件设计、状态管理和可访问性。

Files:

  • src_assets/common/assets/web/views/Apps.vue
  • src_assets/common/assets/web/views/Pin.vue
  • src_assets/common/assets/web/views/Config.vue
  • src_assets/common/assets/web/components/common/ResourceLink.vue
  • src_assets/common/assets/web/components/common/ResourceCard.vue
  • src_assets/common/assets/web/views/Home.vue
🪛 Stylelint (17.14.0)
src_assets/common/assets/web/styles/var.css

[error] 25-25: Expected "Inter" to be "inter" (value-keyword-case)

(value-keyword-case)


[error] 26-26: Expected "BlinkMacSystemFont" to be "blinkmacsystemfont" (value-keyword-case)

(value-keyword-case)


[error] 29-29: Expected "Menlo" to be "menlo" (value-keyword-case)

(value-keyword-case)


[error] 29-29: Expected "Monaco" to be "monaco" (value-keyword-case)

(value-keyword-case)


[error] 29-29: Expected "Consolas" to be "consolas" (value-keyword-case)

(value-keyword-case)

🔇 Additional comments (10)
src_assets/common/sunshine-control-panel (1)

1-1: LGTM!

src_assets/common/assets/web/styles/welcome.less (1)

13-13: LGTM!

src_assets/common/assets/web/views/Home.vue (1)

373-373: LGTM!

Also applies to: 394-394, 501-501, 545-545, 610-617, 767-767

src_assets/common/assets/web/components/common/ResourceCard.vue (1)

130-138: LGTM!

Also applies to: 150-152, 169-171, 194-194, 282-282

src_assets/common/assets/web/components/common/ResourceLink.vue (1)

105-106: LGTM!

Also applies to: 125-126, 173-178

src_assets/common/assets/web/views/Apps.vue (1)

4-4: LGTM!

src_assets/common/assets/web/views/Config.vue (1)

130-130: LGTM!

src_assets/common/assets/web/views/Pin.vue (1)

5-5: LGTM!

src_assets/common/assets/web/public/assets/locale/en.json (1)

775-775: LGTM!

src_assets/common/assets/web/public/assets/locale/zh.json (1)

775-775: LGTM!

@qiin2333
qiin2333 merged commit 34f7174 into master Jul 21, 2026
3 checks passed
@qiin2333
qiin2333 deleted the codex/home-typography-cards branch July 21, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant