style(ui): eslint-sort-imports
This commit is contained in:
@@ -1,68 +0,0 @@
|
||||
import { CloudUpload, GitFork, Megaphone, NotebookPen } from "lucide-react";
|
||||
|
||||
import { WorkflowNodeType } from "@/domain/workflow";
|
||||
|
||||
type NodeTypesPanelProps = {
|
||||
onTypeSelected: (type: WorkflowNodeType) => void;
|
||||
};
|
||||
|
||||
const NodeTypesPanel = ({ onTypeSelected }: NodeTypesPanelProps) => {
|
||||
return (
|
||||
<>
|
||||
<div className="flex space-x-2">
|
||||
<div
|
||||
className="flex w-1/2 items-center space-x-2 hover:bg-stone-100 p-2 rounded-md"
|
||||
onClick={() => {
|
||||
onTypeSelected(WorkflowNodeType.Apply);
|
||||
}}
|
||||
>
|
||||
<div className="bg-primary h-12 w-12 flex items-center justify-center rounded-full">
|
||||
<NotebookPen className="text-white" size={18} />
|
||||
</div>
|
||||
|
||||
<div className="text-slate-600">申请</div>
|
||||
</div>
|
||||
<div
|
||||
className="flex w-1/2 items-center space-x-2 hover:bg-stone-100 p-2 rounded-md"
|
||||
onClick={() => {
|
||||
onTypeSelected(WorkflowNodeType.Deploy);
|
||||
}}
|
||||
>
|
||||
<div className="bg-primary h-12 w-12 flex items-center justify-center rounded-full">
|
||||
<CloudUpload className="text-white" size={18} />
|
||||
</div>
|
||||
|
||||
<div className="text-slate-600">部署</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex space-x-2">
|
||||
<div
|
||||
className="flex w-1/2 items-center space-x-2 hover:bg-stone-100 p-2 rounded-md"
|
||||
onClick={() => {
|
||||
onTypeSelected(WorkflowNodeType.Branch);
|
||||
}}
|
||||
>
|
||||
<div className="bg-primary h-12 w-12 flex items-center justify-center rounded-full">
|
||||
<GitFork className="text-white" size={18} />
|
||||
</div>
|
||||
|
||||
<div className="text-slate-600">分支</div>
|
||||
</div>
|
||||
<div
|
||||
className="flex w-1/2 items-center space-x-2 hover:bg-stone-100 p-2 rounded-md"
|
||||
onClick={() => {
|
||||
onTypeSelected(WorkflowNodeType.Notify);
|
||||
}}
|
||||
>
|
||||
<div className="bg-primary h-12 w-12 flex items-center justify-center rounded-full">
|
||||
<Megaphone className="text-white" size={18} />
|
||||
</div>
|
||||
|
||||
<div className="text-slate-600">推送</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default NodeTypesPanel;
|
||||
@@ -2,7 +2,7 @@ import { memo, useCallback, useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FormOutlined as FormOutlinedIcon, PlusOutlined as PlusOutlinedIcon, QuestionCircleOutlined as QuestionCircleOutlinedIcon } from "@ant-design/icons";
|
||||
import { useControllableValue } from "ahooks";
|
||||
import { AutoComplete, Button, Divider, Form, Input, Select, Space, Switch, Tooltip, Typography, type AutoCompleteProps } from "antd";
|
||||
import { AutoComplete, type AutoCompleteProps, Button, Divider, Form, Input, Select, Space, Switch, Tooltip, Typography } from "antd";
|
||||
import { createSchemaFieldRule } from "antd-zod";
|
||||
import { produce } from "immer";
|
||||
import { z } from "zod";
|
||||
@@ -12,7 +12,7 @@ import AccessSelect from "@/components/access/AccessSelect";
|
||||
import ModalForm from "@/components/core/ModalForm";
|
||||
import MultipleInput from "@/components/core/MultipleInput";
|
||||
import { ACCESS_USAGES, accessProvidersMap } from "@/domain/provider";
|
||||
import { type WorkflowNode, type WorkflowNodeConfig } from "@/domain/workflow";
|
||||
import { type WorkflowNode } from "@/domain/workflow";
|
||||
import { useAntdForm, useZustandShallowSelector } from "@/hooks";
|
||||
import { useContactEmailsStore } from "@/stores/contact";
|
||||
import { useWorkflowStore } from "@/stores/workflow";
|
||||
@@ -25,7 +25,7 @@ export type ApplyNodeFormProps = {
|
||||
|
||||
const MULTIPLE_INPUT_DELIMITER = ";";
|
||||
|
||||
const initFormModel = (): WorkflowNodeConfig => {
|
||||
const initFormModel = () => {
|
||||
return {
|
||||
domain: "",
|
||||
keyAlgorithm: "RSA2048",
|
||||
|
||||
@@ -8,8 +8,8 @@ import { z } from "zod";
|
||||
|
||||
import AccessEditModal from "@/components/access/AccessEditModal";
|
||||
import AccessSelect from "@/components/access/AccessSelect";
|
||||
import { ACCESS_USAGES, accessProvidersMap, DEPLOY_PROVIDERS, deployProvidersMap } from "@/domain/provider";
|
||||
import { type WorkflowNode, type WorkflowNodeConfig } from "@/domain/workflow";
|
||||
import { ACCESS_USAGES, DEPLOY_PROVIDERS, accessProvidersMap, deployProvidersMap } from "@/domain/provider";
|
||||
import { type WorkflowNode } from "@/domain/workflow";
|
||||
import { useAntdForm, useZustandShallowSelector } from "@/hooks";
|
||||
import { useWorkflowStore } from "@/stores/workflow";
|
||||
import { usePanel } from "../PanelProvider";
|
||||
@@ -42,7 +42,7 @@ export type DeployFormProps = {
|
||||
defaultProivderType?: string;
|
||||
};
|
||||
|
||||
const initFormModel = (): WorkflowNodeConfig => {
|
||||
const initFormModel = () => {
|
||||
return {};
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import { produce } from "immer";
|
||||
import { z } from "zod";
|
||||
|
||||
import { notifyChannelsMap } from "@/domain/settings";
|
||||
import { type WorkflowNode, type WorkflowNodeConfig } from "@/domain/workflow";
|
||||
import { type WorkflowNode } from "@/domain/workflow";
|
||||
import { useAntdForm, useZustandShallowSelector } from "@/hooks";
|
||||
import { useNotifyChannelsStore } from "@/stores/notify";
|
||||
import { useWorkflowStore } from "@/stores/workflow";
|
||||
@@ -18,7 +18,7 @@ export type NotifyNodeFormProps = {
|
||||
data: WorkflowNode;
|
||||
};
|
||||
|
||||
const initFormModel = (): WorkflowNodeConfig => {
|
||||
const initFormModel = () => {
|
||||
return {
|
||||
subject: "Completed!",
|
||||
message: "Your workflow has been completed on Certimate.",
|
||||
|
||||
@@ -7,17 +7,17 @@ import { produce } from "immer";
|
||||
import { z } from "zod";
|
||||
|
||||
import Show from "@/components/Show";
|
||||
import { type WorkflowNode, type WorkflowNodeConfig } from "@/domain/workflow";
|
||||
import { type WorkflowNode } from "@/domain/workflow";
|
||||
import { useAntdForm, useZustandShallowSelector } from "@/hooks";
|
||||
import { useWorkflowStore } from "@/stores/workflow";
|
||||
import { validCronExpression, getNextCronExecutions } from "@/utils/cron";
|
||||
import { getNextCronExecutions, validCronExpression } from "@/utils/cron";
|
||||
import { usePanel } from "../PanelProvider";
|
||||
|
||||
export type StartNodeFormProps = {
|
||||
data: WorkflowNode;
|
||||
};
|
||||
|
||||
const initFormModel = (): WorkflowNodeConfig => {
|
||||
const initFormModel = () => {
|
||||
return {
|
||||
executionMethod: "auto",
|
||||
crontab: "0 0 * * *",
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
SelectOutlined as SelectOutlinedIcon,
|
||||
} from "@ant-design/icons";
|
||||
import { useRequest } from "ahooks";
|
||||
import { Button, Empty, notification, Space, Table, theme, Typography, type TableProps } from "antd";
|
||||
import { Button, Empty, Space, Table, type TableProps, Typography, notification, theme } from "antd";
|
||||
import { ClientResponseError } from "pocketbase";
|
||||
|
||||
import { type WorkflowRunModel } from "@/domain/workflowRun";
|
||||
|
||||
Reference in New Issue
Block a user