Skip to content

Commit a70400c

Browse files
authored
🎨 修正 Typography 引用 (#984)
* 修正 Typography 引用 * merge fix
1 parent 80d8fec commit a70400c

File tree

5 files changed

+27
-20
lines changed

5 files changed

+27
-20
lines changed

src/pages/options/routes/Logger.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { useEffect } from "react";
2-
import { BackTop, Button, Card, DatePicker, Input, List, Message, Space } from "@arco-design/web-react";
2+
import { BackTop, Button, Card, DatePicker, Input, List, Message, Space, Typography } from "@arco-design/web-react";
33
import dayjs from "dayjs";
4-
import Text from "@arco-design/web-react/es/Typography/text";
54
import type { Logger } from "@App/app/repo/logger";
65
import { LoggerDAO } from "@App/app/repo/logger";
76
import type { Labels, Query } from "@App/pages/components/LogLabel";
@@ -289,12 +288,12 @@ function LoggerPage() {
289288
boxSizing: "border-box",
290289
}}
291290
>
292-
<Text>
291+
<Typography.Text>
293292
{formatUnixTime(startTime)} {t("to")} {formatUnixTime(endTime)} {t("total_logs", { length: logs.length })}
294293
{init === 4
295294
? `, ${t("filtered_logs", { length: queryLogs.length })}`
296295
: `, ${t("enter_filter_conditions")}`}
297-
</Text>
296+
</Typography.Text>
298297
<List
299298
style={{
300299
height: "100%",

src/pages/options/routes/ScriptList/ScriptTable.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import {
3838
RiUploadCloudFill,
3939
} from "react-icons/ri";
4040
import { Link, useNavigate } from "react-router-dom";
41-
import Text from "@arco-design/web-react/es/Typography/text";
4241
import type { DragEndEvent } from "@dnd-kit/core";
4342
import { closestCenter, DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from "@dnd-kit/core";
4443
import {
@@ -376,7 +375,7 @@ const NameCell = React.memo(({ col, item }: { col: string; item: ListType }) =>
376375
textDecoration: "none",
377376
}}
378377
>
379-
<Text
378+
<Typography.Text
380379
style={{
381380
display: "block",
382381
overflow: "hidden",
@@ -396,7 +395,7 @@ const NameCell = React.memo(({ col, item }: { col: string; item: ListType }) =>
396395
))}
397396
</Space>
398397
)}
399-
</Text>
398+
</Typography.Text>
400399
</Link>
401400
</Tooltip>
402401
);

src/pages/options/routes/ScriptList/components.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import type { SCRIPT_STATUS } from "@App/app/repo/scripts";
22
import { SCRIPT_STATUS_ENABLE } from "@App/app/repo/scripts";
33
import { scriptClient, type ScriptLoading } from "@App/pages/store/features/script";
4-
import { Avatar, Input, Message, Select, Space, Switch, Tag, Tooltip } from "@arco-design/web-react";
4+
import { Avatar, Input, Message, Select, Space, Switch, Tag, Tooltip, Typography } from "@arco-design/web-react";
55
import React from "react";
6-
import Text from "@arco-design/web-react/es/Typography/text";
76
import { TbWorldWww } from "react-icons/tb";
87
import { semTime } from "@App/pkg/utils/dayjs";
98
import { useTranslation } from "react-i18next";
@@ -168,15 +167,15 @@ export const UpdateTimeCell = React.memo(({ className, script }: { className?: s
168167

169168
return (
170169
<Tooltip content={t("check_update")} position="tl">
171-
<Text
170+
<Typography.Text
172171
className={className}
173172
style={{
174173
cursor: "pointer",
175174
}}
176175
onClick={handleClick}
177176
>
178177
{script.updatetime && semTime(new Date(script.updatetime))}
179-
</Text>
178+
</Typography.Text>
180179
</Tooltip>
181180
);
182181
});

src/pages/options/routes/SubscribeList.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import { useEffect, useState } from "react";
2-
import Text from "@arco-design/web-react/es/Typography/text";
3-
import { Button, Card, Input, Message, Popconfirm, Switch, Table, Tag, Tooltip } from "@arco-design/web-react";
2+
import {
3+
Button,
4+
Card,
5+
Input,
6+
Message,
7+
Popconfirm,
8+
Switch,
9+
Table,
10+
Tag,
11+
Tooltip,
12+
Typography,
13+
} from "@arco-design/web-react";
414
import type { Subscribe } from "@App/app/repo/subscribe";
515
import { SUBSCRIBE_STATUS_DISABLE, SUBSCRIBE_STATUS_ENABLE, SubscribeDAO } from "@App/app/repo/subscribe";
616
import type { ColumnProps } from "@arco-design/web-react/es/Table";
@@ -127,7 +137,7 @@ function SubscribeList() {
127137
render: (col) => {
128138
return (
129139
<Tooltip content={col} position="tl">
130-
<Text
140+
<Typography.Text
131141
style={{
132142
display: "block",
133143
overflow: "hidden",
@@ -136,7 +146,7 @@ function SubscribeList() {
136146
}}
137147
>
138148
{col}
139-
</Text>
149+
</Typography.Text>
140150
</Tooltip>
141151
);
142152
},

src/pages/options/routes/Tools.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
Modal,
1212
Popconfirm,
1313
Space,
14+
Typography,
1415
} from "@arco-design/web-react";
15-
import Title from "@arco-design/web-react/es/Typography/title";
1616
import { formatUnixTime } from "@App/pkg/utils/day_format";
1717
import FileSystemParams from "@App/pages/components/FileSystemParams";
1818
import { IconQuestionCircleFill } from "@arco-design/web-react/icon";
@@ -51,7 +51,7 @@ function Tools() {
5151
>
5252
<Card className="backup" title={t("backup")} bordered={false}>
5353
<Space direction="vertical">
54-
<Title heading={6}>{t("local")}</Title>
54+
<Typography.Title heading={6}>{t("local")}</Typography.Title>
5555
<Space>
5656
<input type="file" ref={fileRef} style={{ display: "none" }} accept=".zip" />
5757
<Button
@@ -91,7 +91,7 @@ function Tools() {
9191
{t("import_file")}
9292
</Button>
9393
</Space>
94-
<Title heading={6}>{t("cloud")}</Title>
94+
<Typography.Title heading={6}>{t("cloud")}</Typography.Title>
9595
<FileSystemParams
9696
preNode={t("backup_to")}
9797
onChangeFileSystemType={(type) => {
@@ -255,7 +255,7 @@ function Tools() {
255255
)}
256256
/>
257257
</Drawer>
258-
<Title heading={6}>{t("backup_strategy")}</Title>
258+
<Typography.Title heading={6}>{t("backup_strategy")}</Typography.Title>
259259
<Empty description={t("under_construction")} />
260260
<Popconfirm
261261
title={t("migration_confirm_message")}
@@ -293,7 +293,7 @@ function Tools() {
293293
bordered={false}
294294
>
295295
<Space direction="vertical">
296-
<Title heading={6}>{t("vscode_url")}</Title>
296+
<Typography.Title heading={6}>{t("vscode_url")}</Typography.Title>
297297
<Input
298298
ref={vscodeRef}
299299
value={vscodeUrl}

0 commit comments

Comments
 (0)