style(ui): eslint-sort-imports

This commit is contained in:
Fu Diwei
2025-01-02 12:50:38 +08:00
parent 1588179bc9
commit b6dd2248c8
51 changed files with 84 additions and 137 deletions

View File

@@ -13,7 +13,7 @@ import {
SettingOutlined as SettingOutlinedIcon,
SunOutlined as SunOutlinedIcon,
} from "@ant-design/icons";
import { Button, Drawer, Dropdown, Layout, Menu, Tooltip, theme, type ButtonProps, type MenuProps } from "antd";
import { Button, type ButtonProps, Drawer, Dropdown, Layout, Menu, type MenuProps, Tooltip, theme } from "antd";
import Version from "@/components/core/Version";
import { useBrowserTheme } from "@/hooks";

View File

@@ -8,7 +8,7 @@ import {
} from "@ant-design/icons";
import { PageHeader } from "@ant-design/pro-components";
import { useRequest } from "ahooks";
import { Avatar, Button, Empty, Modal, notification, Space, Table, Tooltip, Typography, type TableProps } from "antd";
import { Avatar, Button, Empty, Modal, Space, Table, type TableProps, Tooltip, Typography, notification } from "antd";
import dayjs from "dayjs";
import { ClientResponseError } from "pocketbase";

View File

@@ -4,13 +4,13 @@ import { useNavigate, useSearchParams } from "react-router-dom";
import { DeleteOutlined as DeleteOutlinedIcon, SelectOutlined as SelectOutlinedIcon } from "@ant-design/icons";
import { PageHeader } from "@ant-design/pro-components";
import { useRequest } from "ahooks";
import { Button, Divider, Empty, Menu, notification, Radio, Space, Table, theme, Tooltip, Typography, type MenuProps, type TableProps } from "antd";
import { Button, Divider, Empty, Menu, type MenuProps, Radio, Space, Table, type TableProps, Tooltip, Typography, notification, theme } from "antd";
import dayjs from "dayjs";
import { ClientResponseError } from "pocketbase";
import CertificateDetailDrawer from "@/components/certificate/CertificateDetailDrawer";
import { type CertificateModel } from "@/domain/certificate";
import { list as listCertificate, type ListCertificateRequest } from "@/repository/certificate";
import { type ListCertificateRequest, list as listCertificate } from "@/repository/certificate";
import { getErrMsg } from "@/utils/error";
const CertificateList = () => {

View File

@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { PageHeader } from "@ant-design/pro-components";
import { useRequest } from "ahooks";
import { Card, Col, Divider, notification, Row, Space, Statistic, theme, Typography } from "antd";
import { Card, Col, Divider, Row, Space, Statistic, Typography, notification, theme } from "antd";
import {
CalendarClock as CalendarClockIcon,
CalendarX2 as CalendarX2Icon,

View File

@@ -2,13 +2,13 @@ import { createContext, useContext, useEffect, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { CheckCard } from "@ant-design/pro-components";
import { useDeepCompareEffect } from "ahooks";
import { Button, Form, Input, message, notification, Skeleton } from "antd";
import { Button, Form, Input, Skeleton, message, notification } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { produce } from "immer";
import { z } from "zod";
import Show from "@/components/Show";
import { SETTINGS_NAMES, SSLPROVIDERS, type SettingsModel, type SSLProviderSettingsContent, type SSLProviders } from "@/domain/settings";
import { SETTINGS_NAMES, SSLPROVIDERS, type SSLProviderSettingsContent, type SSLProviders, type SettingsModel } from "@/domain/settings";
import { useAntdForm } from "@/hooks";
import { get as getSettings, save as saveSettings } from "@/repository/settings";
import { getErrMsg } from "@/utils/error";

View File

@@ -11,7 +11,7 @@ import {
} from "@ant-design/icons";
import { PageHeader } from "@ant-design/pro-components";
import { useDeepCompareEffect } from "ahooks";
import { Button, Card, Dropdown, Form, Input, message, Modal, notification, Space, Tabs, Typography } from "antd";
import { Button, Card, Dropdown, Form, Input, Modal, Space, Tabs, Typography, message, notification } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { ClientResponseError } from "pocketbase";
import { isEqual } from "radash";
@@ -24,7 +24,7 @@ import End from "@/components/workflow/End";
import NodeRender from "@/components/workflow/NodeRender";
import WorkflowProvider from "@/components/workflow/WorkflowProvider";
import WorkflowRuns from "@/components/workflow/run/WorkflowRuns";
import { isAllNodesValidated, type WorkflowModel, type WorkflowNode } from "@/domain/workflow";
import { type WorkflowModel, type WorkflowNode, isAllNodesValidated } from "@/domain/workflow";
import { useAntdForm, useZustandShallowSelector } from "@/hooks";
import { remove as removeWorkflow } from "@/repository/workflow";
import { useWorkflowStore } from "@/stores/workflow";

View File

@@ -9,23 +9,23 @@ import {
Divider,
Empty,
Menu,
message,
type MenuProps,
Modal,
notification,
Radio,
Space,
Switch,
Table,
theme,
type TableProps,
Tooltip,
Typography,
type MenuProps,
type TableProps,
message,
notification,
theme,
} from "antd";
import dayjs from "dayjs";
import { ClientResponseError } from "pocketbase";
import { isAllNodesValidated, type WorkflowModel } from "@/domain/workflow";
import { type WorkflowModel, isAllNodesValidated } from "@/domain/workflow";
import { list as listWorkflow, remove as removeWorkflow, save as saveWorkflow } from "@/repository/workflow";
import { getErrMsg } from "@/utils/error";
@@ -239,6 +239,10 @@ const WorkflowList = () => {
}
);
const handleCreateClick = () => {
navigate("/workflows/new");
};
const handleEnabledChange = async (workflow: WorkflowModel) => {
try {
if (!workflow.enabled && !isAllNodesValidated(workflow.content!)) {
@@ -284,10 +288,6 @@ const WorkflowList = () => {
});
};
const handleCreateClick = () => {
alert("TODO");
};
return (
<div className="p-4">
{MessageContextHolder}