Skip to content

Commit 1938379

Browse files
committed
♻️ 用 UnoCSS 类替换 Logger 内联 style
按 CLAUDE.md 约定,避免使用内联 style,改用 tw- 前缀工具类。
1 parent d94851f commit 1938379

1 file changed

Lines changed: 4 additions & 21 deletions

File tree

src/pages/options/routes/Logger.tsx

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -333,38 +333,21 @@ function LoggerPage() {
333333
boxSizing: "border-box",
334334
}}
335335
>
336-
<Typography.Text
337-
style={{
338-
background: "var(--color-fill-2)",
339-
color: "var(--color-text-1)",
340-
padding: "4px 8px",
341-
borderRadius: "4px",
342-
}}
343-
>
336+
<Typography.Text className="tw-bg-[var(--color-fill-2)] tw-text-[var(--color-text-1)] tw-px-2 tw-py-1 tw-rounded">
344337
{formatUnixTime(startTime)}
345338
{t("to")}
346339
{isNow ? `${formatUnixTime(endTime)} (${t("now")})` : formatUnixTime(endTime)}
347340
</Typography.Text>
348-
<Typography.Text
349-
style={{
350-
color: "var(--color-text-4)",
351-
}}
352-
>
353-
{" -- "}
354-
</Typography.Text>
355-
<Typography.Text
356-
style={{
357-
color: "var(--color-text-1)",
358-
}}
359-
>
341+
<Typography.Text className="tw-text-[var(--color-text-4)]">{" -- "}</Typography.Text>
342+
<Typography.Text className="tw-text-[var(--color-text-1)]">
360343
{[
361344
t("total_logs", { length: logs.length }),
362345
init === 4 ? t("filtered_logs", { length: queryLogs.length }) : t("enter_filter_conditions"),
363346
].join(t("sentence-separator"))}
364347
</Typography.Text>
365348
<List
349+
className="tw-mt-1"
366350
style={{
367-
marginTop: "4px",
368351
height: "100%",
369352
overflow: "auto",
370353
}}

0 commit comments

Comments
 (0)