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

@ -86,6 +86,12 @@ module.exports = {
allowConstantExport: true,
},
],
"sort-imports": [
"error",
{
ignoreDeclarationSort: true,
},
],
},
settings: {
"import/resolver": {

View File

@ -1,7 +1,7 @@
import { useEffect, useLayoutEffect, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { RouterProvider } from "react-router-dom";
import { App, ConfigProvider, theme, type ThemeConfig } from "antd";
import { App, ConfigProvider, type ThemeConfig, theme } from "antd";
import { type Locale } from "antd/es/locale";
import AntdLocaleEnUs from "antd/locale/en_US";
import AntdLocaleZhCN from "antd/locale/zh_CN";

View File

@ -1,7 +1,7 @@
import { forwardRef, useEffect, useImperativeHandle, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import { useCreation } from "ahooks";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, Select, type FormInstance } from "antd";
import { Form, type FormInstance, Input, Select } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -3,7 +3,7 @@ import { flushSync } from "react-dom";
import { useTranslation } from "react-i18next";
import { UploadOutlined as UploadOutlinedIcon } from "@ant-design/icons";
import { useDeepCompareEffect } from "ahooks";
import { Button, Form, Input, Upload, type FormInstance, type UploadFile, type UploadProps } from "antd";
import { Button, Form, type FormInstance, Input, Upload, type UploadFile, type UploadProps } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -3,7 +3,7 @@ import { flushSync } from "react-dom";
import { useTranslation } from "react-i18next";
import { UploadOutlined as UploadOutlinedIcon } from "@ant-design/icons";
import { useDeepCompareEffect } from "ahooks";
import { Button, Form, Input, InputNumber, Upload, type FormInstance, type UploadFile, type UploadProps } from "antd";
import { Button, Form, type FormInstance, Input, InputNumber, Upload, type UploadFile, type UploadProps } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, Input, type FormInstance } from "antd";
import { Form, type FormInstance, Input } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";

View File

@ -1,6 +1,6 @@
import { memo } from "react";
import { useTranslation } from "react-i18next";
import { Avatar, Select, Space, Tag, Typography, type SelectProps } from "antd";
import { Avatar, Select, type SelectProps, Space, Tag, Typography } from "antd";
import { ACCESS_USAGES, accessProvidersMap } from "@/domain/provider";

View File

@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
import { Avatar, Select, Space, Typography, type SelectProps } from "antd";
import { Avatar, Select, type SelectProps, Space, Typography } from "antd";
import { type AccessModel } from "@/domain/access";
import { accessProvidersMap } from "@/domain/provider";

View File

@ -1,7 +1,7 @@
import { CopyToClipboard } from "react-copy-to-clipboard";
import { useTranslation } from "react-i18next";
import { CopyOutlined as CopyOutlinedIcon, DownOutlined as DownOutlinedIcon, LikeOutlined as LikeOutlinedIcon } from "@ant-design/icons";
import { Button, Dropdown, Form, Input, message, Space, Tooltip } from "antd";
import { Button, Dropdown, Form, Input, Space, Tooltip, message } from "antd";
import dayjs from "dayjs";
import { type CertificateModel } from "@/domain/certificate";

View File

@ -1,6 +1,6 @@
import { useTranslation } from "react-i18next";
import { useControllableValue } from "ahooks";
import { Button, Drawer, Form, Space, type DrawerProps, type FormProps, type ModalProps } from "antd";
import { Button, Drawer, type DrawerProps, Form, type FormProps, type ModalProps, Space } from "antd";
import { useAntdForm, useTriggerElement } from "@/hooks";

View File

@ -1,5 +1,5 @@
import { useControllableValue } from "ahooks";
import { Form, Modal, type FormProps, type ModalProps } from "antd";
import { Form, type FormProps, Modal, type ModalProps } from "antd";
import { useAntdForm, useTriggerElement } from "@/hooks";

View File

@ -1,4 +1,4 @@
import { forwardRef, useImperativeHandle, useMemo, useRef, type ChangeEvent } from "react";
import { type ChangeEvent, forwardRef, useImperativeHandle, useMemo, useRef } from "react";
import { useTranslation } from "react-i18next";
import {
ArrowDownOutlined as ArrowDownOutlinedIcon,
@ -7,7 +7,7 @@ import {
PlusOutlined as PlusOutlinedIcon,
} from "@ant-design/icons";
import { useControllableValue } from "ahooks";
import { Button, Input, Space, type InputRef, type InputProps } from "antd";
import { Button, Input, type InputProps, type InputRef, Space } from "antd";
import { produce } from "immer";
export type MultipleInputProps = Omit<InputProps, "count" | "defaultValue" | "showCount" | "value" | "onChange" | "onPressEnter" | "onClear"> & {

View File

@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { useDeepCompareMemo } from "@ant-design/pro-components";
import { Button, Collapse, message, notification, Skeleton, Space, Switch, type CollapseProps } from "antd";
import { Button, Collapse, type CollapseProps, Skeleton, Space, Switch, message, notification } from "antd";
import Show from "@/components/Show";
import { notifyChannelsMap } from "@/domain/settings";

View File

@ -1,13 +1,13 @@
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { useRequest } 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 { ClientResponseError } from "pocketbase";
import { z } from "zod";
import Show from "@/components/Show";
import { defaultNotifyTemplate, SETTINGS_NAMES, type NotifyTemplatesSettingsContent } from "@/domain/settings";
import { type NotifyTemplatesSettingsContent, SETTINGS_NAMES, defaultNotifyTemplate } from "@/domain/settings";
import { useAntdForm } from "@/hooks";
import { get as getSettings, save as saveSettings } from "@/repository/settings";
import { getErrMsg } from "@/utils/error";

View File

@ -1,6 +1,6 @@
import { useTranslation } from "react-i18next";
import { useRequest } from "ahooks";
import { Button, message, notification, type ButtonProps } from "antd";
import { Button, type ButtonProps, message, notification } from "antd";
import { notifyTest } from "@/api/notify";
import { getErrMsg } from "@/utils/error";

View File

@ -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;

View File

@ -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",

View File

@ -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 {};
};

View File

@ -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.",

View File

@ -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 * * *",

View File

@ -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";

6
ui/src/global.d.ts vendored
View File

@ -2,12 +2,16 @@
declare global {
declare interface BaseModel extends PbBaseModel {
deleted?: string;
created: ISO8601String;
updated: ISO8601String;
deleted?: ISO8601String;
}
declare type MaybeModelRecord<T extends BaseModel = BaseModel> = T | Omit<T, "id" | "created" | "updated" | "deleted">;
declare type MaybeModelRecordWithId<T extends BaseModel = BaseModel> = T | Pick<T, "id">;
declare type ISO8601String = string;
}
export {};

View File

@ -1,4 +1,4 @@
import { cloneElement, createElement, Fragment, isValidElement, useMemo } from "react";
import { Fragment, cloneElement, createElement, isValidElement, useMemo } from "react";
export type UseTriggerElementOptions = {
onClick?: (e: MouseEvent) => void;

View File

@ -1,5 +1,5 @@
import { useRef } from "react";
import { pick, isArray } from "radash";
import { isArray, pick } from "radash";
import { shallow } from "zustand/shallow";
type MaybeMany<T> = T | readonly T[];

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}

View File

@ -13,6 +13,7 @@ import SettingsPassword from "./pages/settings/SettingsPassword";
import SettingsSSLProvider from "./pages/settings/SettingsSSLProvider";
import WorkflowDetail from "./pages/workflows/WorkflowDetail";
import WorkflowList from "./pages/workflows/WorkflowList";
import WorkflowNew from "./pages/workflows/WorkflowNew";
export const router = createHashRouter([
{
@ -35,6 +36,10 @@ export const router = createHashRouter([
path: "/workflows",
element: <WorkflowList />,
},
{
path: "/workflows/new",
element: <WorkflowNew />,
},
{
path: "/workflows/:id",
element: <WorkflowDetail />,

View File

@ -2,7 +2,7 @@
import { create } from "zustand";
import { type AccessModel } from "@/domain/access";
import { list as listAccess, save as saveAccess, remove as removeAccess } from "@/repository/access";
import { list as listAccess, remove as removeAccess, save as saveAccess } from "@/repository/access";
export interface AccessesState {
accesses: AccessModel[];

View File

@ -1,7 +1,7 @@
import { produce } from "immer";
import { create } from "zustand";
import { SETTINGS_NAMES, type EmailsSettingsContent, type SettingsModel } from "@/domain/settings";
import { type EmailsSettingsContent, SETTINGS_NAMES, type SettingsModel } from "@/domain/settings";
import { get as getSettings, save as saveSettings } from "@/repository/settings";
export interface ContactEmailsState {

View File

@ -1,7 +1,7 @@
import { produce } from "immer";
import { create } from "zustand";
import { SETTINGS_NAMES, type NotifyChannelsSettingsContent, type SettingsModel } from "@/domain/settings";
import { type NotifyChannelsSettingsContent, SETTINGS_NAMES, type SettingsModel } from "@/domain/settings";
import { get as getSettings, save as saveSettings } from "@/repository/settings";
export interface NotifyChannelsState {

View File

@ -3,7 +3,7 @@ import path from "node:path";
import legacyPlugin from "@vitejs/plugin-legacy";
import reactPlugin from "@vitejs/plugin-react";
import fs from "fs-extra";
import { defineConfig, type Plugin } from "vite";
import { type Plugin, defineConfig } from "vite";
const preserveFilesPlugin = (filesToPreserve: string[]): Plugin => {
return {