Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/pages/options/routes/Logger.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useEffect } from "react";
import { BackTop, Button, Card, DatePicker, Input, List, Message, Space } from "@arco-design/web-react";
import { BackTop, Button, Card, DatePicker, Input, List, Message, Space, Typography } from "@arco-design/web-react";
import dayjs from "dayjs";
import Text from "@arco-design/web-react/es/Typography/text";
import type { Logger } from "@App/app/repo/logger";
import { LoggerDAO } from "@App/app/repo/logger";
import type { Labels, Query } from "@App/pages/components/LogLabel";
Expand Down Expand Up @@ -76,7 +75,7 @@
onQueryLog();
setInit(2);
}
}, [init]);

Check warning on line 78 in src/pages/options/routes/Logger.tsx

View workflow job for this annotation

GitHub Actions / Run tests

React Hook useEffect has missing dependencies: 'defaultQuery' and 'onQueryLog'. Either include them or remove the dependency array

useEffect(() => {
loggerDAO.queryLogs(startTime * 1000, endTime * 1000).then((l) => {
Expand Down Expand Up @@ -289,12 +288,12 @@
boxSizing: "border-box",
}}
>
<Text>
<Typography.Text>
{formatUnixTime(startTime)} {t("to")} {formatUnixTime(endTime)} {t("total_logs", { length: logs.length })}
{init === 4
? `, ${t("filtered_logs", { length: queryLogs.length })}`
: `, ${t("enter_filter_conditions")}`}
</Text>
</Typography.Text>
<List
style={{
height: "100%",
Expand Down
5 changes: 2 additions & 3 deletions src/pages/options/routes/ScriptList/ScriptTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import {
} from "react-icons/ri";
import { Link, useNavigate } from "react-router-dom";
import type { RefInputType } from "@arco-design/web-react/es/Input/interface";
import Text from "@arco-design/web-react/es/Typography/text";
import type { DragEndEvent } from "@dnd-kit/core";
import { closestCenter, DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from "@dnd-kit/core";
import {
Expand Down Expand Up @@ -418,7 +417,7 @@ const NameCell = React.memo(({ col, item }: { col: string; item: ListType }) =>
textDecoration: "none",
}}
>
<Text
<Typography.Text
style={{
display: "block",
overflow: "hidden",
Expand All @@ -438,7 +437,7 @@ const NameCell = React.memo(({ col, item }: { col: string; item: ListType }) =>
))}
</Space>
)}
</Text>
</Typography.Text>
</Link>
</Tooltip>
);
Expand Down
7 changes: 3 additions & 4 deletions src/pages/options/routes/ScriptList/components.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { SCRIPT_STATUS } from "@App/app/repo/scripts";
import { SCRIPT_STATUS_ENABLE } from "@App/app/repo/scripts";
import { scriptClient, type ScriptLoading } from "@App/pages/store/features/script";
import { Avatar, Message, Switch, Tag, Tooltip } from "@arco-design/web-react";
import { Avatar, Message, Switch, Tag, Tooltip, Typography } from "@arco-design/web-react";
import React from "react";
import Text from "@arco-design/web-react/es/Typography/text";
import { TbWorldWww } from "react-icons/tb";
import { semTime } from "@App/pkg/utils/dayjs";
import { useTranslation } from "react-i18next";
Expand Down Expand Up @@ -165,15 +164,15 @@ export const UpdateTimeCell = React.memo(({ className, script }: { className?: s

return (
<Tooltip content={t("check_update")} position="tl">
<Text
<Typography.Text
className={className}
style={{
cursor: "pointer",
}}
onClick={handleClick}
>
{script.updatetime && semTime(new Date(script.updatetime))}
</Text>
</Typography.Text>
</Tooltip>
);
});
Expand Down
18 changes: 14 additions & 4 deletions src/pages/options/routes/SubscribeList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import { useEffect, useRef, useState } from "react";
import Text from "@arco-design/web-react/es/Typography/text";
import { Button, Card, Input, Message, Popconfirm, Switch, Table, Tag, Tooltip } from "@arco-design/web-react";
import {
Button,
Card,
Input,
Message,
Popconfirm,
Switch,
Table,
Tag,
Tooltip,
Typography,
} from "@arco-design/web-react";
import type { Subscribe } from "@App/app/repo/subscribe";
import { SUBSCRIBE_STATUS_DISABLE, SUBSCRIBE_STATUS_ENABLE, SubscribeDAO } from "@App/app/repo/subscribe";
import type { ColumnProps } from "@arco-design/web-react/es/Table";
Expand Down Expand Up @@ -134,7 +144,7 @@ function SubscribeList() {
render: (col) => {
return (
<Tooltip content={col} position="tl">
<Text
<Typography.Text
style={{
display: "block",
overflow: "hidden",
Expand All @@ -143,7 +153,7 @@ function SubscribeList() {
}}
>
{col}
</Text>
</Typography.Text>
</Tooltip>
);
},
Expand Down
10 changes: 5 additions & 5 deletions src/pages/options/routes/Tools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
Modal,
Popconfirm,
Space,
Typography,
} from "@arco-design/web-react";
import Title from "@arco-design/web-react/es/Typography/title";
import { formatUnixTime } from "@App/pkg/utils/day_format";
import FileSystemParams from "@App/pages/components/FileSystemParams";
import { IconQuestionCircleFill } from "@arco-design/web-react/icon";
Expand Down Expand Up @@ -51,7 +51,7 @@ function Tools() {
{contextHolder}
<Card className="backup" title={t("backup")} bordered={false}>
<Space direction="vertical">
<Title heading={6}>{t("local")}</Title>
<Typography.Title heading={6}>{t("local")}</Typography.Title>
<Space>
<input type="file" ref={fileRef} style={{ display: "none" }} accept=".zip" />
<Button
Expand Down Expand Up @@ -91,7 +91,7 @@ function Tools() {
{t("import_file")}
</Button>
</Space>
<Title heading={6}>{t("cloud")}</Title>
<Typography.Title heading={6}>{t("cloud")}</Typography.Title>
<FileSystemParams
preNode={t("backup_to")}
onChangeFileSystemType={(type) => {
Expand Down Expand Up @@ -255,7 +255,7 @@ function Tools() {
)}
/>
</Drawer>
<Title heading={6}>{t("backup_strategy")}</Title>
<Typography.Title heading={6}>{t("backup_strategy")}</Typography.Title>
<Empty description={t("under_construction")} />
<Popconfirm
title={t("migration_confirm_message")}
Expand Down Expand Up @@ -293,7 +293,7 @@ function Tools() {
bordered={false}
>
<Space direction="vertical">
<Title heading={6}>{t("vscode_url")}</Title>
<Typography.Title heading={6}>{t("vscode_url")}</Typography.Title>
<Input
ref={vscodeRef}
value={vscodeUrl}
Expand Down
Loading