Skip to content

fix(UI): Logs Display#1372

Merged
CodFrm merged 3 commits intorelease/v1.4from
fix/ui/logs-display
Apr 25, 2026
Merged

fix(UI): Logs Display#1372
CodFrm merged 3 commits intorelease/v1.4from
fix/ui/logs-display

Conversation

@cyfung1031
Copy link
Copy Markdown
Collaborator

Before

Screenshot 2026-04-25 at 10 15 05

After

Screenshot 2026-04-25 at 10 44 35

@cyfung1031 cyfung1031 added the UI/UX 页面操作/显示相关 label Apr 25, 2026
@CodFrm CodFrm requested a review from Copilot April 25, 2026 03:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

该 PR 主要优化选项页「日志(Logger)」的展示信息与排版:将时间范围与日志统计信息拆分并重新格式化,同时补充/调整相关多语言文案键值以匹配新的 UI 结构。

Changes:

  • 调整 Logger 页头部摘要的展示结构与样式(时间范围 + 统计信息分段显示)
  • 新增通用的句子分隔符 i18n key,并为多语言补充 to 等新文案
  • 更新部分语言下 now 的翻译以匹配新的展示语义

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/pages/options/routes/Logger.tsx 重构日志摘要行的 UI(时间范围样式化、统计信息用分隔符拼接、List 上边距调整)
src/locales/en-US/translation.json 新增 sentence-separator、新增 to
src/locales/de-DE/translation.json 新增 sentence-separator、新增 to
src/locales/ru-RU/translation.json 新增 sentence-separator、新增 to
src/locales/vi-VN/translation.json 新增 sentence-separator、新增 to
src/locales/zh-CN/translation.json 新增 sentence-separator、新增 to、调整 now
src/locales/zh-TW/translation.json 新增 sentence-separator、新增 to、调整 now
src/locales/ja-JP/translation.json 新增 sentence-separator、新增 to、调整 now
src/locales/ach-UG/translation.json 新增 to

Comment thread src/pages/options/routes/Logger.tsx Outdated
Comment on lines +350 to +357
color: "var(--color-text-4)",
}}
>
{" -- "}
</Typography.Text>
<Typography.Text
style={{
color: "var(--color-text-1)",
>
{formatUnixTime(startTime)}
{t("to")}
{isNow ? `${formatUnixTime(endTime)} (${t("now")})` : formatUnixTime(endTime)}
"clear_completed": "crwdns8082:0crwdne8082:0",
"clear_logs": "crwdns8084:0crwdne8084:0",
"to": " - ",
"now": "Now",
@CodFrm
Copy link
Copy Markdown
Member

CodFrm commented Apr 25, 2026

Code review

Found 2 issues:

  1. New <Typography.Text> blocks in the time-range header use inline style={{}} props (background/color/padding/borderRadius/marginTop) instead of UnoCSS classes (CLAUDE.md says "Use TailwindCSS (UnoCSS) for styling, avoid inline style={{}} — use tw- prefixed utility classes"). Same pattern was previously flagged in PR #1304. Suggest className="tw-bg-[var(--color-fill-2)] tw-text-[var(--color-text-1)] tw-px-2 tw-py-1 tw-rounded" etc.

<Typography.Text
style={{
background: "var(--color-fill-2)",
color: "var(--color-text-1)",
padding: "4px 8px",
borderRadius: "4px",
}}
>
{formatUnixTime(startTime)}
{t("to")}
{isNow ? `${formatUnixTime(endTime)} (${t("now")})` : formatUnixTime(endTime)}
</Typography.Text>
<Typography.Text
style={{
color: "var(--color-text-4)",
}}
>
{" -- "}
</Typography.Text>
<Typography.Text
style={{
color: "var(--color-text-1)",
}}
>
{[
t("total_logs", { length: logs.length }),
init === 4 ? t("filtered_logs", { length: queryLogs.length }) : t("enter_filter_conditions"),
].join(t("sentence-separator"))}
</Typography.Text>
<List
style={{
marginTop: "4px",

  1. The " -- " divider between the time-range block and the stats block is a hardcoded literal, while the same PR introduces locale-aware "sentence-separator" and "to" keys for surrounding text. This is inconsistent with the PR's own i18n approach, will not adapt to locale-specific dash conventions (the "to" key already varies between " — ", " ~ ", " 至 "), and triggers the project's react/jsx-no-literals rule. Either add a localizable separator key or render the divider via CSS (margin/border) on the adjacent elements.

<Typography.Text
style={{
color: "var(--color-text-4)",
}}
>
{" -- "}
</Typography.Text>
<Typography.Text

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

按 CLAUDE.md 约定,避免使用内联 style,改用 tw- 前缀工具类。
@CodFrm CodFrm merged commit 982f09e into release/v1.4 Apr 25, 2026
3 of 4 checks passed
@CodFrm CodFrm deleted the fix/ui/logs-display branch April 25, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

UI/UX 页面操作/显示相关

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants