From 0dc3cb79bd8f165ad6ac8e6c84dcb666881a659a Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Tue, 22 Jul 2025 14:58:35 +0800 Subject: [PATCH] refactor(ui): clean code --- ui/src/App.tsx | 7 + ui/src/components/AppDocument.tsx | 7 +- ui/src/components/AppLocale.tsx | 19 +- ui/src/components/AppTheme.tsx | 19 +- ui/src/components/AppVersion.tsx | 13 +- ui/src/components/DrawerForm.tsx | 6 +- ui/src/components/Empty.tsx | 4 +- ui/src/components/ModalForm.tsx | 2 +- ui/src/components/MultipleInput.tsx | 10 +- ui/src/components/MultipleSplitValueInput.tsx | 53 +- ui/src/components/Show.tsx | 4 +- ui/src/components/TextFileInput.tsx | 27 +- ui/src/components/access/AccessEditDrawer.tsx | 35 +- ui/src/components/access/AccessEditModal.tsx | 26 +- ui/src/components/access/AccessForm.tsx | 63 +-- .../access/AccessForm1PanelConfig.tsx | 4 +- .../access/AccessFormACMECAConfig.tsx | 4 +- .../access/AccessFormACMEHttpReqConfig.tsx | 4 +- .../access/AccessFormAPISIXConfig.tsx | 4 +- .../components/access/AccessFormAWSConfig.tsx | 4 +- .../access/AccessFormAliyunConfig.tsx | 4 +- .../access/AccessFormAzureConfig.tsx | 4 +- .../access/AccessFormBaiduCloudConfig.tsx | 4 +- .../access/AccessFormBaishanConfig.tsx | 4 +- .../access/AccessFormBaotaPanelConfig.tsx | 4 +- .../access/AccessFormBaotaWAFConfig.tsx | 4 +- .../access/AccessFormBunnyConfig.tsx | 4 +- .../access/AccessFormBytePlusConfig.tsx | 4 +- .../access/AccessFormCMCCCloudConfig.tsx | 4 +- .../access/AccessFormCTCCCloudConfig.tsx | 4 +- .../access/AccessFormCacheFlyConfig.tsx | 4 +- .../access/AccessFormCdnflyConfig.tsx | 4 +- .../access/AccessFormClouDNSConfig.tsx | 4 +- .../access/AccessFormCloudflareConfig.tsx | 4 +- .../access/AccessFormConstellixConfig.tsx | 4 +- .../access/AccessFormDNSLAConfig.tsx | 4 +- .../access/AccessFormDeSECConfig.tsx | 4 +- .../access/AccessFormDigitalOceanConfig.tsx | 4 +- .../access/AccessFormDingTalkBotConfig.tsx | 4 +- .../access/AccessFormDiscordBotConfig.tsx | 4 +- .../access/AccessFormDogeCloudConfig.tsx | 4 +- .../access/AccessFormDuckDNSConfig.tsx | 4 +- .../access/AccessFormDynv6Config.tsx | 4 +- .../access/AccessFormEdgioConfig.tsx | 4 +- .../access/AccessFormEmailConfig.tsx | 4 +- .../access/AccessFormFlexCDNConfig.tsx | 4 +- .../access/AccessFormGcoreConfig.tsx | 4 +- .../access/AccessFormGnameConfig.tsx | 4 +- .../access/AccessFormGoDaddyConfig.tsx | 4 +- .../access/AccessFormGoEdgeConfig.tsx | 4 +- .../AccessFormGoogleTrustServicesConfig.tsx | 4 +- .../access/AccessFormHetznerConfig.tsx | 4 +- .../access/AccessFormHuaweiCloudConfig.tsx | 4 +- .../access/AccessFormJDCloudConfig.tsx | 4 +- .../access/AccessFormKongConfig.tsx | 4 +- .../access/AccessFormKubernetesConfig.tsx | 4 +- .../access/AccessFormLarkBotConfig.tsx | 4 +- .../access/AccessFormLeCDNConfig.tsx | 4 +- .../access/AccessFormMattermostConfig.tsx | 4 +- .../components/access/AccessFormNS1Config.tsx | 4 +- .../access/AccessFormNameDotComConfig.tsx | 4 +- .../access/AccessFormNameSiloConfig.tsx | 4 +- .../access/AccessFormNamecheapConfig.tsx | 4 +- .../access/AccessFormNetcupConfig.tsx | 4 +- .../access/AccessFormNetlifyConfig.tsx | 4 +- .../access/AccessFormPorkbunConfig.tsx | 4 +- .../access/AccessFormPowerDNSConfig.tsx | 4 +- .../access/AccessFormProxmoxVEConfig.tsx | 4 +- .../access/AccessFormQiniuConfig.tsx | 4 +- .../access/AccessFormRainYunConfig.tsx | 4 +- .../access/AccessFormRatPanelConfig.tsx | 4 +- .../components/access/AccessFormSSHConfig.tsx | 10 +- .../access/AccessFormSSLComConfig.tsx | 4 +- .../access/AccessFormSafeLineConfig.tsx | 4 +- .../access/AccessFormSlackBotConfig.tsx | 4 +- .../access/AccessFormSpaceshipConfig.tsx | 4 +- .../access/AccessFormTelegramBotConfig.tsx | 4 +- .../access/AccessFormTencentCloudConfig.tsx | 4 +- .../access/AccessFormUCloudConfig.tsx | 4 +- .../access/AccessFormUniCloudConfig.tsx | 4 +- .../access/AccessFormUpyunConfig.tsx | 4 +- .../access/AccessFormVercelConfig.tsx | 4 +- .../access/AccessFormVolcEngineConfig.tsx | 4 +- .../access/AccessFormWangsuConfig.tsx | 4 +- .../access/AccessFormWeComBotConfig.tsx | 4 +- .../access/AccessFormWebhookConfig.tsx | 4 +- .../access/AccessFormWestcnConfig.tsx | 4 +- .../access/AccessFormZeroSSLConfig.tsx | 4 +- ui/src/components/access/AccessSelect.tsx | 12 +- .../certificate/CertificateDetail.tsx | 4 +- .../certificate/CertificateDetailDrawer.tsx | 4 +- .../notification/NotifyTemplate.tsx | 4 +- .../notification/NotifyTestButton.tsx | 4 +- .../provider/ACMEDns01ProviderPicker.tsx | 84 --- .../provider/ACMEDns01ProviderSelect.tsx | 12 +- .../provider/AccessProviderPicker.tsx | 91 +-- .../provider/AccessProviderSelect.tsx | 24 +- .../components/provider/CAProviderSelect.tsx | 12 +- .../provider/DeploymentProviderPicker.tsx | 47 +- .../provider/DeploymentProviderSelect.tsx | 12 +- .../provider/NotificationProviderSelect.tsx | 12 +- .../components/workflow/WorkflowElement.tsx | 4 +- .../components/workflow/WorkflowElements.tsx | 4 +- .../workflow/WorkflowElementsContainer.tsx | 4 +- .../components/workflow/WorkflowRunDetail.tsx | 4 +- .../workflow/WorkflowRunDetailDrawer.tsx | 4 +- ui/src/components/workflow/WorkflowRuns.tsx | 4 +- .../workflow/WorkflowStatusIcon.tsx | 4 +- .../components/workflow/WorkflowStatusTag.tsx | 4 +- ui/src/components/workflow/node/AddNode.tsx | 2 +- ui/src/components/workflow/node/ApplyNode.tsx | 2 +- .../workflow/node/ApplyNodeConfigForm.tsx | 16 +- .../ApplyNodeConfigFormAWSRoute53Config.tsx | 4 +- .../ApplyNodeConfigFormAliyunESAConfig.tsx | 4 +- ...pplyNodeConfigFormHuaweiCloudDNSConfig.tsx | 4 +- .../ApplyNodeConfigFormJDCloudDNSConfig.tsx | 4 +- ...pplyNodeConfigFormTencentCloudEOConfig.tsx | 4 +- .../components/workflow/node/BranchNode.tsx | 12 +- .../workflow/node/ConditionNode.tsx | 4 +- .../workflow/node/ConditionNodeConfigForm.tsx | 12 +- ...onditionNodeConfigFormExpressionEditor.tsx | 8 +- .../components/workflow/node/DeployNode.tsx | 2 +- .../workflow/node/DeployNodeConfigForm.tsx | 10 +- ...eployNodeConfigForm1PanelConsoleConfig.tsx | 4 +- .../DeployNodeConfigForm1PanelSiteConfig.tsx | 4 +- .../node/DeployNodeConfigFormAPISIXConfig.tsx | 4 +- .../node/DeployNodeConfigFormAWSACMConfig.tsx | 4 +- ...eployNodeConfigFormAWSCloudFrontConfig.tsx | 4 +- .../node/DeployNodeConfigFormAWSIAMConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunALBConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunAPIGWConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunCASConfig.tsx | 4 +- ...loyNodeConfigFormAliyunCASDeployConfig.tsx | 8 +- .../DeployNodeConfigFormAliyunCDNConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunCLBConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunDCDNConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunDDoSConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunESAConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunFCConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunGAConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunLiveConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunNLBConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunOSSConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunVODConfig.tsx | 4 +- .../DeployNodeConfigFormAliyunWAFConfig.tsx | 4 +- ...eployNodeConfigFormAzureKeyVaultConfig.tsx | 4 +- ...oyNodeConfigFormBaiduCloudAppBLBConfig.tsx | 4 +- ...eployNodeConfigFormBaiduCloudBLBConfig.tsx | 4 +- ...eployNodeConfigFormBaiduCloudCDNConfig.tsx | 4 +- .../DeployNodeConfigFormBaishanCDNConfig.tsx | 4 +- ...yNodeConfigFormBaotaPanelConsoleConfig.tsx | 4 +- ...ployNodeConfigFormBaotaPanelSiteConfig.tsx | 6 +- ...DeployNodeConfigFormBaotaWAFSiteConfig.tsx | 4 +- .../DeployNodeConfigFormBunnyCDNConfig.tsx | 4 +- .../DeployNodeConfigFormBytePlusCDNConfig.tsx | 4 +- .../DeployNodeConfigFormCTCCCloudAOConfig.tsx | 4 +- ...DeployNodeConfigFormCTCCCloudCDNConfig.tsx | 4 +- ...DeployNodeConfigFormCTCCCloudELBConfig.tsx | 4 +- ...eployNodeConfigFormCTCCCloudICDNConfig.tsx | 4 +- ...eployNodeConfigFormCTCCCloudLVDNConfig.tsx | 4 +- .../node/DeployNodeConfigFormCdnflyConfig.tsx | 4 +- ...DeployNodeConfigFormDogeCloudCDNConfig.tsx | 4 +- ...yNodeConfigFormEdgioApplicationsConfig.tsx | 4 +- .../DeployNodeConfigFormFlexCDNConfig.tsx | 4 +- .../DeployNodeConfigFormGcoreCDNConfig.tsx | 4 +- .../node/DeployNodeConfigFormGoEdgeConfig.tsx | 4 +- ...ployNodeConfigFormHuaweiCloudCDNConfig.tsx | 4 +- ...ployNodeConfigFormHuaweiCloudELBConfig.tsx | 4 +- ...ployNodeConfigFormHuaweiCloudWAFConfig.tsx | 4 +- .../DeployNodeConfigFormJDCloudALBConfig.tsx | 4 +- .../DeployNodeConfigFormJDCloudCDNConfig.tsx | 4 +- .../DeployNodeConfigFormJDCloudLiveConfig.tsx | 4 +- .../DeployNodeConfigFormJDCloudVODConfig.tsx | 4 +- .../node/DeployNodeConfigFormKongConfig.tsx | 4 +- ...oyNodeConfigFormKubernetesSecretConfig.tsx | 4 +- .../node/DeployNodeConfigFormLeCDNConfig.tsx | 4 +- .../node/DeployNodeConfigFormLocalConfig.tsx | 4 +- .../DeployNodeConfigFormNetlifySiteConfig.tsx | 4 +- .../DeployNodeConfigFormProxmoxVEConfig.tsx | 4 +- .../DeployNodeConfigFormQiniuCDNConfig.tsx | 4 +- .../DeployNodeConfigFormQiniuKodoConfig.tsx | 4 +- .../DeployNodeConfigFormQiniuPiliConfig.tsx | 4 +- .../DeployNodeConfigFormRainYunRCDNConfig.tsx | 4 +- ...DeployNodeConfigFormRatPanelSiteConfig.tsx | 4 +- .../node/DeployNodeConfigFormSSHConfig.tsx | 4 +- .../DeployNodeConfigFormSafeLineConfig.tsx | 4 +- ...loyNodeConfigFormTencentCloudCDNConfig.tsx | 4 +- ...loyNodeConfigFormTencentCloudCLBConfig.tsx | 4 +- ...loyNodeConfigFormTencentCloudCOSConfig.tsx | 4 +- ...loyNodeConfigFormTencentCloudCSSConfig.tsx | 4 +- ...oyNodeConfigFormTencentCloudECDNConfig.tsx | 4 +- ...ployNodeConfigFormTencentCloudEOConfig.tsx | 6 +- ...oyNodeConfigFormTencentCloudGAAPConfig.tsx | 4 +- ...loyNodeConfigFormTencentCloudSCFConfig.tsx | 4 +- ...loyNodeConfigFormTencentCloudSSLConfig.tsx | 4 +- ...eConfigFormTencentCloudSSLDeployConfig.tsx | 6 +- ...eConfigFormTencentCloudSSLUpdateConfig.tsx | 8 +- ...loyNodeConfigFormTencentCloudVODConfig.tsx | 4 +- ...loyNodeConfigFormTencentCloudWAFConfig.tsx | 4 +- .../DeployNodeConfigFormUCloudUCDNConfig.tsx | 4 +- .../DeployNodeConfigFormUCloudUS3Config.tsx | 4 +- ...loyNodeConfigFormUniCloudWebHostConfig.tsx | 4 +- .../DeployNodeConfigFormUpyunCDNConfig.tsx | 4 +- .../DeployNodeConfigFormUpyunFileConfig.tsx | 4 +- ...eployNodeConfigFormVolcEngineALBConfig.tsx | 4 +- ...eployNodeConfigFormVolcEngineCDNConfig.tsx | 4 +- ...eployNodeConfigFormVolcEngineCLBConfig.tsx | 4 +- ...deConfigFormVolcEngineCertCenterConfig.tsx | 4 +- ...ployNodeConfigFormVolcEngineDCDNConfig.tsx | 4 +- ...oyNodeConfigFormVolcEngineImageXConfig.tsx | 4 +- ...ployNodeConfigFormVolcEngineLiveConfig.tsx | 4 +- ...eployNodeConfigFormVolcEngineTOSConfig.tsx | 4 +- .../DeployNodeConfigFormWangsuCDNConfig.tsx | 6 +- ...DeployNodeConfigFormWangsuCDNProConfig.tsx | 4 +- ...yNodeConfigFormWangsuCertificateConfig.tsx | 4 +- .../DeployNodeConfigFormWebhookConfig.tsx | 4 +- .../workflow/node/ExecuteResultBranchNode.tsx | 10 +- .../workflow/node/ExecuteResultNode.tsx | 4 +- .../components/workflow/node/MonitorNode.tsx | 2 +- .../workflow/node/MonitorNodeConfigForm.tsx | 8 +- .../components/workflow/node/NotifyNode.tsx | 2 +- .../workflow/node/NotifyNodeConfigForm.tsx | 10 +- .../NotifyNodeConfigFormDiscordBotConfig.tsx | 4 +- .../node/NotifyNodeConfigFormEmailConfig.tsx | 4 +- .../NotifyNodeConfigFormMattermostConfig.tsx | 4 +- .../NotifyNodeConfigFormSlackBotConfig.tsx | 4 +- .../NotifyNodeConfigFormTelegramBotConfig.tsx | 4 +- .../NotifyNodeConfigFormWebhookConfig.tsx | 4 +- ui/src/components/workflow/node/StartNode.tsx | 2 +- .../workflow/node/StartNodeConfigForm.tsx | 8 +- .../components/workflow/node/UnknownNode.tsx | 2 +- .../components/workflow/node/UploadNode.tsx | 2 +- .../workflow/node/UploadNodeConfigForm.tsx | 8 +- .../components/workflow/node/_SharedNode.tsx | 18 +- ui/src/domain/provider.ts | 516 +++++++++--------- ui/src/global.css | 9 + ui/src/i18n/locales/en/nls.access.json | 14 +- ui/src/i18n/locales/en/nls.certificate.json | 2 +- ui/src/i18n/locales/en/nls.dashboard.json | 5 +- ui/src/i18n/locales/en/nls.settings.json | 2 +- .../i18n/locales/en/nls.workflow.nodes.json | 30 +- ui/src/i18n/locales/zh/nls.access.json | 14 +- ui/src/i18n/locales/zh/nls.certificate.json | 2 +- ui/src/i18n/locales/zh/nls.dashboard.json | 5 +- ui/src/i18n/locales/zh/nls.settings.json | 2 +- .../i18n/locales/zh/nls.workflow.nodes.json | 4 +- ui/src/pages/accesses/AccessList.tsx | 22 +- ui/src/pages/certificates/CertificateList.tsx | 9 +- ui/src/pages/dashboard/Dashboard.tsx | 8 +- 249 files changed, 1059 insertions(+), 1108 deletions(-) delete mode 100644 ui/src/components/provider/ACMEDns01ProviderPicker.tsx diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 13e6532ea..4fbce7893 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -85,6 +85,9 @@ const RootApp = () => { screenXLMax: 96 * 16 - 1, screenXXL: 96 * 16, screenXXLMin: 96 * 16, + padding: 16, + paddingXS: 8, + paddingXXS: 6, }, components: { Layout: { @@ -92,6 +95,10 @@ const RootApp = () => { bodyBg: "transparent", siderBg: "transparent", }, + Dropdown: { + ...antdTheme?.components?.Dropdown, + paddingBlock: 9, + }, }, }} > diff --git a/ui/src/components/AppDocument.tsx b/ui/src/components/AppDocument.tsx index 9423528f5..0aac68b21 100644 --- a/ui/src/components/AppDocument.tsx +++ b/ui/src/components/AppDocument.tsx @@ -1,15 +1,14 @@ -import { memo } from "react"; import { useTranslation } from "react-i18next"; import { IconBook } from "@tabler/icons-react"; import { Typography } from "antd"; import { APP_DOCUMENT_URL } from "@/domain/app"; -export type AppDocumentLinkButtonProps = { +export interface AppDocumentLinkButtonProps { className?: string; style?: React.CSSProperties; showIcon?: boolean; -}; +} const AppDocumentLinkButton = (props: AppDocumentLinkButtonProps) => { const { className, style, showIcon = true } = props; @@ -35,5 +34,5 @@ const AppDocumentLinkButton = (props: AppDocumentLinkButtonProps) => { }; export default { - LinkButton: memo(AppDocumentLinkButton), + LinkButton: AppDocumentLinkButton, }; diff --git a/ui/src/components/AppLocale.tsx b/ui/src/components/AppLocale.tsx index 669ab1523..4a50ed657 100644 --- a/ui/src/components/AppLocale.tsx +++ b/ui/src/components/AppLocale.tsx @@ -1,5 +1,4 @@ -import { memo } from "react"; -import { useTranslation } from "react-i18next"; +import { useTranslation } from "react-i18next"; import { IconLanguage, type IconProps } from "@tabler/icons-react"; import { Dropdown, type DropdownProps, Typography } from "antd"; @@ -26,10 +25,10 @@ export const useAppLocaleMenuItems = () => { return items; }; -export type AppLocaleDropdownProps = { +export interface AppLocaleDropdownProps { children?: React.ReactNode; trigger?: DropdownProps["trigger"]; -}; +} const AppLocaleDropdown = (props: AppLocaleDropdownProps) => { const { children, trigger = ["click"] } = props; @@ -43,7 +42,7 @@ const AppLocaleDropdown = (props: AppLocaleDropdownProps) => { ); }; -export type AppLocaleIconProps = IconProps; +export interface AppLocaleIconProps extends IconProps {} const AppLocaleIcon = (props: AppLocaleIconProps) => { const { i18n } = useTranslation(); @@ -57,11 +56,11 @@ const AppLocaleIcon = (props: AppLocaleIconProps) => { ); }; -export type AppLocaleLinkButtonProps = { +export interface AppLocaleLinkButtonProps { className?: string; style?: React.CSSProperties; showIcon?: boolean; -}; +} const AppLocaleLinkButton = (props: AppLocaleLinkButtonProps) => { const { className, style, showIcon = true } = props; @@ -82,7 +81,7 @@ const AppLocaleLinkButton = (props: AppLocaleLinkButtonProps) => { }; export default { - Dropdown: memo(AppLocaleDropdown), - Icon: memo(AppLocaleIcon), - LinkButton: memo(AppLocaleLinkButton), + Dropdown: AppLocaleDropdown, + Icon: AppLocaleIcon, + LinkButton: AppLocaleLinkButton, }; diff --git a/ui/src/components/AppTheme.tsx b/ui/src/components/AppTheme.tsx index 4080187c0..0499859b2 100644 --- a/ui/src/components/AppTheme.tsx +++ b/ui/src/components/AppTheme.tsx @@ -1,5 +1,4 @@ -import { memo } from "react"; -import { useTranslation } from "react-i18next"; +import { useTranslation } from "react-i18next"; import { IconMoon, type IconProps, IconSun, IconSunMoon } from "@tabler/icons-react"; import { Dropdown, type DropdownProps, Typography } from "antd"; @@ -35,10 +34,10 @@ export const useAppThemeMenuItems = () => { return items; }; -export type AppThemeDropdownProps = { +export interface AppThemeDropdownProps { children?: React.ReactNode; trigger?: DropdownProps["trigger"]; -}; +} const AppThemeDropdown = (props: AppThemeDropdownProps) => { const { children, trigger = ["click"] } = props; @@ -52,7 +51,7 @@ const AppThemeDropdown = (props: AppThemeDropdownProps) => { ); }; -export type AppThemeIconProps = IconProps; +export interface AppThemeIconProps extends IconProps {} const AppThemeIcon = (props: AppThemeIconProps) => { const { theme } = useBrowserTheme(); @@ -60,11 +59,11 @@ const AppThemeIcon = (props: AppThemeIconProps) => { return theme === "dark" ? : ; }; -export type AppThemeLinkButtonProps = { +export interface AppThemeLinkButtonProps { className?: string; style?: React.CSSProperties; showIcon?: boolean; -}; +} const AppThemeLinkButton = (props: AppThemeLinkButtonProps) => { const { className, style, showIcon = true } = props; @@ -86,7 +85,7 @@ const AppThemeLinkButton = (props: AppThemeLinkButtonProps) => { }; export default { - Dropdown: memo(AppThemeDropdown), - Icon: memo(AppThemeIcon), - LinkButton: memo(AppThemeLinkButton), + Dropdown: AppThemeDropdown, + Icon: AppThemeIcon, + LinkButton: AppThemeLinkButton, }; diff --git a/ui/src/components/AppVersion.tsx b/ui/src/components/AppVersion.tsx index 47a31a531..07ea0ffa4 100644 --- a/ui/src/components/AppVersion.tsx +++ b/ui/src/components/AppVersion.tsx @@ -1,13 +1,12 @@ -import { memo } from "react"; import { Badge, Typography } from "antd"; import { APP_DOWNLOAD_URL, APP_VERSION } from "@/domain/app"; import { useVersionChecker } from "@/hooks"; -export type AppVersionLinkButtonProps = { +export interface AppVersionLinkButtonProps { className?: string; style?: React.CSSProperties; -}; +} const AppVersionLinkButton = ({ className, style }: AppVersionLinkButtonProps) => { return ( @@ -19,11 +18,11 @@ const AppVersionLinkButton = ({ className, style }: AppVersionLinkButtonProps) = ); }; -export type AppVersionBadgeProps = { +export interface AppVersionBadgeProps { className?: string; style?: React.CSSProperties; children?: React.ReactNode; -}; +} const AppVersionBadge = ({ className, style, children }: AppVersionBadgeProps) => { const { hasNewVersion } = useVersionChecker(); @@ -41,6 +40,6 @@ const AppVersionBadge = ({ className, style, children }: AppVersionBadgeProps) = }; export default { - LinkButton: memo(AppVersionLinkButton), - Badge: memo(AppVersionBadge), + LinkButton: AppVersionLinkButton, + Badge: AppVersionBadge, }; diff --git a/ui/src/components/DrawerForm.tsx b/ui/src/components/DrawerForm.tsx index 7e530e64e..f8386b2be 100644 --- a/ui/src/components/DrawerForm.tsx +++ b/ui/src/components/DrawerForm.tsx @@ -1,6 +1,6 @@ import { useTranslation } from "react-i18next"; import { useControllableValue } from "ahooks"; -import { Button, Drawer, type DrawerProps, Form, type FormProps, type ModalProps, Space } from "antd"; +import { Button, Drawer, type DrawerProps, Flex, Form, type FormProps, type ModalProps } from "antd"; import { useAntdForm, useTriggerElement } from "@/hooks"; @@ -109,14 +109,14 @@ const DrawerForm = = any>({ + - + } forceRender open={open} diff --git a/ui/src/components/Empty.tsx b/ui/src/components/Empty.tsx index 205a07046..08b087be2 100644 --- a/ui/src/components/Empty.tsx +++ b/ui/src/components/Empty.tsx @@ -3,14 +3,14 @@ import { Typography, theme } from "antd"; import Show from "./Show"; -export type EmptyProps = { +export interface EmptyProps { className?: string; style?: React.CSSProperties; title?: React.ReactNode; description?: React.ReactNode; extra?: React.ReactNode; icon?: React.ReactNode; -}; +} const Empty = (props: EmptyProps) => { const { t } = useTranslation(); diff --git a/ui/src/components/ModalForm.tsx b/ui/src/components/ModalForm.tsx index 7fe549515..12c1c43e5 100644 --- a/ui/src/components/ModalForm.tsx +++ b/ui/src/components/ModalForm.tsx @@ -122,7 +122,7 @@ const ModalForm = = any>({ onOk={handleOkClick} onCancel={handleCancelClick} > -
+
{children}
diff --git a/ui/src/components/MultipleInput.tsx b/ui/src/components/MultipleInput.tsx index 4d87c889a..07b9e6e95 100644 --- a/ui/src/components/MultipleInput.tsx +++ b/ui/src/components/MultipleInput.tsx @@ -2,10 +2,10 @@ import { useTranslation } from "react-i18next"; import { IconCircleArrowDown, IconCircleArrowUp, IconCircleMinus, IconCirclePlus } from "@tabler/icons-react"; import { useControllableValue } from "ahooks"; -import { Button, Input, type InputProps, type InputRef, Space } from "antd"; +import { Button, Input, type InputProps, type InputRef } from "antd"; import { produce } from "immer"; -export type MultipleInputProps = Omit & { +export interface MultipleInputProps extends Omit { allowClear?: boolean; defaultValue?: string[]; maxCount?: number; @@ -17,7 +17,7 @@ export type MultipleInputProps = Omit void; onValueRemove?: (index: number) => void; onValueSort?: (oldIndex: number, newIndex: number) => void; -}; +} const MultipleInput = ({ allowClear = false, @@ -124,7 +124,7 @@ const MultipleInput = ({ {t("common.button.add")} ) : ( - +
{Array.from(value).map((element, index) => { const allowUp = index > 0; const allowDown = index < value.length - 1; @@ -154,7 +154,7 @@ const MultipleInput = ({ /> ); })} - +
); }; diff --git a/ui/src/components/MultipleSplitValueInput.tsx b/ui/src/components/MultipleSplitValueInput.tsx index dba81cdae..2f571aabd 100644 --- a/ui/src/components/MultipleSplitValueInput.tsx +++ b/ui/src/components/MultipleSplitValueInput.tsx @@ -10,10 +10,10 @@ import MultipleInput from "./MultipleInput"; type SplitOptions = { removeEmpty?: boolean; - trim?: boolean; + trimSpace?: boolean; }; -export type MultipleSplitValueInputProps = Omit & { +export interface MultipleSplitValueInputProps extends Omit { defaultValue?: string; maxCount?: number; minCount?: number; @@ -25,13 +25,14 @@ export type MultipleSplitValueInputProps = Omit void; -}; +} const DEFAULT_SEPARATOR = ";"; const MultipleSplitValueInput = ({ className, style, + size, separator: delimiter = DEFAULT_SEPARATOR, disabled, maxCount, @@ -56,7 +57,7 @@ const MultipleSplitValueInput = ({ initialValues: { value: value?.split(delimiter) }, onSubmit: (values) => { const temp = values.value ?? []; - if (splitOptions.trim) { + if (splitOptions.trimSpace) { temp.map((e) => e.trim()); } if (splitOptions.removeEmpty) { @@ -81,27 +82,29 @@ const MultipleSplitValueInput = ({ }; return ( - - - - - - } - validateTrigger="onSubmit" - width={modalWidth} - > - - - - - +
+ + + + + + } + validateTrigger="onSubmit" + width={modalWidth} + > + + + + + +
); }; diff --git a/ui/src/components/Show.tsx b/ui/src/components/Show.tsx index addd099c5..f6556548d 100644 --- a/ui/src/components/Show.tsx +++ b/ui/src/components/Show.tsx @@ -1,8 +1,8 @@ -export type ShowProps = { +export interface ShowProps { when: boolean; children: React.ReactNode; fallback?: React.ReactNode; -}; +} const Show = ({ when, children, fallback }: ShowProps) => { return when ? children : fallback; diff --git a/ui/src/components/TextFileInput.tsx b/ui/src/components/TextFileInput.tsx index 86cc218fd..2adc8ba3a 100644 --- a/ui/src/components/TextFileInput.tsx +++ b/ui/src/components/TextFileInput.tsx @@ -1,10 +1,9 @@ import { type ChangeEvent, useRef } from "react"; import { useTranslation } from "react-i18next"; import { IconFileImport } from "@tabler/icons-react"; -import { Button, type ButtonProps, Input, Space, type UploadProps } from "antd"; +import { Button, type ButtonProps, Input, type UploadProps } from "antd"; import { type TextAreaProps } from "antd/es/input/TextArea"; -import { mergeCls } from "@/utils/css"; import { readFileContent } from "@/utils/file"; export interface TextFileInputProps extends Omit { @@ -34,17 +33,19 @@ const TextFileInput = ({ className, style, accept, disabled, readOnly, uploadTex }; return ( - - onChange?.(e.target.value)} /> - {!readOnly && ( - <> - - - - )} - +
+
+ onChange?.(e.target.value)} /> + {!readOnly && ( + <> + + + + )} +
+
); }; diff --git a/ui/src/components/access/AccessEditDrawer.tsx b/ui/src/components/access/AccessEditDrawer.tsx index 8e0e6080b..339eeec09 100644 --- a/ui/src/components/access/AccessEditDrawer.tsx +++ b/ui/src/components/access/AccessEditDrawer.tsx @@ -1,7 +1,7 @@ -import { useRef, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; import { useControllableValue } from "ahooks"; -import { App, Button, Drawer, Space } from "antd"; +import { App, Button, Drawer, Flex } from "antd"; import { type AccessModel } from "@/domain/access"; import { useTriggerElement, useZustandShallowSelector } from "@/hooks"; @@ -10,7 +10,7 @@ import { getErrMsg } from "@/utils/error"; import AccessForm, { type AccessFormInstance, type AccessFormProps } from "./AccessForm"; -export type AccessEditDrawerProps = { +export interface AccessEditDrawerProps { action: AccessFormProps["action"]; data?: AccessFormProps["initialValues"]; loading?: boolean; @@ -19,7 +19,7 @@ export type AccessEditDrawerProps = { usage?: AccessFormProps["usage"]; onOpenChange?: (open: boolean) => void; afterSubmit?: (record: AccessModel) => void; -}; +} const AccessEditDrawer = ({ action, data, loading, trigger, usage, afterSubmit, ...props }: AccessEditDrawerProps) => { const { t } = useTranslation(); @@ -39,6 +39,11 @@ const AccessEditDrawer = ({ action, data, loading, trigger, usage, afterSubmit, const formRef = useRef(null); const [formPending, setFormPending] = useState(false); + const [footerShow, setFooterShow] = useState(!!data?.provider); + useEffect(() => { + setFooterShow(!!data?.provider); + }, [data?.provider]); + const handleOkClick = async () => { setFormPending(true); try { @@ -84,6 +89,10 @@ const AccessEditDrawer = ({ action, data, loading, trigger, usage, afterSubmit, setOpen(false); }; + const handleFormValuesChange: AccessFormProps["onValuesChange"] = (values) => { + setFooterShow(!!values.provider); + }; + return ( <> {triggerEl} @@ -93,12 +102,16 @@ const AccessEditDrawer = ({ action, data, loading, trigger, usage, afterSubmit, closable={!formPending} destroyOnHidden footer={ - - - - + footerShow ? ( + + + + + ) : ( + false + ) } loading={loading} maskClosable={!formPending} @@ -107,7 +120,7 @@ const AccessEditDrawer = ({ action, data, loading, trigger, usage, afterSubmit, width={720} onClose={() => setOpen(false)} > - + ); diff --git a/ui/src/components/access/AccessEditModal.tsx b/ui/src/components/access/AccessEditModal.tsx index 954ed73ca..819b57493 100644 --- a/ui/src/components/access/AccessEditModal.tsx +++ b/ui/src/components/access/AccessEditModal.tsx @@ -1,4 +1,4 @@ -import { useRef, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; import { useControllableValue } from "ahooks"; import { App, Modal } from "antd"; @@ -10,7 +10,7 @@ import { getErrMsg } from "@/utils/error"; import AccessForm, { type AccessFormInstance, type AccessFormProps } from "./AccessForm"; -export type AccessEditModalProps = { +export interface AccessEditModalProps { action: AccessFormProps["action"]; data?: AccessFormProps["initialValues"]; loading?: boolean; @@ -19,7 +19,7 @@ export type AccessEditModalProps = { trigger?: React.ReactNode; onOpenChange?: (open: boolean) => void; afterSubmit?: (record: AccessModel) => void; -}; +} const AccessEditModal = ({ action, data, loading, trigger, usage, afterSubmit, ...props }: AccessEditModalProps) => { const { t } = useTranslation(); @@ -39,6 +39,11 @@ const AccessEditModal = ({ action, data, loading, trigger, usage, afterSubmit, . const formRef = useRef(null); const [formPending, setFormPending] = useState(false); + const [footerShow, setFooterShow] = useState(!!data?.provider); + useEffect(() => { + setFooterShow(!!data?.provider); + }, [data?.provider]); + const handleOkClick = async () => { setFormPending(true); try { @@ -84,14 +89,20 @@ const AccessEditModal = ({ action, data, loading, trigger, usage, afterSubmit, . setOpen(false); }; + const handleFormValuesChange: AccessFormProps["onValuesChange"] = (values) => { + setFooterShow(!!values.provider); + }; + return ( <> {triggerEl} -
- -
+
); diff --git a/ui/src/components/access/AccessForm.tsx b/ui/src/components/access/AccessForm.tsx index 1577bba7b..4908380c1 100644 --- a/ui/src/components/access/AccessForm.tsx +++ b/ui/src/components/access/AccessForm.tsx @@ -87,9 +87,9 @@ import AccessFormZeroSSLConfig from "./AccessFormZeroSSLConfig"; type AccessFormFieldValues = Partial>; type AccessFormActions = "create" | "edit"; -type AccessFormUsages = "both-dns-hosting" | "ca-only" | "notification-only"; +type AccessFormUsages = "dns" | "hosting" | "dns-hosting" | "ca" | "notification"; -export type AccessFormProps = { +export interface AccessFormProps { className?: string; style?: React.CSSProperties; action: AccessFormActions; @@ -97,13 +97,13 @@ export type AccessFormProps = { initialValues?: AccessFormFieldValues; usage?: AccessFormUsages; onValuesChange?: (values: AccessFormFieldValues) => void; -}; +} -export type AccessFormInstance = { +export interface AccessFormInstance { getFieldsValue: () => ReturnType["getFieldsValue"]>; resetFields: FormInstance["resetFields"]; validateFields: FormInstance["validateFields"]; -}; +} const AccessForm = forwardRef(({ className, style, action, disabled, initialValues, usage, onValuesChange }, ref) => { const { t } = useTranslation(); @@ -113,14 +113,7 @@ const AccessForm = forwardRef(({ className, .string(t("access.form.name.placeholder")) .min(1, t("access.form.name.placeholder")) .max(64, t("common.errmsg.string_max", { max: 64 })), - provider: z.nativeEnum(ACCESS_PROVIDERS, { - message: - usage === "ca-only" - ? t("access.form.certificate_authority.placeholder") - : usage === "notification-only" - ? t("access.form.notification_channel.placeholder") - : t("access.form.provider.placeholder"), - }), + provider: z.enum(ACCESS_PROVIDERS, t("access.form.provider.placeholder")), config: z.any(), reserve: z.string().nullish(), }); @@ -132,39 +125,23 @@ const AccessForm = forwardRef(({ className, const providerFilter = useMemo(() => { switch (usage) { - case "both-dns-hosting": + case "dns": + return (record: AccessProvider) => record.usages.includes(ACCESS_USAGES.DNS); + case "hosting": + return (record: AccessProvider) => record.usages.includes(ACCESS_USAGES.HOSTING); + case "dns-hosting": return (record: AccessProvider) => record.usages.includes(ACCESS_USAGES.DNS) || record.usages.includes(ACCESS_USAGES.HOSTING); - case "ca-only": + case "ca": return (record: AccessProvider) => record.usages.includes(ACCESS_USAGES.CA); - case "notification-only": + case "notification": return (record: AccessProvider) => record.usages.includes(ACCESS_USAGES.NOTIFICATION); } return undefined; }, [usage]); - const providerLabel = useMemo(() => { - switch (usage) { - case "ca-only": - return t("access.form.certificate_authority.label"); - case "notification-only": - return t("access.form.notification_channel.label"); - } - - return t("access.form.provider.label"); - }, [usage]); - const providerPlaceholder = useMemo(() => { - switch (usage) { - case "ca-only": - return t("access.form.certificate_authority.placeholder"); - case "notification-only": - return t("access.form.notification_channel.placeholder"); - } - - return t("access.form.provider.placeholder"); - }, [usage]); const providerTooltip = useMemo(() => { switch (usage) { - case "both-dns-hosting": + case "dns-hosting": return ; } @@ -330,7 +307,7 @@ const AccessForm = forwardRef(({ className, case ACCESS_PROVIDERS.WEBHOOK: return ( ); @@ -365,7 +342,7 @@ const AccessForm = forwardRef(({ className, getFieldsValue: () => { const values = formInst.getFieldsValue(true); values.config = nestedFormInst.getFieldsValue(); - values.reserve = usage === "ca-only" ? "ca" : usage === "notification-only" ? "notification" : undefined; + values.reserve = usage === "ca" ? "ca" : usage === "notification" ? "notification" : undefined; return values; }, resetFields: (fields) => { @@ -394,7 +371,7 @@ const AccessForm = forwardRef(({ className, autoFocus filter={providerFilter} placeholder={t("access.form.provider.search.placeholder")} - showOptionTags={usage == null || (usage === "both-dns-hosting" ? { [ACCESS_USAGES.DNS]: true, [ACCESS_USAGES.HOSTING]: true } : false)} + showOptionTags={usage == null || (usage === "dns-hosting" ? { [ACCESS_USAGES.DNS]: true, [ACCESS_USAGES.HOSTING]: true } : false)} onSelect={handleProviderPick} /> } @@ -403,12 +380,12 @@ const AccessForm = forwardRef(({ className, - + diff --git a/ui/src/components/access/AccessForm1PanelConfig.tsx b/ui/src/components/access/AccessForm1PanelConfig.tsx index 5d9a18d71..da9504dbb 100644 --- a/ui/src/components/access/AccessForm1PanelConfig.tsx +++ b/ui/src/components/access/AccessForm1PanelConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigFor1Panel } from "@/domain/access"; type AccessForm1PanelConfigFieldValues = Nullish; -export type AccessForm1PanelConfigProps = { +export interface AccessForm1PanelConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessForm1PanelConfigFieldValues; onValuesChange?: (values: AccessForm1PanelConfigFieldValues) => void; -}; +} const initFormModel = (): AccessForm1PanelConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormACMECAConfig.tsx b/ui/src/components/access/AccessFormACMECAConfig.tsx index 59558e7fd..88e1610c7 100644 --- a/ui/src/components/access/AccessFormACMECAConfig.tsx +++ b/ui/src/components/access/AccessFormACMECAConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForACMECA } from "@/domain/access"; type AccessFormACMECAConfigFieldValues = Nullish; -export type AccessFormACMECAConfigProps = { +export interface AccessFormACMECAConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormACMECAConfigFieldValues; onValuesChange?: (values: AccessFormACMECAConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormACMECAConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormACMEHttpReqConfig.tsx b/ui/src/components/access/AccessFormACMEHttpReqConfig.tsx index 9dfa8c0d1..cce452b6b 100644 --- a/ui/src/components/access/AccessFormACMEHttpReqConfig.tsx +++ b/ui/src/components/access/AccessFormACMEHttpReqConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForACMEHttpReq } from "@/domain/access"; type AccessFormACMEHttpReqConfigFieldValues = Nullish; -export type AccessFormACMEHttpReqConfigProps = { +export interface AccessFormACMEHttpReqConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormACMEHttpReqConfigFieldValues; onValuesChange?: (values: AccessFormACMEHttpReqConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormACMEHttpReqConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormAPISIXConfig.tsx b/ui/src/components/access/AccessFormAPISIXConfig.tsx index 0ed94d392..f45f6586b 100644 --- a/ui/src/components/access/AccessFormAPISIXConfig.tsx +++ b/ui/src/components/access/AccessFormAPISIXConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForAPISIX } from "@/domain/access"; type AccessFormAPISIXConfigFieldValues = Nullish; -export type AccessFormAPISIXConfigProps = { +export interface AccessFormAPISIXConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormAPISIXConfigFieldValues; onValuesChange?: (values: AccessFormAPISIXConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormAPISIXConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormAWSConfig.tsx b/ui/src/components/access/AccessFormAWSConfig.tsx index 89500feba..15ea5e9fe 100644 --- a/ui/src/components/access/AccessFormAWSConfig.tsx +++ b/ui/src/components/access/AccessFormAWSConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForAWS } from "@/domain/access"; type AccessFormAWSConfigFieldValues = Nullish; -export type AccessFormAWSConfigProps = { +export interface AccessFormAWSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormAWSConfigFieldValues; onValuesChange?: (values: AccessFormAWSConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormAWSConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormAliyunConfig.tsx b/ui/src/components/access/AccessFormAliyunConfig.tsx index f48c3297c..5abfaf463 100644 --- a/ui/src/components/access/AccessFormAliyunConfig.tsx +++ b/ui/src/components/access/AccessFormAliyunConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForAliyun } from "@/domain/access"; type AccessFormAliyunConfigFieldValues = Nullish; -export type AccessFormAliyunConfigProps = { +export interface AccessFormAliyunConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormAliyunConfigFieldValues; onValuesChange?: (values: AccessFormAliyunConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormAliyunConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormAzureConfig.tsx b/ui/src/components/access/AccessFormAzureConfig.tsx index 48be8aa5b..e6c8bfcd3 100644 --- a/ui/src/components/access/AccessFormAzureConfig.tsx +++ b/ui/src/components/access/AccessFormAzureConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForAzure } from "@/domain/access"; type AccessFormAzureConfigFieldValues = Nullish; -export type AccessFormAzureConfigProps = { +export interface AccessFormAzureConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormAzureConfigFieldValues; onValuesChange?: (values: AccessFormAzureConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormAzureConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormBaiduCloudConfig.tsx b/ui/src/components/access/AccessFormBaiduCloudConfig.tsx index ab7abffc2..49b555d93 100644 --- a/ui/src/components/access/AccessFormBaiduCloudConfig.tsx +++ b/ui/src/components/access/AccessFormBaiduCloudConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForBaiduCloud } from "@/domain/access"; type AccessFormBaiduCloudConfigFieldValues = Nullish; -export type AccessFormBaiduCloudConfigProps = { +export interface AccessFormBaiduCloudConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormBaiduCloudConfigFieldValues; onValuesChange?: (values: AccessFormBaiduCloudConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormBaiduCloudConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormBaishanConfig.tsx b/ui/src/components/access/AccessFormBaishanConfig.tsx index ab17c62b1..090616b9b 100644 --- a/ui/src/components/access/AccessFormBaishanConfig.tsx +++ b/ui/src/components/access/AccessFormBaishanConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForBaishan } from "@/domain/access"; type AccessFormBaishanConfigFieldValues = Nullish; -export type AccessFormBaishanConfigProps = { +export interface AccessFormBaishanConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormBaishanConfigFieldValues; onValuesChange?: (values: AccessFormBaishanConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormBaishanConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormBaotaPanelConfig.tsx b/ui/src/components/access/AccessFormBaotaPanelConfig.tsx index 94e159a36..423f34863 100644 --- a/ui/src/components/access/AccessFormBaotaPanelConfig.tsx +++ b/ui/src/components/access/AccessFormBaotaPanelConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForBaotaPanel } from "@/domain/access"; type AccessFormBaotaPanelConfigFieldValues = Nullish; -export type AccessFormBaotaPanelConfigProps = { +export interface AccessFormBaotaPanelConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormBaotaPanelConfigFieldValues; onValuesChange?: (values: AccessFormBaotaPanelConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormBaotaPanelConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormBaotaWAFConfig.tsx b/ui/src/components/access/AccessFormBaotaWAFConfig.tsx index 31558e6b0..78f5d9607 100644 --- a/ui/src/components/access/AccessFormBaotaWAFConfig.tsx +++ b/ui/src/components/access/AccessFormBaotaWAFConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForBaotaWAF } from "@/domain/access"; type AccessFormBaotaWAFConfigFieldValues = Nullish; -export type AccessFormBaotaWAFConfigProps = { +export interface AccessFormBaotaWAFConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormBaotaWAFConfigFieldValues; onValuesChange?: (values: AccessFormBaotaWAFConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormBaotaWAFConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormBunnyConfig.tsx b/ui/src/components/access/AccessFormBunnyConfig.tsx index 8ea052f7e..1f801f8cc 100644 --- a/ui/src/components/access/AccessFormBunnyConfig.tsx +++ b/ui/src/components/access/AccessFormBunnyConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForBunny } from "@/domain/access"; type AccessFormBunnyConfigFieldValues = Nullish; -export type AccessFormBunnyConfigProps = { +export interface AccessFormBunnyConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormBunnyConfigFieldValues; onValuesChange?: (values: AccessFormBunnyConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormBunnyConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormBytePlusConfig.tsx b/ui/src/components/access/AccessFormBytePlusConfig.tsx index 5902edb87..dea9fd62e 100644 --- a/ui/src/components/access/AccessFormBytePlusConfig.tsx +++ b/ui/src/components/access/AccessFormBytePlusConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForBytePlus } from "@/domain/access"; type AccessFormBytePlusConfigFieldValues = Nullish; -export type AccessFormBytePlusConfigProps = { +export interface AccessFormBytePlusConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormBytePlusConfigFieldValues; onValuesChange?: (values: AccessFormBytePlusConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormBytePlusConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormCMCCCloudConfig.tsx b/ui/src/components/access/AccessFormCMCCCloudConfig.tsx index 9ee88a074..9d2912fed 100644 --- a/ui/src/components/access/AccessFormCMCCCloudConfig.tsx +++ b/ui/src/components/access/AccessFormCMCCCloudConfig.tsx @@ -6,13 +6,13 @@ import { type AccessConfigForCMCCCloud } from "@/domain/access"; type AccessFormCMCCCloudConfigFieldValues = Nullish; -export type AccessFormCMCCCloudConfigProps = { +export interface AccessFormCMCCCloudConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormCMCCCloudConfigFieldValues; onValuesChange?: (values: AccessFormCMCCCloudConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormCMCCCloudConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormCTCCCloudConfig.tsx b/ui/src/components/access/AccessFormCTCCCloudConfig.tsx index f0e9df391..9284e17bf 100644 --- a/ui/src/components/access/AccessFormCTCCCloudConfig.tsx +++ b/ui/src/components/access/AccessFormCTCCCloudConfig.tsx @@ -6,13 +6,13 @@ import { type AccessConfigForCTCCCloud } from "@/domain/access"; type AccessFormCTCCCloudConfigFieldValues = Nullish; -export type AccessFormCTCCCloudConfigProps = { +export interface AccessFormCTCCCloudConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormCTCCCloudConfigFieldValues; onValuesChange?: (values: AccessFormCTCCCloudConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormCTCCCloudConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormCacheFlyConfig.tsx b/ui/src/components/access/AccessFormCacheFlyConfig.tsx index eca9165a1..c9b65a237 100644 --- a/ui/src/components/access/AccessFormCacheFlyConfig.tsx +++ b/ui/src/components/access/AccessFormCacheFlyConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForCacheFly } from "@/domain/access"; type AccessFormCacheFlyConfigFieldValues = Nullish; -export type AccessFormCacheFlyConfigProps = { +export interface AccessFormCacheFlyConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormCacheFlyConfigFieldValues; onValuesChange?: (values: AccessFormCacheFlyConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormCacheFlyConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormCdnflyConfig.tsx b/ui/src/components/access/AccessFormCdnflyConfig.tsx index 91fdd00eb..43fdade8a 100644 --- a/ui/src/components/access/AccessFormCdnflyConfig.tsx +++ b/ui/src/components/access/AccessFormCdnflyConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForCdnfly } from "@/domain/access"; type AccessFormCdnflyConfigFieldValues = Nullish; -export type AccessFormCdnflyConfigProps = { +export interface AccessFormCdnflyConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormCdnflyConfigFieldValues; onValuesChange?: (values: AccessFormCdnflyConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormCdnflyConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormClouDNSConfig.tsx b/ui/src/components/access/AccessFormClouDNSConfig.tsx index 922a8e753..d8048ec4e 100644 --- a/ui/src/components/access/AccessFormClouDNSConfig.tsx +++ b/ui/src/components/access/AccessFormClouDNSConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForClouDNS } from "@/domain/access"; type AccessFormClouDNSConfigFieldValues = Nullish; -export type AccessFormClouDNSConfigProps = { +export interface AccessFormClouDNSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormClouDNSConfigFieldValues; onValuesChange?: (values: AccessFormClouDNSConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormClouDNSConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormCloudflareConfig.tsx b/ui/src/components/access/AccessFormCloudflareConfig.tsx index 6e9ba6c19..14e384cfa 100644 --- a/ui/src/components/access/AccessFormCloudflareConfig.tsx +++ b/ui/src/components/access/AccessFormCloudflareConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForCloudflare } from "@/domain/access"; type AccessFormCloudflareConfigFieldValues = Nullish; -export type AccessFormCloudflareConfigProps = { +export interface AccessFormCloudflareConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormCloudflareConfigFieldValues; onValuesChange?: (values: AccessFormCloudflareConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormCloudflareConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormConstellixConfig.tsx b/ui/src/components/access/AccessFormConstellixConfig.tsx index 8e028034f..92c3430f0 100644 --- a/ui/src/components/access/AccessFormConstellixConfig.tsx +++ b/ui/src/components/access/AccessFormConstellixConfig.tsx @@ -6,13 +6,13 @@ import { type AccessConfigForConstellix } from "@/domain/access"; type AccessFormConstellixConfigFieldValues = Nullish; -export type AccessFormConstellixConfigProps = { +export interface AccessFormConstellixConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormConstellixConfigFieldValues; onValuesChange?: (values: AccessFormConstellixConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormConstellixConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormDNSLAConfig.tsx b/ui/src/components/access/AccessFormDNSLAConfig.tsx index ee5ac5e63..c3fc6d80b 100644 --- a/ui/src/components/access/AccessFormDNSLAConfig.tsx +++ b/ui/src/components/access/AccessFormDNSLAConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForDNSLA } from "@/domain/access"; type AccessFormDNSLAConfigFieldValues = Nullish; -export type AccessFormDNSLAConfigProps = { +export interface AccessFormDNSLAConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormDNSLAConfigFieldValues; onValuesChange?: (values: AccessFormDNSLAConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormDNSLAConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormDeSECConfig.tsx b/ui/src/components/access/AccessFormDeSECConfig.tsx index 10f5a1014..d3e90fc57 100644 --- a/ui/src/components/access/AccessFormDeSECConfig.tsx +++ b/ui/src/components/access/AccessFormDeSECConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForDeSEC } from "@/domain/access"; type AccessFormDeSECConfigFieldValues = Nullish; -export type AccessFormDeSECConfigProps = { +export interface AccessFormDeSECConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormDeSECConfigFieldValues; onValuesChange?: (values: AccessFormDeSECConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormDeSECConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormDigitalOceanConfig.tsx b/ui/src/components/access/AccessFormDigitalOceanConfig.tsx index 421ee9cc3..4cad2068c 100644 --- a/ui/src/components/access/AccessFormDigitalOceanConfig.tsx +++ b/ui/src/components/access/AccessFormDigitalOceanConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForDigitalOcean } from "@/domain/access"; type AccessFormDigitalOceanConfigFieldValues = Nullish; -export type AccessFormDigitalOceanConfigProps = { +export interface AccessFormDigitalOceanConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormDigitalOceanConfigFieldValues; onValuesChange?: (values: AccessFormDigitalOceanConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormDigitalOceanConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormDingTalkBotConfig.tsx b/ui/src/components/access/AccessFormDingTalkBotConfig.tsx index 34de42b5b..6a8498bc0 100644 --- a/ui/src/components/access/AccessFormDingTalkBotConfig.tsx +++ b/ui/src/components/access/AccessFormDingTalkBotConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForDingTalkBot } from "@/domain/access"; type AccessFormDingTalkBotConfigFieldValues = Nullish; -export type AccessFormDingTalkBotConfigProps = { +export interface AccessFormDingTalkBotConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormDingTalkBotConfigFieldValues; onValuesChange?: (values: AccessFormDingTalkBotConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormDingTalkBotConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormDiscordBotConfig.tsx b/ui/src/components/access/AccessFormDiscordBotConfig.tsx index d69b8c22b..c6bc85e52 100644 --- a/ui/src/components/access/AccessFormDiscordBotConfig.tsx +++ b/ui/src/components/access/AccessFormDiscordBotConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForDiscordBot } from "@/domain/access"; type AccessFormDiscordBotConfigFieldValues = Nullish; -export type AccessFormDiscordBotConfigProps = { +export interface AccessFormDiscordBotConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormDiscordBotConfigFieldValues; onValuesChange?: (values: AccessFormDiscordBotConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormDiscordBotConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormDogeCloudConfig.tsx b/ui/src/components/access/AccessFormDogeCloudConfig.tsx index 3e61d75fb..b23a399d8 100644 --- a/ui/src/components/access/AccessFormDogeCloudConfig.tsx +++ b/ui/src/components/access/AccessFormDogeCloudConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForDogeCloud } from "@/domain/access"; type AccessFormDogeCloudConfigFieldValues = Nullish; -export type AccessFormDogeCloudConfigProps = { +export interface AccessFormDogeCloudConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormDogeCloudConfigFieldValues; onValuesChange?: (values: AccessFormDogeCloudConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormDogeCloudConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormDuckDNSConfig.tsx b/ui/src/components/access/AccessFormDuckDNSConfig.tsx index 6b9c81b8b..758a132f5 100644 --- a/ui/src/components/access/AccessFormDuckDNSConfig.tsx +++ b/ui/src/components/access/AccessFormDuckDNSConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForDuckDNS } from "@/domain/access"; type AccessFormDuckDNSConfigFieldValues = Nullish; -export type AccessFormDuckDNSConfigProps = { +export interface AccessFormDuckDNSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormDuckDNSConfigFieldValues; onValuesChange?: (values: AccessFormDuckDNSConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormDuckDNSConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormDynv6Config.tsx b/ui/src/components/access/AccessFormDynv6Config.tsx index 87e16c1e7..1ecc1a99b 100644 --- a/ui/src/components/access/AccessFormDynv6Config.tsx +++ b/ui/src/components/access/AccessFormDynv6Config.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForDynv6 } from "@/domain/access"; type AccessFormDynv6ConfigFieldValues = Nullish; -export type AccessFormDynv6ConfigProps = { +export interface AccessFormDynv6ConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormDynv6ConfigFieldValues; onValuesChange?: (values: AccessFormDynv6ConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormDynv6ConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormEdgioConfig.tsx b/ui/src/components/access/AccessFormEdgioConfig.tsx index a91298c97..d97430db0 100644 --- a/ui/src/components/access/AccessFormEdgioConfig.tsx +++ b/ui/src/components/access/AccessFormEdgioConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForEdgio } from "@/domain/access"; type AccessFormEdgioConfigFieldValues = Nullish; -export type AccessFormEdgioConfigProps = { +export interface AccessFormEdgioConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormEdgioConfigFieldValues; onValuesChange?: (values: AccessFormEdgioConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormEdgioConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormEmailConfig.tsx b/ui/src/components/access/AccessFormEmailConfig.tsx index bb8611085..e5848494e 100644 --- a/ui/src/components/access/AccessFormEmailConfig.tsx +++ b/ui/src/components/access/AccessFormEmailConfig.tsx @@ -8,13 +8,13 @@ import { validEmailAddress, validPortNumber } from "@/utils/validators"; type AccessFormEmailConfigFieldValues = Nullish; -export type AccessFormEmailConfigProps = { +export interface AccessFormEmailConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormEmailConfigFieldValues; onValuesChange?: (values: AccessFormEmailConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormEmailConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormFlexCDNConfig.tsx b/ui/src/components/access/AccessFormFlexCDNConfig.tsx index cd0c8b9ef..59ff94111 100644 --- a/ui/src/components/access/AccessFormFlexCDNConfig.tsx +++ b/ui/src/components/access/AccessFormFlexCDNConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForFlexCDN } from "@/domain/access"; type AccessFormFlexCDNConfigFieldValues = Nullish; -export type AccessFormFlexCDNConfigProps = { +export interface AccessFormFlexCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormFlexCDNConfigFieldValues; onValuesChange?: (values: AccessFormFlexCDNConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormFlexCDNConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormGcoreConfig.tsx b/ui/src/components/access/AccessFormGcoreConfig.tsx index f78d7309a..30316323f 100644 --- a/ui/src/components/access/AccessFormGcoreConfig.tsx +++ b/ui/src/components/access/AccessFormGcoreConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForGcore } from "@/domain/access"; type AccessFormGcoreConfigFieldValues = Nullish; -export type AccessFormGcoreConfigProps = { +export interface AccessFormGcoreConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormGcoreConfigFieldValues; onValuesChange?: (values: AccessFormGcoreConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormGcoreConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormGnameConfig.tsx b/ui/src/components/access/AccessFormGnameConfig.tsx index 990f01b60..1cf716a10 100644 --- a/ui/src/components/access/AccessFormGnameConfig.tsx +++ b/ui/src/components/access/AccessFormGnameConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForGname } from "@/domain/access"; type AccessFormGnameConfigFieldValues = Nullish; -export type AccessFormGnameConfigProps = { +export interface AccessFormGnameConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormGnameConfigFieldValues; onValuesChange?: (values: AccessFormGnameConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormGnameConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormGoDaddyConfig.tsx b/ui/src/components/access/AccessFormGoDaddyConfig.tsx index c604a8b3d..f71d1e854 100644 --- a/ui/src/components/access/AccessFormGoDaddyConfig.tsx +++ b/ui/src/components/access/AccessFormGoDaddyConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForGoDaddy } from "@/domain/access"; type AccessFormGoDaddyConfigFieldValues = Nullish; -export type AccessFormGoDaddyConfigProps = { +export interface AccessFormGoDaddyConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormGoDaddyConfigFieldValues; onValuesChange?: (values: AccessFormGoDaddyConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormGoDaddyConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormGoEdgeConfig.tsx b/ui/src/components/access/AccessFormGoEdgeConfig.tsx index 6f136e34e..affc32822 100644 --- a/ui/src/components/access/AccessFormGoEdgeConfig.tsx +++ b/ui/src/components/access/AccessFormGoEdgeConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForGoEdge } from "@/domain/access"; type AccessFormGoEdgeConfigFieldValues = Nullish; -export type AccessFormGoEdgeConfigProps = { +export interface AccessFormGoEdgeConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormGoEdgeConfigFieldValues; onValuesChange?: (values: AccessFormGoEdgeConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormGoEdgeConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormGoogleTrustServicesConfig.tsx b/ui/src/components/access/AccessFormGoogleTrustServicesConfig.tsx index b30384f58..36d576a1c 100644 --- a/ui/src/components/access/AccessFormGoogleTrustServicesConfig.tsx +++ b/ui/src/components/access/AccessFormGoogleTrustServicesConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForGoogleTrustServices } from "@/domain/access"; type AccessFormGoogleTrustServicesConfigFieldValues = Nullish; -export type AccessFormGoogleTrustServicesConfigProps = { +export interface AccessFormGoogleTrustServicesConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormGoogleTrustServicesConfigFieldValues; onValuesChange?: (values: AccessFormGoogleTrustServicesConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormGoogleTrustServicesConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormHetznerConfig.tsx b/ui/src/components/access/AccessFormHetznerConfig.tsx index b596e997e..762788c0a 100644 --- a/ui/src/components/access/AccessFormHetznerConfig.tsx +++ b/ui/src/components/access/AccessFormHetznerConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForHetzner } from "@/domain/access"; type AccessFormHetznerConfigFieldValues = Nullish; -export type AccessFormHetznerConfigProps = { +export interface AccessFormHetznerConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormHetznerConfigFieldValues; onValuesChange?: (values: AccessFormHetznerConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormHetznerConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormHuaweiCloudConfig.tsx b/ui/src/components/access/AccessFormHuaweiCloudConfig.tsx index fc56d558f..82486ae12 100644 --- a/ui/src/components/access/AccessFormHuaweiCloudConfig.tsx +++ b/ui/src/components/access/AccessFormHuaweiCloudConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForHuaweiCloud } from "@/domain/access"; type AccessFormHuaweiCloudConfigFieldValues = Nullish; -export type AccessFormHuaweiCloudConfigProps = { +export interface AccessFormHuaweiCloudConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormHuaweiCloudConfigFieldValues; onValuesChange?: (values: AccessFormHuaweiCloudConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormHuaweiCloudConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormJDCloudConfig.tsx b/ui/src/components/access/AccessFormJDCloudConfig.tsx index 10fb4bade..ca1bdcc93 100644 --- a/ui/src/components/access/AccessFormJDCloudConfig.tsx +++ b/ui/src/components/access/AccessFormJDCloudConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForJDCloud } from "@/domain/access"; type AccessFormJDCloudConfigFieldValues = Nullish; -export type AccessFormJDCloudConfigProps = { +export interface AccessFormJDCloudConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormJDCloudConfigFieldValues; onValuesChange?: (values: AccessFormJDCloudConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormJDCloudConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormKongConfig.tsx b/ui/src/components/access/AccessFormKongConfig.tsx index 8221ae9b5..cbdeded4d 100644 --- a/ui/src/components/access/AccessFormKongConfig.tsx +++ b/ui/src/components/access/AccessFormKongConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForKong } from "@/domain/access"; type AccessFormKongConfigFieldValues = Nullish; -export type AccessFormKongConfigProps = { +export interface AccessFormKongConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormKongConfigFieldValues; onValuesChange?: (values: AccessFormKongConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormKongConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormKubernetesConfig.tsx b/ui/src/components/access/AccessFormKubernetesConfig.tsx index ff2bd4911..520e89aa7 100644 --- a/ui/src/components/access/AccessFormKubernetesConfig.tsx +++ b/ui/src/components/access/AccessFormKubernetesConfig.tsx @@ -8,13 +8,13 @@ import { type AccessConfigForKubernetes } from "@/domain/access"; type AccessFormKubernetesConfigFieldValues = Nullish; -export type AccessFormKubernetesConfigProps = { +export interface AccessFormKubernetesConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormKubernetesConfigFieldValues; onValuesChange?: (values: AccessFormKubernetesConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormKubernetesConfigFieldValues => { return {}; diff --git a/ui/src/components/access/AccessFormLarkBotConfig.tsx b/ui/src/components/access/AccessFormLarkBotConfig.tsx index a121e4e6b..c237df5c5 100644 --- a/ui/src/components/access/AccessFormLarkBotConfig.tsx +++ b/ui/src/components/access/AccessFormLarkBotConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForLarkBot } from "@/domain/access"; type AccessFormLarkBotConfigFieldValues = Nullish; -export type AccessFormLarkBotConfigProps = { +export interface AccessFormLarkBotConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormLarkBotConfigFieldValues; onValuesChange?: (values: AccessFormLarkBotConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormLarkBotConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormLeCDNConfig.tsx b/ui/src/components/access/AccessFormLeCDNConfig.tsx index d43f846aa..88399eecc 100644 --- a/ui/src/components/access/AccessFormLeCDNConfig.tsx +++ b/ui/src/components/access/AccessFormLeCDNConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForLeCDN } from "@/domain/access"; type AccessFormLeCDNConfigFieldValues = Nullish; -export type AccessFormLeCDNConfigProps = { +export interface AccessFormLeCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormLeCDNConfigFieldValues; onValuesChange?: (values: AccessFormLeCDNConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormLeCDNConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormMattermostConfig.tsx b/ui/src/components/access/AccessFormMattermostConfig.tsx index 99c12750f..178987f51 100644 --- a/ui/src/components/access/AccessFormMattermostConfig.tsx +++ b/ui/src/components/access/AccessFormMattermostConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForMattermost } from "@/domain/access"; type AccessFormMattermostConfigFieldValues = Nullish; -export type AccessFormMattermostConfigProps = { +export interface AccessFormMattermostConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormMattermostConfigFieldValues; onValuesChange?: (values: AccessFormMattermostConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormMattermostConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormNS1Config.tsx b/ui/src/components/access/AccessFormNS1Config.tsx index 4080b79bf..f06bfaf76 100644 --- a/ui/src/components/access/AccessFormNS1Config.tsx +++ b/ui/src/components/access/AccessFormNS1Config.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForNS1 } from "@/domain/access"; type AccessFormNS1ConfigFieldValues = Nullish; -export type AccessFormNS1ConfigProps = { +export interface AccessFormNS1ConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormNS1ConfigFieldValues; onValuesChange?: (values: AccessFormNS1ConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormNS1ConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormNameDotComConfig.tsx b/ui/src/components/access/AccessFormNameDotComConfig.tsx index e5a7a3725..5adba9376 100644 --- a/ui/src/components/access/AccessFormNameDotComConfig.tsx +++ b/ui/src/components/access/AccessFormNameDotComConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForNameDotCom } from "@/domain/access"; type AccessFormNameDotComConfigFieldValues = Nullish; -export type AccessFormNameDotComConfigProps = { +export interface AccessFormNameDotComConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormNameDotComConfigFieldValues; onValuesChange?: (values: AccessFormNameDotComConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormNameDotComConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormNameSiloConfig.tsx b/ui/src/components/access/AccessFormNameSiloConfig.tsx index a9421ffe9..4e21d9329 100644 --- a/ui/src/components/access/AccessFormNameSiloConfig.tsx +++ b/ui/src/components/access/AccessFormNameSiloConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForNameSilo } from "@/domain/access"; type AccessFormNameSiloConfigFieldValues = Nullish; -export type AccessFormNameSiloConfigProps = { +export interface AccessFormNameSiloConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormNameSiloConfigFieldValues; onValuesChange?: (values: AccessFormNameSiloConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormNameSiloConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormNamecheapConfig.tsx b/ui/src/components/access/AccessFormNamecheapConfig.tsx index 2ac819090..761cccc0f 100644 --- a/ui/src/components/access/AccessFormNamecheapConfig.tsx +++ b/ui/src/components/access/AccessFormNamecheapConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForNamecheap } from "@/domain/access"; type AccessFormNamecheapConfigFieldValues = Nullish; -export type AccessFormNamecheapConfigProps = { +export interface AccessFormNamecheapConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormNamecheapConfigFieldValues; onValuesChange?: (values: AccessFormNamecheapConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormNamecheapConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormNetcupConfig.tsx b/ui/src/components/access/AccessFormNetcupConfig.tsx index 02aa52723..bcd7ca26e 100644 --- a/ui/src/components/access/AccessFormNetcupConfig.tsx +++ b/ui/src/components/access/AccessFormNetcupConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForNetcup } from "@/domain/access"; type AccessFormNetcupConfigFieldValues = Nullish; -export type AccessFormNetcupConfigProps = { +export interface AccessFormNetcupConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormNetcupConfigFieldValues; onValuesChange?: (values: AccessFormNetcupConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormNetcupConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormNetlifyConfig.tsx b/ui/src/components/access/AccessFormNetlifyConfig.tsx index 91d0c31e1..8b194f544 100644 --- a/ui/src/components/access/AccessFormNetlifyConfig.tsx +++ b/ui/src/components/access/AccessFormNetlifyConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForNetlify } from "@/domain/access"; type AccessFormNetlifyConfigFieldValues = Nullish; -export type AccessFormNetlifyConfigProps = { +export interface AccessFormNetlifyConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormNetlifyConfigFieldValues; onValuesChange?: (values: AccessFormNetlifyConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormNetlifyConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormPorkbunConfig.tsx b/ui/src/components/access/AccessFormPorkbunConfig.tsx index 65193db7c..b4db53a05 100644 --- a/ui/src/components/access/AccessFormPorkbunConfig.tsx +++ b/ui/src/components/access/AccessFormPorkbunConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForPorkbun } from "@/domain/access"; type AccessFormPorkbunConfigFieldValues = Nullish; -export type AccessFormPorkbunConfigProps = { +export interface AccessFormPorkbunConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormPorkbunConfigFieldValues; onValuesChange?: (values: AccessFormPorkbunConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormPorkbunConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormPowerDNSConfig.tsx b/ui/src/components/access/AccessFormPowerDNSConfig.tsx index 2b03a9fd7..ea813a3be 100644 --- a/ui/src/components/access/AccessFormPowerDNSConfig.tsx +++ b/ui/src/components/access/AccessFormPowerDNSConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForPowerDNS } from "@/domain/access"; type AccessFormPowerDNSConfigFieldValues = Nullish; -export type AccessFormPowerDNSConfigProps = { +export interface AccessFormPowerDNSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormPowerDNSConfigFieldValues; onValuesChange?: (values: AccessFormPowerDNSConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormPowerDNSConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormProxmoxVEConfig.tsx b/ui/src/components/access/AccessFormProxmoxVEConfig.tsx index 05caab14f..2158f431f 100644 --- a/ui/src/components/access/AccessFormProxmoxVEConfig.tsx +++ b/ui/src/components/access/AccessFormProxmoxVEConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForProxmoxVE } from "@/domain/access"; type AccessFormProxmoxVEConfigFieldValues = Nullish; -export type AccessFormProxmoxVEConfigProps = { +export interface AccessFormProxmoxVEConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormProxmoxVEConfigFieldValues; onValuesChange?: (values: AccessFormProxmoxVEConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormProxmoxVEConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormQiniuConfig.tsx b/ui/src/components/access/AccessFormQiniuConfig.tsx index dcbebcd06..c6faeb1c2 100644 --- a/ui/src/components/access/AccessFormQiniuConfig.tsx +++ b/ui/src/components/access/AccessFormQiniuConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForQiniu } from "@/domain/access"; type AccessFormQiniuConfigFieldValues = Nullish; -export type AccessFormQiniuConfigProps = { +export interface AccessFormQiniuConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormQiniuConfigFieldValues; onValuesChange?: (values: AccessFormQiniuConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormQiniuConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormRainYunConfig.tsx b/ui/src/components/access/AccessFormRainYunConfig.tsx index b9b0b1713..5bcd12f76 100644 --- a/ui/src/components/access/AccessFormRainYunConfig.tsx +++ b/ui/src/components/access/AccessFormRainYunConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForRainYun } from "@/domain/access"; type AccessFormRainYunConfigFieldValues = Nullish; -export type AccessFormRainYunConfigProps = { +export interface AccessFormRainYunConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormRainYunConfigFieldValues; onValuesChange?: (values: AccessFormRainYunConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormRainYunConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormRatPanelConfig.tsx b/ui/src/components/access/AccessFormRatPanelConfig.tsx index 2496c8668..bfac4ed29 100644 --- a/ui/src/components/access/AccessFormRatPanelConfig.tsx +++ b/ui/src/components/access/AccessFormRatPanelConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForRatPanel } from "@/domain/access"; type AccessFormRatPanelConfigFieldValues = Nullish; -export type AccessFormRatPanelConfigProps = { +export interface AccessFormRatPanelConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormRatPanelConfigFieldValues; onValuesChange?: (values: AccessFormRatPanelConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormRatPanelConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormSSHConfig.tsx b/ui/src/components/access/AccessFormSSHConfig.tsx index 3dd0ce004..53898f6a1 100644 --- a/ui/src/components/access/AccessFormSSHConfig.tsx +++ b/ui/src/components/access/AccessFormSSHConfig.tsx @@ -1,6 +1,6 @@ import { useTranslation } from "react-i18next"; import { IconCircleArrowDown, IconCircleArrowUp, IconCircleMinus, IconCirclePlus } from "@tabler/icons-react"; -import { Button, Collapse, Form, type FormInstance, Input, InputNumber, Select, Space } from "antd"; +import { Button, Collapse, Form, type FormInstance, Input, InputNumber, Select } from "antd"; import { createSchemaFieldRule } from "antd-zod"; import { z } from "zod"; @@ -11,13 +11,13 @@ import { validDomainName, validIPv4Address, validIPv6Address, validPortNumber } type AccessFormSSHConfigFieldValues = Nullish; -export type AccessFormSSHConfigProps = { +export interface AccessFormSSHConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormSSHConfigFieldValues; onValuesChange?: (values: AccessFormSSHConfigFieldValues) => void; -}; +} const AUTH_METHOD_NONE = "none" as const; const AUTH_METHOD_PASSWORD = "password" as const; @@ -171,7 +171,7 @@ const AccessFormSSHConfig = ({ form: formInst, formName, disabled, initialValues {(fields, { add, remove, move }) => ( - +
{fields?.length > 0 ? ( { @@ -288,7 +288,7 @@ const AccessFormSSHConfig = ({ form: formInst, formName, disabled, initialValues - +
)}
diff --git a/ui/src/components/access/AccessFormSSLComConfig.tsx b/ui/src/components/access/AccessFormSSLComConfig.tsx index 22b60ae4a..33cd05b9e 100644 --- a/ui/src/components/access/AccessFormSSLComConfig.tsx +++ b/ui/src/components/access/AccessFormSSLComConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForSSLCom } from "@/domain/access"; type AccessFormSSLComConfigFieldValues = Nullish; -export type AccessFormSSLComConfigProps = { +export interface AccessFormSSLComConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormSSLComConfigFieldValues; onValuesChange?: (values: AccessFormSSLComConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormSSLComConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormSafeLineConfig.tsx b/ui/src/components/access/AccessFormSafeLineConfig.tsx index 86b4d7e4b..909a2b7a2 100644 --- a/ui/src/components/access/AccessFormSafeLineConfig.tsx +++ b/ui/src/components/access/AccessFormSafeLineConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForSafeLine } from "@/domain/access"; type AccessFormSafeLineConfigFieldValues = Nullish; -export type AccessFormSafeLineConfigProps = { +export interface AccessFormSafeLineConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormSafeLineConfigFieldValues; onValuesChange?: (values: AccessFormSafeLineConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormSafeLineConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormSlackBotConfig.tsx b/ui/src/components/access/AccessFormSlackBotConfig.tsx index a55ca3ead..6c7b6e9c5 100644 --- a/ui/src/components/access/AccessFormSlackBotConfig.tsx +++ b/ui/src/components/access/AccessFormSlackBotConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForSlackBot } from "@/domain/access"; type AccessFormSlackBotConfigFieldValues = Nullish; -export type AccessFormSlackBotConfigProps = { +export interface AccessFormSlackBotConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormSlackBotConfigFieldValues; onValuesChange?: (values: AccessFormSlackBotConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormSlackBotConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormSpaceshipConfig.tsx b/ui/src/components/access/AccessFormSpaceshipConfig.tsx index b42d11444..a3b57625c 100644 --- a/ui/src/components/access/AccessFormSpaceshipConfig.tsx +++ b/ui/src/components/access/AccessFormSpaceshipConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForSpaceship } from "@/domain/access"; type AccessFormSpaceshipConfigFieldValues = Nullish; -export type AccessFormSpaceshipConfigProps = { +export interface AccessFormSpaceshipConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormSpaceshipConfigFieldValues; onValuesChange?: (values: AccessFormSpaceshipConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormSpaceshipConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormTelegramBotConfig.tsx b/ui/src/components/access/AccessFormTelegramBotConfig.tsx index 32d500342..993e3da57 100644 --- a/ui/src/components/access/AccessFormTelegramBotConfig.tsx +++ b/ui/src/components/access/AccessFormTelegramBotConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForTelegramBot } from "@/domain/access"; type AccessFormTelegramBotConfigFieldValues = Nullish; -export type AccessFormTelegramBotConfigProps = { +export interface AccessFormTelegramBotConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormTelegramBotConfigFieldValues; onValuesChange?: (values: AccessFormTelegramBotConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormTelegramBotConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormTencentCloudConfig.tsx b/ui/src/components/access/AccessFormTencentCloudConfig.tsx index 540ebdd92..e876c1c62 100644 --- a/ui/src/components/access/AccessFormTencentCloudConfig.tsx +++ b/ui/src/components/access/AccessFormTencentCloudConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForTencentCloud } from "@/domain/access"; type AccessFormTencentCloudConfigFieldValues = Nullish; -export type AccessFormTencentCloudConfigProps = { +export interface AccessFormTencentCloudConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormTencentCloudConfigFieldValues; onValuesChange?: (values: AccessFormTencentCloudConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormTencentCloudConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormUCloudConfig.tsx b/ui/src/components/access/AccessFormUCloudConfig.tsx index 395d185e2..4604c5306 100644 --- a/ui/src/components/access/AccessFormUCloudConfig.tsx +++ b/ui/src/components/access/AccessFormUCloudConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForUCloud } from "@/domain/access"; type AccessFormUCloudConfigFieldValues = Nullish; -export type AccessFormUCloudConfigProps = { +export interface AccessFormUCloudConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormUCloudConfigFieldValues; onValuesChange?: (values: AccessFormUCloudConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormUCloudConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormUniCloudConfig.tsx b/ui/src/components/access/AccessFormUniCloudConfig.tsx index 8b6d13468..ec01b7666 100644 --- a/ui/src/components/access/AccessFormUniCloudConfig.tsx +++ b/ui/src/components/access/AccessFormUniCloudConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForUniCloud } from "@/domain/access"; type AccessFormUniCloudConfigFieldValues = Nullish; -export type AccessFormUniCloudConfigProps = { +export interface AccessFormUniCloudConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormUniCloudConfigFieldValues; onValuesChange?: (values: AccessFormUniCloudConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormUniCloudConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormUpyunConfig.tsx b/ui/src/components/access/AccessFormUpyunConfig.tsx index 24feb9f83..10aad03f6 100644 --- a/ui/src/components/access/AccessFormUpyunConfig.tsx +++ b/ui/src/components/access/AccessFormUpyunConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForUpyun } from "@/domain/access"; type AccessFormUpyunConfigFieldValues = Nullish; -export type AccessFormUpyunConfigProps = { +export interface AccessFormUpyunConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormUpyunConfigFieldValues; onValuesChange?: (values: AccessFormUpyunConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormUpyunConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormVercelConfig.tsx b/ui/src/components/access/AccessFormVercelConfig.tsx index a3a1954e2..d982d74e4 100644 --- a/ui/src/components/access/AccessFormVercelConfig.tsx +++ b/ui/src/components/access/AccessFormVercelConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForVercel } from "@/domain/access"; type AccessFormVercelConfigFieldValues = Nullish; -export type AccessFormVercelConfigProps = { +export interface AccessFormVercelConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormVercelConfigFieldValues; onValuesChange?: (values: AccessFormVercelConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormVercelConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormVolcEngineConfig.tsx b/ui/src/components/access/AccessFormVolcEngineConfig.tsx index c9a302a2a..c495420bb 100644 --- a/ui/src/components/access/AccessFormVolcEngineConfig.tsx +++ b/ui/src/components/access/AccessFormVolcEngineConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForVolcEngine } from "@/domain/access"; type AccessFormVolcEngineConfigFieldValues = Nullish; -export type AccessFormVolcEngineConfigProps = { +export interface AccessFormVolcEngineConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormVolcEngineConfigFieldValues; onValuesChange?: (values: AccessFormVolcEngineConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormVolcEngineConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormWangsuConfig.tsx b/ui/src/components/access/AccessFormWangsuConfig.tsx index fe2950c4f..23b5fb142 100644 --- a/ui/src/components/access/AccessFormWangsuConfig.tsx +++ b/ui/src/components/access/AccessFormWangsuConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForWangsu } from "@/domain/access"; type AccessFormWangsuConfigFieldValues = Nullish; -export type AccessFormWangsuConfigProps = { +export interface AccessFormWangsuConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormWangsuConfigFieldValues; onValuesChange?: (values: AccessFormWangsuConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormWangsuConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormWeComBotConfig.tsx b/ui/src/components/access/AccessFormWeComBotConfig.tsx index 34f67d880..befd2c7b2 100644 --- a/ui/src/components/access/AccessFormWeComBotConfig.tsx +++ b/ui/src/components/access/AccessFormWeComBotConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForWeComBot } from "@/domain/access"; type AccessFormWeComBotConfigFieldValues = Nullish; -export type AccessFormWeComBotConfigProps = { +export interface AccessFormWeComBotConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormWeComBotConfigFieldValues; onValuesChange?: (values: AccessFormWeComBotConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormWeComBotConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormWebhookConfig.tsx b/ui/src/components/access/AccessFormWebhookConfig.tsx index 69e596842..a83b6692c 100644 --- a/ui/src/components/access/AccessFormWebhookConfig.tsx +++ b/ui/src/components/access/AccessFormWebhookConfig.tsx @@ -10,14 +10,14 @@ import { type AccessConfigForWebhook } from "@/domain/access"; type AccessFormWebhookConfigFieldValues = Nullish; -export type AccessFormWebhookConfigProps = { +export interface AccessFormWebhookConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormWebhookConfigFieldValues; usage?: "deployment" | "notification" | "none"; onValuesChange?: (values: AccessFormWebhookConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormWebhookConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormWestcnConfig.tsx b/ui/src/components/access/AccessFormWestcnConfig.tsx index 34439316d..a9136bb34 100644 --- a/ui/src/components/access/AccessFormWestcnConfig.tsx +++ b/ui/src/components/access/AccessFormWestcnConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForWestcn } from "@/domain/access"; type AccessFormWestcnConfigFieldValues = Nullish; -export type AccessFormWestcnConfigProps = { +export interface AccessFormWestcnConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormWestcnConfigFieldValues; onValuesChange?: (values: AccessFormWestcnConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormWestcnConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessFormZeroSSLConfig.tsx b/ui/src/components/access/AccessFormZeroSSLConfig.tsx index a16536671..37e3b7b61 100644 --- a/ui/src/components/access/AccessFormZeroSSLConfig.tsx +++ b/ui/src/components/access/AccessFormZeroSSLConfig.tsx @@ -7,13 +7,13 @@ import { type AccessConfigForZeroSSL } from "@/domain/access"; type AccessFormZeroSSLConfigFieldValues = Nullish; -export type AccessFormZeroSSLConfigProps = { +export interface AccessFormZeroSSLConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: AccessFormZeroSSLConfigFieldValues; onValuesChange?: (values: AccessFormZeroSSLConfigFieldValues) => void; -}; +} const initFormModel = (): AccessFormZeroSSLConfigFieldValues => { return { diff --git a/ui/src/components/access/AccessSelect.tsx b/ui/src/components/access/AccessSelect.tsx index b9ddc3ff3..bb661558f 100644 --- a/ui/src/components/access/AccessSelect.tsx +++ b/ui/src/components/access/AccessSelect.tsx @@ -6,12 +6,10 @@ import { accessProvidersMap } from "@/domain/provider"; import { useZustandShallowSelector } from "@/hooks"; import { useAccessesStore } from "@/stores/access"; -export type AccessTypeSelectProps = Omit< - SelectProps, - "filterOption" | "filterSort" | "labelRender" | "loading" | "options" | "optionFilterProp" | "optionLabelProp" | "optionRender" -> & { +export interface AccessTypeSelectProps + extends Omit { filter?: (record: AccessModel) => boolean; -}; +} const AccessSelect = ({ filter, ...props }: AccessTypeSelectProps) => { const { token: themeToken } = theme.useToken(); @@ -38,7 +36,7 @@ const AccessSelect = ({ filter, ...props }: AccessTypeSelectProps) => { const access = accesses.find((e) => e.id === key); if (!access) { return ( -
+
{key}
@@ -47,7 +45,7 @@ const AccessSelect = ({ filter, ...props }: AccessTypeSelectProps) => { const provider = accessProvidersMap.get(access.provider); return ( -
+
{access.name}
diff --git a/ui/src/components/certificate/CertificateDetail.tsx b/ui/src/components/certificate/CertificateDetail.tsx index 3db9e6966..a016eef19 100644 --- a/ui/src/components/certificate/CertificateDetail.tsx +++ b/ui/src/components/certificate/CertificateDetail.tsx @@ -8,11 +8,11 @@ import { saveAs } from "file-saver"; import { archive as archiveCertificate } from "@/api/certificates"; import { CERTIFICATE_FORMATS, type CertificateFormatType, type CertificateModel } from "@/domain/certificate"; -export type CertificateDetailProps = { +export interface CertificateDetailProps { className?: string; style?: React.CSSProperties; data: CertificateModel; -}; +} const CertificateDetail = ({ data, ...props }: CertificateDetailProps) => { const { t } = useTranslation(); diff --git a/ui/src/components/certificate/CertificateDetailDrawer.tsx b/ui/src/components/certificate/CertificateDetailDrawer.tsx index 130961444..b5419b190 100644 --- a/ui/src/components/certificate/CertificateDetailDrawer.tsx +++ b/ui/src/components/certificate/CertificateDetailDrawer.tsx @@ -6,13 +6,13 @@ import { type CertificateModel } from "@/domain/certificate"; import { useTriggerElement } from "@/hooks"; import CertificateDetail from "./CertificateDetail"; -export type CertificateDetailDrawerProps = { +export interface CertificateDetailDrawerProps { data?: CertificateModel; loading?: boolean; open?: boolean; trigger?: React.ReactNode; onOpenChange?: (open: boolean) => void; -}; +} const CertificateDetailDrawer = ({ data, loading, trigger, ...props }: CertificateDetailDrawerProps) => { const [open, setOpen] = useControllableValue(props, { diff --git a/ui/src/components/notification/NotifyTemplate.tsx b/ui/src/components/notification/NotifyTemplate.tsx index 152596e79..c4f024661 100644 --- a/ui/src/components/notification/NotifyTemplate.tsx +++ b/ui/src/components/notification/NotifyTemplate.tsx @@ -12,10 +12,10 @@ import { useAntdForm } from "@/hooks"; import { get as getSettings, save as saveSettings } from "@/repository/settings"; import { getErrMsg } from "@/utils/error"; -export type NotifyTemplateFormProps = { +export interface NotifyTemplateFormProps { className?: string; style?: React.CSSProperties; -}; +} const NotifyTemplateForm = ({ className, style }: NotifyTemplateFormProps) => { const { t } = useTranslation(); diff --git a/ui/src/components/notification/NotifyTestButton.tsx b/ui/src/components/notification/NotifyTestButton.tsx index 7bc9352b9..7d56eae6e 100644 --- a/ui/src/components/notification/NotifyTestButton.tsx +++ b/ui/src/components/notification/NotifyTestButton.tsx @@ -5,13 +5,13 @@ import { Button, type ButtonProps, message, notification } from "antd"; import { notifyTest } from "@/api/notify"; import { getErrMsg } from "@/utils/error"; -export type NotifyTestButtonProps = { +export interface NotifyTestButtonProps { className?: string; style?: React.CSSProperties; channel: string; disabled?: boolean; size?: ButtonProps["size"]; -}; +} const NotifyTestButton = ({ className, style, channel, disabled, size }: NotifyTestButtonProps) => { const { t } = useTranslation(); diff --git a/ui/src/components/provider/ACMEDns01ProviderPicker.tsx b/ui/src/components/provider/ACMEDns01ProviderPicker.tsx deleted file mode 100644 index 81f950623..000000000 --- a/ui/src/components/provider/ACMEDns01ProviderPicker.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import { memo, useEffect, useMemo, useRef, useState } from "react"; -import { useTranslation } from "react-i18next"; -import { Avatar, Card, Col, Empty, Flex, Input, type InputRef, Row, Typography } from "antd"; - -import Show from "@/components/Show"; -import { type ACMEDns01Provider, acmeDns01ProvidersMap } from "@/domain/provider"; - -export type ACMEDns01ProviderPickerProps = { - className?: string; - style?: React.CSSProperties; - autoFocus?: boolean; - filter?: (record: ACMEDns01Provider) => boolean; - placeholder?: string; - onSelect?: (value: string) => void; -}; - -const ACMEDns01ProviderPicker = ({ className, style, autoFocus, filter, placeholder, onSelect }: ACMEDns01ProviderPickerProps) => { - const { t } = useTranslation(); - - const [keyword, setKeyword] = useState(); - const keywordInputRef = useRef(null); - useEffect(() => { - if (autoFocus) { - setTimeout(() => keywordInputRef.current?.focus(), 1); - } - }, []); - - const providers = useMemo(() => { - return Array.from(acmeDns01ProvidersMap.values()) - .filter((provider) => { - if (filter) { - return filter(provider); - } - - return true; - }) - .filter((provider) => { - if (keyword) { - const value = keyword.toLowerCase(); - return provider.type.toLowerCase().includes(value) || t(provider.name).toLowerCase().includes(value); - } - - return true; - }); - }, [filter, keyword]); - - const handleProviderTypeSelect = (value: string) => { - onSelect?.(value); - }; - - return ( -
- setKeyword(e.target.value.trim())} /> - -
- 0} fallback={}> - - {providers.map((provider, index) => { - return ( - - { - handleProviderTypeSelect(provider.type); - }} - > - - - {t(provider.name)} - - - - ); - })} - - -
-
- ); -}; - -export default memo(ACMEDns01ProviderPicker); diff --git a/ui/src/components/provider/ACMEDns01ProviderSelect.tsx b/ui/src/components/provider/ACMEDns01ProviderSelect.tsx index a6fb45953..8c6b919da 100644 --- a/ui/src/components/provider/ACMEDns01ProviderSelect.tsx +++ b/ui/src/components/provider/ACMEDns01ProviderSelect.tsx @@ -1,15 +1,13 @@ -import { memo, useMemo } from "react"; +import { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { Avatar, Select, type SelectProps, Typography, theme } from "antd"; import { type ACMEDns01Provider, acmeDns01ProvidersMap } from "@/domain/provider"; -export type ACMEDns01ProviderSelectProps = Omit< - SelectProps, - "filterOption" | "filterSort" | "labelRender" | "options" | "optionFilterProp" | "optionLabelProp" | "optionRender" -> & { +export interface ACMEDns01ProviderSelectProps + extends Omit { filter?: (record: ACMEDns01Provider) => boolean; -}; +} const ACMEDns01ProviderSelect = ({ filter, ...props }: ACMEDns01ProviderSelectProps) => { const { t } = useTranslation(); @@ -67,4 +65,4 @@ const ACMEDns01ProviderSelect = ({ filter, ...props }: ACMEDns01ProviderSelectPr ); }; -export default memo(ACMEDns01ProviderSelect); +export default ACMEDns01ProviderSelect; diff --git a/ui/src/components/provider/AccessProviderPicker.tsx b/ui/src/components/provider/AccessProviderPicker.tsx index 84225de71..0b51e960c 100644 --- a/ui/src/components/provider/AccessProviderPicker.tsx +++ b/ui/src/components/provider/AccessProviderPicker.tsx @@ -1,12 +1,13 @@ -import { memo, useEffect, useMemo, useRef, useState } from "react"; +import { useEffect, useMemo, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Avatar, Card, Col, Empty, Flex, Input, type InputRef, Row, Tag, Typography } from "antd"; +import { useSize } from "ahooks"; +import { Avatar, Card, Empty, Input, type InputRef, Tag, Typography } from "antd"; import Show from "@/components/Show"; import { ACCESS_USAGES, type AccessProvider, type AccessUsageType, accessProvidersMap } from "@/domain/provider"; import { mergeCls } from "@/utils/css"; -export type AccessProviderPickerProps = { +export interface AccessProviderPickerProps { className?: string; style?: React.CSSProperties; autoFocus?: boolean; @@ -14,11 +15,14 @@ export type AccessProviderPickerProps = { placeholder?: string; showOptionTags?: boolean | { [key in AccessUsageType]?: boolean }; onSelect?: (value: string) => void; -}; +} const AccessProviderPicker = ({ className, style, autoFocus, filter, placeholder, showOptionTags, onSelect }: AccessProviderPickerProps) => { const { t } = useTranslation(); + const wrapperRef = useRef(null); + const wrapperSize = useSize(wrapperRef); + const [keyword, setKeyword] = useState(); const keywordInputRef = useRef(null); useEffect(() => { @@ -45,34 +49,45 @@ const AccessProviderPicker = ({ className, style, autoFocus, filter, placeholder return true; }); }, [filter, keyword]); + const providerCols = useMemo(() => { + if (!wrapperSize) { + return 1; + } + + const cols = Math.floor(wrapperSize.width / 200); + return Math.min(9, Math.max(1, cols)); + }, [wrapperSize]); const showOptionTagForDNS = useMemo(() => { - return typeof showOptionTags === "object" ? !!showOptionTags[ACCESS_USAGES.DNS] : !!showOptionTags; + return typeof showOptionTags === "object" ? !!showOptionTags?.[ACCESS_USAGES.DNS] : !!showOptionTags; }, [showOptionTags]); const showOptionTagForHosting = useMemo(() => { - return typeof showOptionTags === "object" ? !!showOptionTags[ACCESS_USAGES.HOSTING] : !!showOptionTags; + return typeof showOptionTags === "object" ? !!showOptionTags?.[ACCESS_USAGES.HOSTING] : !!showOptionTags; }, [showOptionTags]); const showOptionTagForCA = useMemo(() => { - return typeof showOptionTags === "object" ? !!showOptionTags[ACCESS_USAGES.CA] : !!showOptionTags; + return typeof showOptionTags === "object" ? !!showOptionTags?.[ACCESS_USAGES.CA] : !!showOptionTags; }, [showOptionTags]); const showOptionTagForNotification = useMemo(() => { - return typeof showOptionTags === "object" ? !!showOptionTags[ACCESS_USAGES.NOTIFICATION] : !!showOptionTags; + return typeof showOptionTags === "object" ? !!showOptionTags?.[ACCESS_USAGES.NOTIFICATION] : !!showOptionTags; }, [showOptionTags]); + const showOptionTagAnyhow = useMemo(() => { + return showOptionTagForDNS || showOptionTagForHosting || showOptionTagForCA || showOptionTagForNotification; + }, [showOptionTagForDNS, showOptionTagForHosting, showOptionTagForCA, showOptionTagForNotification]); const handleProviderTypeSelect = (value: string) => { onSelect?.(value); }; return ( -
+
setKeyword(e.target.value.trim())} />
0} fallback={}> - - {providers.map((provider, index) => { +
+ {providers.map((provider) => { return ( - +
- - +
+ } shape="square" size={28} />
- - {t(provider.name)} - -
- - {t("access.props.provider.builtin")} - - - {t("access.props.provider.usage.dns")} - - - {t("access.props.provider.usage.hosting")} - - - {t("access.props.provider.usage.ca")} - - - {t("access.props.provider.usage.notification")} - +
+ {t(provider.name) || "\u00A0"}
+ +
+ + {t("access.props.provider.builtin")} + + + {t("access.props.provider.usage.dns")} + + + {t("access.props.provider.usage.hosting")} + + + {t("access.props.provider.usage.ca")} + + + {t("access.props.provider.usage.notification")} + +
+
- +
- +
); })} - +
); }; -export default memo(AccessProviderPicker); +export default AccessProviderPicker; diff --git a/ui/src/components/provider/AccessProviderSelect.tsx b/ui/src/components/provider/AccessProviderSelect.tsx index 7961eba2c..da81032a6 100644 --- a/ui/src/components/provider/AccessProviderSelect.tsx +++ b/ui/src/components/provider/AccessProviderSelect.tsx @@ -1,17 +1,15 @@ -import { memo, useMemo } from "react"; +import { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { Avatar, Select, type SelectProps, Tag, Typography, theme } from "antd"; import Show from "@/components/Show"; import { ACCESS_USAGES, type AccessProvider, type AccessUsageType, accessProvidersMap } from "@/domain/provider"; -export type AccessProviderSelectProps = Omit< - SelectProps, - "filterOption" | "filterSort" | "labelRender" | "options" | "optionFilterProp" | "optionLabelProp" | "optionRender" -> & { +export interface AccessProviderSelectProps + extends Omit { filter?: (record: AccessProvider) => boolean; showOptionTags?: boolean | { [key in AccessUsageType]?: boolean }; -}; +} const AccessProviderSelect = ({ filter, showOptionTags, ...props }: AccessProviderSelectProps = { showOptionTags: true }) => { const { t } = useTranslation(); @@ -37,16 +35,16 @@ const AccessProviderSelect = ({ filter, showOptionTags, ...props }: AccessProvid }, [filter]); const showOptionTagForDNS = useMemo(() => { - return typeof showOptionTags === "object" ? !!showOptionTags[ACCESS_USAGES.DNS] : !!showOptionTags; + return typeof showOptionTags === "object" ? !!showOptionTags?.[ACCESS_USAGES.DNS] : !!showOptionTags; }, [showOptionTags]); const showOptionTagForHosting = useMemo(() => { - return typeof showOptionTags === "object" ? !!showOptionTags[ACCESS_USAGES.HOSTING] : !!showOptionTags; + return typeof showOptionTags === "object" ? !!showOptionTags?.[ACCESS_USAGES.HOSTING] : !!showOptionTags; }, [showOptionTags]); const showOptionTagForCA = useMemo(() => { - return typeof showOptionTags === "object" ? !!showOptionTags[ACCESS_USAGES.CA] : !!showOptionTags; + return typeof showOptionTags === "object" ? !!showOptionTags?.[ACCESS_USAGES.CA] : !!showOptionTags; }, [showOptionTags]); const showOptionTagForNotification = useMemo(() => { - return typeof showOptionTags === "object" ? !!showOptionTags[ACCESS_USAGES.NOTIFICATION] : !!showOptionTags; + return typeof showOptionTags === "object" ? !!showOptionTags?.[ACCESS_USAGES.NOTIFICATION] : !!showOptionTags; }, [showOptionTags]); const renderOption = (key: string) => { @@ -55,11 +53,11 @@ const AccessProviderSelect = ({ filter, showOptionTags, ...props }: AccessProvid
- + {t(provider.name)}
-
+
{t("access.props.provider.builtin")} @@ -104,4 +102,4 @@ const AccessProviderSelect = ({ filter, showOptionTags, ...props }: AccessProvid ); }; -export default memo(AccessProviderSelect); +export default AccessProviderSelect; diff --git a/ui/src/components/provider/CAProviderSelect.tsx b/ui/src/components/provider/CAProviderSelect.tsx index 68d6de920..b1946e7ed 100644 --- a/ui/src/components/provider/CAProviderSelect.tsx +++ b/ui/src/components/provider/CAProviderSelect.tsx @@ -1,15 +1,13 @@ -import { memo, useMemo } from "react"; +import { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { Avatar, Select, type SelectProps, Typography, theme } from "antd"; import { type CAProvider, caProvidersMap } from "@/domain/provider"; -export type CAProviderSelectProps = Omit< - SelectProps, - "filterOption" | "filterSort" | "labelRender" | "options" | "optionFilterProp" | "optionLabelProp" | "optionRender" -> & { +export interface CAProviderSelectProps + extends Omit { filter?: (record: CAProvider) => boolean; -}; +} const CAProviderSelect = ({ filter, ...props }: CAProviderSelectProps) => { const { t } = useTranslation(); @@ -86,4 +84,4 @@ const CAProviderSelect = ({ filter, ...props }: CAProviderSelectProps) => { ); }; -export default memo(CAProviderSelect); +export default CAProviderSelect; diff --git a/ui/src/components/provider/DeploymentProviderPicker.tsx b/ui/src/components/provider/DeploymentProviderPicker.tsx index 319709816..7259fa050 100644 --- a/ui/src/components/provider/DeploymentProviderPicker.tsx +++ b/ui/src/components/provider/DeploymentProviderPicker.tsx @@ -1,22 +1,27 @@ -import { memo, useEffect, useMemo, useRef, useState } from "react"; +import { useEffect, useMemo, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Avatar, Card, Col, Empty, Flex, Input, type InputRef, Row, Tabs, Tooltip, Typography } from "antd"; +import { useSize } from "ahooks"; +import { Avatar, Card, Empty, Flex, Input, type InputRef, Tabs, Tooltip, Typography } from "antd"; import Show from "@/components/Show"; import { DEPLOYMENT_CATEGORIES, type DeploymentProvider, deploymentProvidersMap } from "@/domain/provider"; +import { mergeCls } from "@/utils/css"; -export type DeploymentProviderPickerProps = { +export interface DeploymentProviderPickerProps { className?: string; style?: React.CSSProperties; autoFocus?: boolean; filter?: (record: DeploymentProvider) => boolean; placeholder?: string; onSelect?: (value: string) => void; -}; +} const DeploymentProviderPicker = ({ className, style, autoFocus, filter, placeholder, onSelect }: DeploymentProviderPickerProps) => { const { t } = useTranslation(); + const wrapperRef = useRef(null); + const wrapperSize = useSize(wrapperRef); + const [category, setCategory] = useState(DEPLOYMENT_CATEGORIES.ALL); const [keyword, setKeyword] = useState(); @@ -52,13 +57,21 @@ const DeploymentProviderPicker = ({ className, style, autoFocus, filter, placeho return true; }); }, [filter, category, keyword]); + const providerCols = useMemo(() => { + if (!wrapperSize) { + return 1; + } + + const cols = Math.floor(wrapperSize.width / 320); + return Math.min(9, Math.max(1, cols)); + }, [wrapperSize]); const handleProviderTypeSelect = (value: string) => { onSelect?.(value); }; return ( -
+
setKeyword(e.target.value.trim())} />
@@ -91,10 +104,10 @@ const DeploymentProviderPicker = ({ className, style, autoFocus, filter, placeho
0} fallback={}> - - {providers.map((provider, index) => { +
+ {providers.map((provider) => { return ( - +
- - - {t(provider.name)} - +
+ } shape="square" size={28} /> +
+
+ {t(provider.name) || "\u00A0"} +
+
+
- +
); })} - +
@@ -122,4 +139,4 @@ const DeploymentProviderPicker = ({ className, style, autoFocus, filter, placeho ); }; -export default memo(DeploymentProviderPicker); +export default DeploymentProviderPicker; diff --git a/ui/src/components/provider/DeploymentProviderSelect.tsx b/ui/src/components/provider/DeploymentProviderSelect.tsx index 1ca5162a4..8963be617 100644 --- a/ui/src/components/provider/DeploymentProviderSelect.tsx +++ b/ui/src/components/provider/DeploymentProviderSelect.tsx @@ -1,15 +1,13 @@ -import { memo, useMemo } from "react"; +import { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { Avatar, Select, type SelectProps, Typography, theme } from "antd"; import { type DeploymentProvider, deploymentProvidersMap } from "@/domain/provider"; -export type DeploymentProviderSelectProps = Omit< - SelectProps, - "filterOption" | "filterSort" | "labelRender" | "options" | "optionFilterProp" | "optionLabelProp" | "optionRender" -> & { +export interface DeploymentProviderSelectProps + extends Omit { filter?: (record: DeploymentProvider) => boolean; -}; +} const DeploymentProviderSelect = ({ filter, ...props }: DeploymentProviderSelectProps) => { const { t } = useTranslation(); @@ -67,4 +65,4 @@ const DeploymentProviderSelect = ({ filter, ...props }: DeploymentProviderSelect ); }; -export default memo(DeploymentProviderSelect); +export default DeploymentProviderSelect; diff --git a/ui/src/components/provider/NotificationProviderSelect.tsx b/ui/src/components/provider/NotificationProviderSelect.tsx index 683c8fec2..5846cfea9 100644 --- a/ui/src/components/provider/NotificationProviderSelect.tsx +++ b/ui/src/components/provider/NotificationProviderSelect.tsx @@ -1,15 +1,13 @@ -import { memo, useMemo } from "react"; +import { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { Avatar, Select, type SelectProps, Typography, theme } from "antd"; import { type NotificationProvider, notificationProvidersMap } from "@/domain/provider"; -export type NotificationProviderSelectProps = Omit< - SelectProps, - "filterOption" | "filterSort" | "labelRender" | "options" | "optionFilterProp" | "optionLabelProp" | "optionRender" -> & { +export interface NotificationProviderSelectProps + extends Omit { filter?: (record: NotificationProvider) => boolean; -}; +} const NotificationProviderSelect = ({ filter, ...props }: NotificationProviderSelectProps) => { const { t } = useTranslation(); @@ -67,4 +65,4 @@ const NotificationProviderSelect = ({ filter, ...props }: NotificationProviderSe ); }; -export default memo(NotificationProviderSelect); +export default NotificationProviderSelect; diff --git a/ui/src/components/workflow/WorkflowElement.tsx b/ui/src/components/workflow/WorkflowElement.tsx index 86720f6de..67df8974e 100644 --- a/ui/src/components/workflow/WorkflowElement.tsx +++ b/ui/src/components/workflow/WorkflowElement.tsx @@ -15,12 +15,12 @@ import StartNode from "./node/StartNode"; import UnknownNode from "./node/UnknownNode"; import UploadNode from "./node/UploadNode"; -export type WorkflowElementProps = { +export interface WorkflowElementProps { node: WorkflowNode; disabled?: boolean; branchId?: string; branchIndex?: number; -}; +} const WorkflowElement = ({ node, disabled, branchId, branchIndex }: WorkflowElementProps) => { const nodeEl = useMemo(() => { diff --git a/ui/src/components/workflow/WorkflowElements.tsx b/ui/src/components/workflow/WorkflowElements.tsx index 5d2f82e16..20b75d8e4 100644 --- a/ui/src/components/workflow/WorkflowElements.tsx +++ b/ui/src/components/workflow/WorkflowElements.tsx @@ -5,11 +5,11 @@ import { WorkflowNodeType, newNode } from "@/domain/workflow"; import { useZustandShallowSelector } from "@/hooks"; import { useWorkflowStore } from "@/stores/workflow"; -export type WorkflowElementsProps = { +export interface WorkflowElementsProps { className?: string; style?: React.CSSProperties; disabled?: boolean; -}; +} const WorkflowElements = ({ className, style, disabled }: WorkflowElementsProps) => { const { workflow } = useWorkflowStore(useZustandShallowSelector(["workflow"])); diff --git a/ui/src/components/workflow/WorkflowElementsContainer.tsx b/ui/src/components/workflow/WorkflowElementsContainer.tsx index ab315f320..dcc83c724 100644 --- a/ui/src/components/workflow/WorkflowElementsContainer.tsx +++ b/ui/src/components/workflow/WorkflowElementsContainer.tsx @@ -5,11 +5,11 @@ import { Button, Card, Typography } from "antd"; import WorkflowElements from "@/components/workflow/WorkflowElements"; import { mergeCls } from "@/utils/css"; -export type WorkflowElementsProps = { +export interface WorkflowElementsProps { className?: string; style?: React.CSSProperties; disabled?: boolean; -}; +} const WorkflowElementsContainer = ({ className, style, disabled }: WorkflowElementsProps) => { const [scale, setScale] = useState(1); diff --git a/ui/src/components/workflow/WorkflowRunDetail.tsx b/ui/src/components/workflow/WorkflowRunDetail.tsx index 7c87bf8f5..f59e390e3 100644 --- a/ui/src/components/workflow/WorkflowRunDetail.tsx +++ b/ui/src/components/workflow/WorkflowRunDetail.tsx @@ -19,11 +19,11 @@ import { getErrMsg } from "@/utils/error"; import WorkflowStatusIcon from "./WorkflowStatusIcon"; -export type WorkflowRunDetailProps = { +export interface WorkflowRunDetailProps { className?: string; style?: React.CSSProperties; data: WorkflowRunModel; -}; +} const WorkflowRunDetail = ({ data, ...props }: WorkflowRunDetailProps) => { return ( diff --git a/ui/src/components/workflow/WorkflowRunDetailDrawer.tsx b/ui/src/components/workflow/WorkflowRunDetailDrawer.tsx index 5eb7b1c24..82ccfabde 100644 --- a/ui/src/components/workflow/WorkflowRunDetailDrawer.tsx +++ b/ui/src/components/workflow/WorkflowRunDetailDrawer.tsx @@ -7,13 +7,13 @@ import { useTriggerElement } from "@/hooks"; import WorkflowRunDetail from "./WorkflowRunDetail"; -export type WorkflowRunDetailDrawerProps = { +export interface WorkflowRunDetailDrawerProps { data?: WorkflowRunModel; loading?: boolean; open?: boolean; trigger?: React.ReactNode; onOpenChange?: (open: boolean) => void; -}; +} const WorkflowRunDetailDrawer = ({ data, loading, trigger, ...props }: WorkflowRunDetailDrawerProps) => { const [open, setOpen] = useControllableValue(props, { diff --git a/ui/src/components/workflow/WorkflowRuns.tsx b/ui/src/components/workflow/WorkflowRuns.tsx index 72ae58383..82792ab1d 100644 --- a/ui/src/components/workflow/WorkflowRuns.tsx +++ b/ui/src/components/workflow/WorkflowRuns.tsx @@ -20,11 +20,11 @@ import { import { getErrMsg } from "@/utils/error"; import WorkflowRunDetailDrawer from "./WorkflowRunDetailDrawer"; -export type WorkflowRunsProps = { +export interface WorkflowRunsProps { className?: string; style?: React.CSSProperties; workflowId: string; -}; +} const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => { const { t } = useTranslation(); diff --git a/ui/src/components/workflow/WorkflowStatusIcon.tsx b/ui/src/components/workflow/WorkflowStatusIcon.tsx index 4ab965e5d..04d4d2d38 100644 --- a/ui/src/components/workflow/WorkflowStatusIcon.tsx +++ b/ui/src/components/workflow/WorkflowStatusIcon.tsx @@ -4,13 +4,13 @@ import { theme } from "antd"; import { WORKFLOW_RUN_STATUSES } from "@/domain/workflowRun"; import { mergeCls } from "@/utils/css"; -export type WorkflowStatusIconProps = { +export interface WorkflowStatusIconProps { className?: string; style?: React.CSSProperties; color?: string | true; size?: number | string; status: string; -}; +} const WorkflowStatusIcon = ({ className, style, color, status, ...props }: WorkflowStatusIconProps) => { const { size = "1em" } = props; diff --git a/ui/src/components/workflow/WorkflowStatusTag.tsx b/ui/src/components/workflow/WorkflowStatusTag.tsx index 13129d42f..e80a434f8 100644 --- a/ui/src/components/workflow/WorkflowStatusTag.tsx +++ b/ui/src/components/workflow/WorkflowStatusTag.tsx @@ -5,11 +5,11 @@ import { WORKFLOW_RUN_STATUSES } from "@/domain/workflowRun"; import WorkflowStatusIcon from "./WorkflowStatusIcon"; -export type WorkflowStatusTagProps = { +export interface WorkflowStatusTagProps { className?: string; style?: React.CSSProperties; status: string; -}; +} const WorkflowStatusTag = ({ className, style, status }: WorkflowStatusTagProps) => { const { t } = useTranslation(); diff --git a/ui/src/components/workflow/node/AddNode.tsx b/ui/src/components/workflow/node/AddNode.tsx index c9fe64968..8de5dc35b 100644 --- a/ui/src/components/workflow/node/AddNode.tsx +++ b/ui/src/components/workflow/node/AddNode.tsx @@ -9,7 +9,7 @@ import { useWorkflowStore } from "@/stores/workflow"; import { type SharedNodeProps } from "./_SharedNode"; -export type AddNodeProps = SharedNodeProps; +export interface AddNodeProps extends SharedNodeProps {} const AddNode = ({ node, disabled }: AddNodeProps) => { const { t } = useTranslation(); diff --git a/ui/src/components/workflow/node/ApplyNode.tsx b/ui/src/components/workflow/node/ApplyNode.tsx index ca5664474..b8d3d3204 100644 --- a/ui/src/components/workflow/node/ApplyNode.tsx +++ b/ui/src/components/workflow/node/ApplyNode.tsx @@ -11,7 +11,7 @@ import { useWorkflowStore } from "@/stores/workflow"; import SharedNode, { type SharedNodeProps } from "./_SharedNode"; import ApplyNodeConfigForm, { type ApplyNodeConfigFormInstance } from "./ApplyNodeConfigForm"; -export type ApplyNodeProps = SharedNodeProps; +export interface ApplyNodeProps extends SharedNodeProps {} const ApplyNode = ({ node, disabled }: ApplyNodeProps) => { if (node.type !== WorkflowNodeType.Apply) { diff --git a/ui/src/components/workflow/node/ApplyNodeConfigForm.tsx b/ui/src/components/workflow/node/ApplyNodeConfigForm.tsx index 641bb47f8..d2b2b534e 100644 --- a/ui/src/components/workflow/node/ApplyNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/ApplyNodeConfigForm.tsx @@ -28,19 +28,19 @@ import ApplyNodeConfigFormTencentCloudEOConfig from "./ApplyNodeConfigFormTencen type ApplyNodeConfigFormFieldValues = Partial; -export type ApplyNodeConfigFormProps = { +export interface ApplyNodeConfigFormProps { className?: string; style?: React.CSSProperties; disabled?: boolean; initialValues?: ApplyNodeConfigFormFieldValues; onValuesChange?: (values: ApplyNodeConfigFormFieldValues) => void; -}; +} -export type ApplyNodeConfigFormInstance = { +export interface ApplyNodeConfigFormInstance { getFieldsValue: () => ReturnType["getFieldsValue"]>; resetFields: FormInstance["resetFields"]; validateFields: FormInstance["validateFields"]; -}; +} const MULTIPLE_INPUT_SEPARATOR = ";"; @@ -274,7 +274,7 @@ const ApplyNodeConfigForm = forwardRef @@ -333,7 +333,7 @@ const ApplyNodeConfigForm = forwardRef } - usage="both-dns-hosting" + usage="dns" afterSubmit={(record) => { const provider = accessProvidersMap.get(record.provider); if (provider?.usages?.includes(ACCESS_USAGES.DNS)) { @@ -415,7 +415,7 @@ const ApplyNodeConfigForm = forwardRef } - usage="ca-only" + usage="ca" afterSubmit={(record) => { const provider = accessProvidersMap.get(record.provider); if (provider?.usages?.includes(ACCESS_USAGES.CA)) { @@ -483,7 +483,7 @@ const ApplyNodeConfigForm = forwardRef diff --git a/ui/src/components/workflow/node/ApplyNodeConfigFormAWSRoute53Config.tsx b/ui/src/components/workflow/node/ApplyNodeConfigFormAWSRoute53Config.tsx index 1f0bfef23..0725e7ad2 100644 --- a/ui/src/components/workflow/node/ApplyNodeConfigFormAWSRoute53Config.tsx +++ b/ui/src/components/workflow/node/ApplyNodeConfigFormAWSRoute53Config.tsx @@ -8,13 +8,13 @@ type ApplyNodeConfigFormAWSRoute53ConfigFieldValues = Nullish<{ hostedZoneId: string; }>; -export type ApplyNodeConfigFormAWSRoute53ConfigProps = { +export interface ApplyNodeConfigFormAWSRoute53ConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: ApplyNodeConfigFormAWSRoute53ConfigFieldValues; onValuesChange?: (values: ApplyNodeConfigFormAWSRoute53ConfigFieldValues) => void; -}; +} const initFormModel = (): ApplyNodeConfigFormAWSRoute53ConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/ApplyNodeConfigFormAliyunESAConfig.tsx b/ui/src/components/workflow/node/ApplyNodeConfigFormAliyunESAConfig.tsx index 9eae56670..fdd537c0b 100644 --- a/ui/src/components/workflow/node/ApplyNodeConfigFormAliyunESAConfig.tsx +++ b/ui/src/components/workflow/node/ApplyNodeConfigFormAliyunESAConfig.tsx @@ -7,13 +7,13 @@ type ApplyNodeConfigFormAliyunESAConfigFieldValues = Nullish<{ region: string; }>; -export type ApplyNodeConfigFormAliyunESAConfigProps = { +export interface ApplyNodeConfigFormAliyunESAConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: ApplyNodeConfigFormAliyunESAConfigFieldValues; onValuesChange?: (values: ApplyNodeConfigFormAliyunESAConfigFieldValues) => void; -}; +} const initFormModel = (): ApplyNodeConfigFormAliyunESAConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/ApplyNodeConfigFormHuaweiCloudDNSConfig.tsx b/ui/src/components/workflow/node/ApplyNodeConfigFormHuaweiCloudDNSConfig.tsx index 896d1d61e..772fea9c1 100644 --- a/ui/src/components/workflow/node/ApplyNodeConfigFormHuaweiCloudDNSConfig.tsx +++ b/ui/src/components/workflow/node/ApplyNodeConfigFormHuaweiCloudDNSConfig.tsx @@ -7,13 +7,13 @@ type ApplyNodeConfigFormHuaweiCloudDNSConfigFieldValues = Nullish<{ region: string; }>; -export type ApplyNodeConfigFormHuaweiCloudDNSConfigProps = { +export interface ApplyNodeConfigFormHuaweiCloudDNSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: ApplyNodeConfigFormHuaweiCloudDNSConfigFieldValues; onValuesChange?: (values: ApplyNodeConfigFormHuaweiCloudDNSConfigFieldValues) => void; -}; +} const initFormModel = (): ApplyNodeConfigFormHuaweiCloudDNSConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/ApplyNodeConfigFormJDCloudDNSConfig.tsx b/ui/src/components/workflow/node/ApplyNodeConfigFormJDCloudDNSConfig.tsx index 1a8e9b04f..b90156a96 100644 --- a/ui/src/components/workflow/node/ApplyNodeConfigFormJDCloudDNSConfig.tsx +++ b/ui/src/components/workflow/node/ApplyNodeConfigFormJDCloudDNSConfig.tsx @@ -7,13 +7,13 @@ type ApplyNodeConfigFormJDCloudDNSConfigFieldValues = Nullish<{ regionId: string; }>; -export type ApplyNodeConfigFormJDCloudDNSConfigProps = { +export interface ApplyNodeConfigFormJDCloudDNSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: ApplyNodeConfigFormJDCloudDNSConfigFieldValues; onValuesChange?: (values: ApplyNodeConfigFormJDCloudDNSConfigFieldValues) => void; -}; +} const initFormModel = (): ApplyNodeConfigFormJDCloudDNSConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/ApplyNodeConfigFormTencentCloudEOConfig.tsx b/ui/src/components/workflow/node/ApplyNodeConfigFormTencentCloudEOConfig.tsx index 918f8db8b..48a73e9cb 100644 --- a/ui/src/components/workflow/node/ApplyNodeConfigFormTencentCloudEOConfig.tsx +++ b/ui/src/components/workflow/node/ApplyNodeConfigFormTencentCloudEOConfig.tsx @@ -7,13 +7,13 @@ type ApplyNodeConfigFormTencentCloudEOConfigFieldValues = Nullish<{ zoneId: string; }>; -export type ApplyNodeConfigFormTencentCloudEOConfigProps = { +export interface ApplyNodeConfigFormTencentCloudEOConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: ApplyNodeConfigFormTencentCloudEOConfigFieldValues; onValuesChange?: (values: ApplyNodeConfigFormTencentCloudEOConfigFieldValues) => void; -}; +} const initFormModel = (): ApplyNodeConfigFormTencentCloudEOConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/BranchNode.tsx b/ui/src/components/workflow/node/BranchNode.tsx index 048fcaa24..a755ea51c 100644 --- a/ui/src/components/workflow/node/BranchNode.tsx +++ b/ui/src/components/workflow/node/BranchNode.tsx @@ -10,7 +10,7 @@ import AddNode from "./AddNode"; import WorkflowElement from "../WorkflowElement"; import { type SharedNodeProps } from "./_SharedNode"; -export type BrandNodeProps = SharedNodeProps; +export interface BrandNodeProps extends SharedNodeProps {} const BranchNode = ({ node, disabled }: BrandNodeProps) => { const { t } = useTranslation(); @@ -55,18 +55,18 @@ const BranchNode = ({ node, disabled }: BrandNodeProps) => { {node.branches?.map((branch, index) => (
{index == 0 && ( <> -
+
)} - {index == node.branches?.length! - 1 && ( + {index == node.branches!.length - 1 && ( <> -
-
+
+
)}
{renderBranch(branch, node.id, index)}
diff --git a/ui/src/components/workflow/node/ConditionNode.tsx b/ui/src/components/workflow/node/ConditionNode.tsx index 7779ae547..594cc95f6 100644 --- a/ui/src/components/workflow/node/ConditionNode.tsx +++ b/ui/src/components/workflow/node/ConditionNode.tsx @@ -10,10 +10,10 @@ import SharedNode, { type SharedNodeProps } from "./_SharedNode"; import AddNode from "./AddNode"; import ConditionNodeConfigForm, { type ConditionNodeConfigFormFieldValues, type ConditionNodeConfigFormInstance } from "./ConditionNodeConfigForm"; -export type ConditionNodeProps = SharedNodeProps & { +export interface ConditionNodeProps extends SharedNodeProps { branchId: string; branchIndex: number; -}; +} const ConditionNode = ({ node, disabled, branchId, branchIndex }: ConditionNodeProps) => { const { updateNode } = useWorkflowStore(useZustandShallowSelector(["updateNode"])); diff --git a/ui/src/components/workflow/node/ConditionNodeConfigForm.tsx b/ui/src/components/workflow/node/ConditionNodeConfigForm.tsx index 1a2794e78..81656de2f 100644 --- a/ui/src/components/workflow/node/ConditionNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/ConditionNodeConfigForm.tsx @@ -9,24 +9,24 @@ import { useAntdForm } from "@/hooks"; import ConditionNodeConfigFormExpressionEditor, { type ConditionNodeConfigFormExpressionEditorInstance } from "./ConditionNodeConfigFormExpressionEditor"; -export type ConditionNodeConfigFormFieldValues = { +export interface ConditionNodeConfigFormFieldValues { expression?: Expr | undefined; -}; +} -export type ConditionNodeConfigFormProps = { +export interface ConditionNodeConfigFormProps { className?: string; style?: React.CSSProperties; disabled?: boolean; initialValues?: Partial; nodeId: string; onValuesChange?: (values: WorkflowNodeConfigForCondition) => void; -}; +} -export type ConditionNodeConfigFormInstance = { +export interface ConditionNodeConfigFormInstance { getFieldsValue: () => ReturnType["getFieldsValue"]>; resetFields: FormInstance["resetFields"]; validateFields: FormInstance["validateFields"]; -}; +} const initFormModel = (): ConditionNodeConfigFormFieldValues => { return defaultNodeConfigForCondition(); diff --git a/ui/src/components/workflow/node/ConditionNodeConfigFormExpressionEditor.tsx b/ui/src/components/workflow/node/ConditionNodeConfigFormExpressionEditor.tsx index 2a8075a1e..6f853ad17 100644 --- a/ui/src/components/workflow/node/ConditionNodeConfigFormExpressionEditor.tsx +++ b/ui/src/components/workflow/node/ConditionNodeConfigFormExpressionEditor.tsx @@ -10,7 +10,7 @@ import { ExprType } from "@/domain/workflow"; import { useAntdFormName, useZustandShallowSelector } from "@/hooks"; import { useWorkflowStore } from "@/stores/workflow"; -export type ConditionNodeConfigFormExpressionEditorProps = { +export interface ConditionNodeConfigFormExpressionEditorProps { className?: string; style?: React.CSSProperties; defaultValue?: Expr; @@ -18,11 +18,11 @@ export type ConditionNodeConfigFormExpressionEditorProps = { nodeId: string; value?: Expr; onChange?: (value: Expr) => void; -}; +} -export type ConditionNodeConfigFormExpressionEditorInstance = { +export interface ConditionNodeConfigFormExpressionEditorInstance { validate: () => Promise; -}; +} // 表单内部使用的扁平结构 type ConditionItem = { diff --git a/ui/src/components/workflow/node/DeployNode.tsx b/ui/src/components/workflow/node/DeployNode.tsx index f495c0401..2e374d872 100644 --- a/ui/src/components/workflow/node/DeployNode.tsx +++ b/ui/src/components/workflow/node/DeployNode.tsx @@ -11,7 +11,7 @@ import { useWorkflowStore } from "@/stores/workflow"; import SharedNode, { type SharedNodeProps } from "./_SharedNode"; import DeployNodeConfigForm, { type DeployNodeConfigFormInstance } from "./DeployNodeConfigForm"; -export type DeployNodeProps = SharedNodeProps; +export interface DeployNodeProps extends SharedNodeProps {} const DeployNode = ({ node, disabled }: DeployNodeProps) => { if (node.type !== WorkflowNodeType.Deploy) { diff --git a/ui/src/components/workflow/node/DeployNodeConfigForm.tsx b/ui/src/components/workflow/node/DeployNodeConfigForm.tsx index 00212971d..736b4b363 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigForm.tsx @@ -111,20 +111,20 @@ import DeployNodeConfigFormWebhookConfig from "./DeployNodeConfigFormWebhookConf type DeployNodeConfigFormFieldValues = Partial; -export type DeployNodeConfigFormProps = { +export interface DeployNodeConfigFormProps { className?: string; style?: React.CSSProperties; disabled?: boolean; initialValues?: DeployNodeConfigFormFieldValues; nodeId: string; onValuesChange?: (values: DeployNodeConfigFormFieldValues) => void; -}; +} -export type DeployNodeConfigFormInstance = { +export interface DeployNodeConfigFormInstance { getFieldsValue: () => ReturnType["getFieldsValue"]>; resetFields: FormInstance["resetFields"]; validateFields: FormInstance["validateFields"]; -}; +} const initFormModel = (): DeployNodeConfigFormFieldValues => { return defaultNodeConfigForDeploy(); @@ -496,7 +496,7 @@ const DeployNodeConfigForm = forwardRef } - usage="both-dns-hosting" + usage="hosting" afterSubmit={(record) => { const provider = accessProvidersMap.get(record.provider); if (provider?.usages?.includes(ACCESS_USAGES.HOSTING)) { diff --git a/ui/src/components/workflow/node/DeployNodeConfigForm1PanelConsoleConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigForm1PanelConsoleConfig.tsx index b17150d82..07a33b7bc 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigForm1PanelConsoleConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigForm1PanelConsoleConfig.tsx @@ -7,13 +7,13 @@ type DeployNodeConfigForm1PanelConsoleConfigFieldValues = Nullish<{ autoRestart?: boolean; }>; -export type DeployNodeConfigForm1PanelConsoleConfigProps = { +export interface DeployNodeConfigForm1PanelConsoleConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigForm1PanelConsoleConfigFieldValues; onValuesChange?: (values: DeployNodeConfigForm1PanelConsoleConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigForm1PanelConsoleConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigForm1PanelSiteConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigForm1PanelSiteConfig.tsx index 6e14fae4d..912ba4407 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigForm1PanelSiteConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigForm1PanelSiteConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigForm1PanelSiteConfigFieldValues = Nullish<{ certificateId?: string | number; }>; -export type DeployNodeConfigForm1PanelSiteConfigProps = { +export interface DeployNodeConfigForm1PanelSiteConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigForm1PanelSiteConfigFieldValues; onValuesChange?: (values: DeployNodeConfigForm1PanelSiteConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_WEBSITE = "website" as const; const RESOURCE_TYPE_CERTIFICATE = "certificate" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAPISIXConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAPISIXConfig.tsx index 2bc4cf063..f6ffeaa54 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAPISIXConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAPISIXConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormAPISIXConfigFieldValues = Nullish<{ certificateId?: string; }>; -export type DeployNodeConfigFormAPISIXConfigProps = { +export interface DeployNodeConfigFormAPISIXConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAPISIXConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAPISIXConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_CERTIFICATE = "certificate" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAWSACMConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAWSACMConfig.tsx index e797d9c0c..1a380d423 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAWSACMConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAWSACMConfig.tsx @@ -8,13 +8,13 @@ type DeployNodeConfigFormAWSACMConfigFieldValues = Nullish<{ certificateArn?: string; }>; -export type DeployNodeConfigFormAWSACMConfigProps = { +export interface DeployNodeConfigFormAWSACMConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAWSACMConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAWSACMConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAWSACMConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAWSCloudFrontConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAWSCloudFrontConfig.tsx index 3a15eea06..a729112a7 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAWSCloudFrontConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAWSCloudFrontConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormAWSCloudFrontConfigFieldValues = Nullish<{ certificateSource: string; }>; -export type DeployNodeConfigFormAWSCloudFrontConfigProps = { +export interface DeployNodeConfigFormAWSCloudFrontConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAWSCloudFrontConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAWSCloudFrontConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAWSCloudFrontConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAWSIAMConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAWSIAMConfig.tsx index 40b3da744..4e4a6dfc4 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAWSIAMConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAWSIAMConfig.tsx @@ -8,13 +8,13 @@ type DeployNodeConfigFormAWSIAMConfigFieldValues = Nullish<{ certificatePath?: string; }>; -export type DeployNodeConfigFormAWSIAMConfigProps = { +export interface DeployNodeConfigFormAWSIAMConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAWSIAMConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAWSIAMConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAWSIAMConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunALBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunALBConfig.tsx index 05451a98a..a2ac4cb26 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunALBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunALBConfig.tsx @@ -14,13 +14,13 @@ type DeployNodeConfigFormAliyunALBConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormAliyunALBConfigProps = { +export interface DeployNodeConfigFormAliyunALBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunALBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunALBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunAPIGWConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunAPIGWConfig.tsx index eda9be9d7..f4710aef3 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunAPIGWConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunAPIGWConfig.tsx @@ -14,13 +14,13 @@ type DeployNodeConfigFormAliyunAPIGWConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormAliyunAPIGWConfigProps = { +export interface DeployNodeConfigFormAliyunAPIGWConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunAPIGWConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunAPIGWConfigFieldValues) => void; -}; +} const SERVICE_TYPE_CLOUDNATIVE = "cloudnative" as const; const SERVICE_TYPE_TRADITIONAL = "traditional" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCASConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCASConfig.tsx index b0aad46d2..bd310884f 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCASConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCASConfig.tsx @@ -7,13 +7,13 @@ type DeployNodeConfigFormAliyunCASConfigFieldValues = Nullish<{ region: string; }>; -export type DeployNodeConfigFormAliyunCASConfigProps = { +export interface DeployNodeConfigFormAliyunCASConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunCASConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunCASConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAliyunCASConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCASDeployConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCASDeployConfig.tsx index 572ccad12..3e24e9d3e 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCASDeployConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCASDeployConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormAliyunCASDeployConfigFieldValues = Nullish<{ contactIds?: string; }>; -export type DeployNodeConfigFormAliyunCASDeployConfigProps = { +export interface DeployNodeConfigFormAliyunCASDeployConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunCASDeployConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunCASDeployConfigFieldValues) => void; -}; +} const MULTIPLE_INPUT_SEPARATOR = ";"; @@ -92,7 +92,7 @@ const DeployNodeConfigFormAliyunCASDeployConfig = ({ modalTitle={t("workflow_node.deploy.form.aliyun_cas_deploy_resource_ids.multiple_input_modal.title")} placeholder={t("workflow_node.deploy.form.aliyun_cas_deploy_resource_ids.placeholder")} placeholderInModal={t("workflow_node.deploy.form.aliyun_cas_deploy_resource_ids.multiple_input_modal.placeholder")} - splitOptions={{ trim: true, removeEmpty: true }} + splitOptions={{ removeEmpty: true, trimSpace: true }} /> @@ -106,7 +106,7 @@ const DeployNodeConfigFormAliyunCASDeployConfig = ({ modalTitle={t("workflow_node.deploy.form.aliyun_cas_deploy_contact_ids.multiple_input_modal.title")} placeholder={t("workflow_node.deploy.form.aliyun_cas_deploy_contact_ids.placeholder")} placeholderInModal={t("workflow_node.deploy.form.aliyun_cas_deploy_contact_ids.multiple_input_modal.placeholder")} - splitOptions={{ trim: true, removeEmpty: true }} + splitOptions={{ removeEmpty: true, trimSpace: true }} /> diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCDNConfig.tsx index 762171b42..831292541 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormAliyunCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormAliyunCDNConfigProps = { +export interface DeployNodeConfigFormAliyunCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAliyunCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCLBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCLBConfig.tsx index 3884cb08e..dcbe17aee 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCLBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunCLBConfig.tsx @@ -14,13 +14,13 @@ type DeployNodeConfigFormAliyunCLBConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormAliyunCLBConfigProps = { +export interface DeployNodeConfigFormAliyunCLBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunCLBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunCLBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunDCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunDCDNConfig.tsx index d2cd03f2e..4b1b614b4 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunDCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunDCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormAliyunDCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormAliyunDCDNConfigProps = { +export interface DeployNodeConfigFormAliyunDCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunDCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunDCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAliyunDCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunDDoSConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunDDoSConfig.tsx index 15b489700..6f442e377 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunDDoSConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunDDoSConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormAliyunDDoSConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormAliyunDDoSConfigProps = { +export interface DeployNodeConfigFormAliyunDDoSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunDDoSConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunDDoSConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAliyunDDoSConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunESAConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunESAConfig.tsx index c5ac207b0..8758823fb 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunESAConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunESAConfig.tsx @@ -8,13 +8,13 @@ type DeployNodeConfigFormAliyunESAConfigFieldValues = Nullish<{ siteId: string | number; }>; -export type DeployNodeConfigFormAliyunESAConfigProps = { +export interface DeployNodeConfigFormAliyunESAConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunESAConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunESAConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAliyunESAConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunFCConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunFCConfig.tsx index 39c974e53..3302b8461 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunFCConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunFCConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormAliyunFCConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormAliyunFCConfigProps = { +export interface DeployNodeConfigFormAliyunFCConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunFCConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunFCConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAliyunFCConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunGAConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunGAConfig.tsx index 1d7ed1bd9..64aefb6d0 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunGAConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunGAConfig.tsx @@ -13,13 +13,13 @@ type DeployNodeConfigFormAliyunGAConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormAliyunGAConfigProps = { +export interface DeployNodeConfigFormAliyunGAConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunGAConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunGAConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_ACCELERATOR = "accelerator" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunLiveConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunLiveConfig.tsx index c7c2d557f..d45c86246 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunLiveConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunLiveConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormAliyunLiveConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormAliyunLiveConfigProps = { +export interface DeployNodeConfigFormAliyunLiveConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunLiveConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunLiveConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAliyunLiveConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunNLBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunNLBConfig.tsx index eddead443..7a6e9a024 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunNLBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunNLBConfig.tsx @@ -12,13 +12,13 @@ type DeployNodeConfigFormAliyunNLBConfigFieldValues = Nullish<{ listenerId?: string; }>; -export type DeployNodeConfigFormAliyunNLBConfigProps = { +export interface DeployNodeConfigFormAliyunNLBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunNLBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunNLBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunOSSConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunOSSConfig.tsx index 408f3375b..b6265cec4 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunOSSConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunOSSConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormAliyunOSSConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormAliyunOSSConfigProps = { +export interface DeployNodeConfigFormAliyunOSSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunOSSConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunOSSConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAliyunOSSConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunVODConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunVODConfig.tsx index 61ad0d1b0..14a3f4977 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunVODConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunVODConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormAliyunVODConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormAliyunVODConfigProps = { +export interface DeployNodeConfigFormAliyunVODConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunVODConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunVODConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAliyunVODConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunWAFConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunWAFConfig.tsx index 6668aefba..5a64698b0 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAliyunWAFConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAliyunWAFConfig.tsx @@ -12,13 +12,13 @@ type DeployNodeConfigFormAliyunWAFConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormAliyunWAFConfigProps = { +export interface DeployNodeConfigFormAliyunWAFConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAliyunWAFConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAliyunWAFConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAliyunWAFConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormAzureKeyVaultConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormAzureKeyVaultConfig.tsx index 86e110494..4944604fe 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormAzureKeyVaultConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormAzureKeyVaultConfig.tsx @@ -8,13 +8,13 @@ type DeployNodeConfigFormAzureKeyVaultConfigFieldValues = Nullish<{ certificateName?: string; }>; -export type DeployNodeConfigFormAzureKeyVaultConfigProps = { +export interface DeployNodeConfigFormAzureKeyVaultConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormAzureKeyVaultConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormAzureKeyVaultConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormAzureKeyVaultConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudAppBLBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudAppBLBConfig.tsx index 269dc3808..300f9c3b3 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudAppBLBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudAppBLBConfig.tsx @@ -14,13 +14,13 @@ type DeployNodeConfigFormBaiduCloudAppBLBConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormBaiduCloudAppBLBConfigProps = { +export interface DeployNodeConfigFormBaiduCloudAppBLBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormBaiduCloudAppBLBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormBaiduCloudAppBLBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudBLBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudBLBConfig.tsx index 44078b1cb..78b1fc75b 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudBLBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudBLBConfig.tsx @@ -14,13 +14,13 @@ type DeployNodeConfigFormBaiduCloudBLBConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormBaiduCloudBLBConfigProps = { +export interface DeployNodeConfigFormBaiduCloudBLBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormBaiduCloudBLBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormBaiduCloudBLBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudCDNConfig.tsx index 60fa9c62a..30fdff78b 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormBaiduCloudCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormBaiduCloudCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormBaiduCloudCDNConfigProps = { +export interface DeployNodeConfigFormBaiduCloudCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormBaiduCloudCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormBaiduCloudCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormBaiduCloudCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormBaishanCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormBaishanCDNConfig.tsx index 8186504bc..a7c7c5935 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormBaishanCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormBaishanCDNConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormBaishanCDNConfigFieldValues = Nullish<{ certificateId?: string | number; }>; -export type DeployNodeConfigFormBaishanCDNConfigProps = { +export interface DeployNodeConfigFormBaishanCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormBaishanCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormBaishanCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormBaishanCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormBaotaPanelConsoleConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormBaotaPanelConsoleConfig.tsx index ca440a27b..42be5ebe8 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormBaotaPanelConsoleConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormBaotaPanelConsoleConfig.tsx @@ -7,13 +7,13 @@ type DeployNodeConfigFormBaotaPanelConsoleConfigFieldValues = Nullish<{ autoRestart?: boolean; }>; -export type DeployNodeConfigFormBaotaPanelConsoleConfigProps = { +export interface DeployNodeConfigFormBaotaPanelConsoleConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormBaotaPanelConsoleConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormBaotaPanelConsoleConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormBaotaPanelConsoleConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormBaotaPanelSiteConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormBaotaPanelSiteConfig.tsx index 71c2f1278..edb33e893 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormBaotaPanelSiteConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormBaotaPanelSiteConfig.tsx @@ -12,13 +12,13 @@ type DeployNodeConfigFormBaotaPanelSiteConfigFieldValues = Nullish<{ siteNames?: string; }>; -export type DeployNodeConfigFormBaotaPanelSiteConfigProps = { +export interface DeployNodeConfigFormBaotaPanelSiteConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormBaotaPanelSiteConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormBaotaPanelSiteConfigFieldValues) => void; -}; +} const SITE_TYPE_PHP = "php"; const SITE_TYPE_OTHER = "other"; @@ -112,7 +112,7 @@ const DeployNodeConfigFormBaotaPanelSiteConfig = ({ modalTitle={t("workflow_node.deploy.form.baotapanel_site_names.multiple_input_modal.title")} placeholder={t("workflow_node.deploy.form.baotapanel_site_names.placeholder")} placeholderInModal={t("workflow_node.deploy.form.baotapanel_site_names.multiple_input_modal.placeholder")} - splitOptions={{ trim: true, removeEmpty: true }} + splitOptions={{ removeEmpty: true, trimSpace: true }} /> diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormBaotaWAFSiteConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormBaotaWAFSiteConfig.tsx index 3224451d3..e06b43ba4 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormBaotaWAFSiteConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormBaotaWAFSiteConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormBaotaWAFSiteConfigFieldValues = Nullish<{ sitePort: number; }>; -export type DeployNodeConfigFormBaotaWAFSiteConfigProps = { +export interface DeployNodeConfigFormBaotaWAFSiteConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormBaotaWAFSiteConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormBaotaWAFSiteConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormBaotaWAFSiteConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormBunnyCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormBunnyCDNConfig.tsx index 23658a2a0..81a0b8ecf 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormBunnyCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormBunnyCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormBunnyCDNConfigFieldValues = Nullish<{ hostname: string; }>; -export type DeployNodeConfigFormBunnyCDNConfigProps = { +export interface DeployNodeConfigFormBunnyCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormBunnyCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormBunnyCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormBunnyCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormBytePlusCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormBytePlusCDNConfig.tsx index 4690523b3..b2a1fa762 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormBytePlusCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormBytePlusCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormBytePlusCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormBytePlusCDNConfigProps = { +export interface DeployNodeConfigFormBytePlusCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormBytePlusCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormBytePlusCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormBytePlusCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudAOConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudAOConfig.tsx index 707452ed3..d37e81f83 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudAOConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudAOConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormCTCCCloudAOConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormCTCCCloudAOConfigProps = { +export interface DeployNodeConfigFormCTCCCloudAOConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormCTCCCloudAOConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormCTCCCloudAOConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormCTCCCloudAOConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudCDNConfig.tsx index 858d966a3..e076453ac 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormCTCCCloudCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormCTCCCloudCDNConfigProps = { +export interface DeployNodeConfigFormCTCCCloudCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormCTCCCloudCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormCTCCCloudCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormCTCCCloudCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudELBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudELBConfig.tsx index a9637f9d5..0c0e65d0e 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudELBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudELBConfig.tsx @@ -12,13 +12,13 @@ type DeployNodeConfigFormCTCCCloudELBConfigFieldValues = Nullish<{ listenerId?: string; }>; -export type DeployNodeConfigFormCTCCCloudELBConfigProps = { +export interface DeployNodeConfigFormCTCCCloudELBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormCTCCCloudELBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormCTCCCloudELBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudICDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudICDNConfig.tsx index f559b4412..28a8dbbf9 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudICDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudICDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormCTCCCloudICDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormCTCCCloudICDNConfigProps = { +export interface DeployNodeConfigFormCTCCCloudICDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormCTCCCloudICDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormCTCCCloudICDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormCTCCCloudICDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudLVDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudLVDNConfig.tsx index ae84f5625..efc918cb8 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudLVDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormCTCCCloudLVDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormCTCCCloudLVDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormCTCCCloudLVDNConfigProps = { +export interface DeployNodeConfigFormCTCCCloudLVDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormCTCCCloudLVDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormCTCCCloudLVDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormCTCCCloudLVDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormCdnflyConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormCdnflyConfig.tsx index 03e4c66c6..8b322d260 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormCdnflyConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormCdnflyConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormCdnflyConfigFieldValues = Nullish<{ certificateId?: string | number; }>; -export type DeployNodeConfigFormCdnflyConfigProps = { +export interface DeployNodeConfigFormCdnflyConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormCdnflyConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormCdnflyConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_SITE = "site" as const; const RESOURCE_TYPE_CERTIFICATE = "certificate" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormDogeCloudCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormDogeCloudCDNConfig.tsx index 9859f51fb..8b59503c6 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormDogeCloudCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormDogeCloudCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormDogeCloudCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormDogeCloudCDNConfigProps = { +export interface DeployNodeConfigFormDogeCloudCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormDogeCloudCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormDogeCloudCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormDogeCloudCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormEdgioApplicationsConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormEdgioApplicationsConfig.tsx index 131db0f74..1f6a49d16 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormEdgioApplicationsConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormEdgioApplicationsConfig.tsx @@ -7,13 +7,13 @@ type DeployNodeConfigFormEdgioApplicationsConfigFieldValues = Nullish<{ environmentId: string; }>; -export type DeployNodeConfigFormEdgioApplicationsConfigProps = { +export interface DeployNodeConfigFormEdgioApplicationsConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormEdgioApplicationsConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormEdgioApplicationsConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormEdgioApplicationsConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormFlexCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormFlexCDNConfig.tsx index 76d42fe41..a61b34df3 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormFlexCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormFlexCDNConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormFlexCDNConfigFieldValues = Nullish<{ certificateId?: string | number; }>; -export type DeployNodeConfigFormFlexCDNConfigProps = { +export interface DeployNodeConfigFormFlexCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormFlexCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormFlexCDNConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_CERTIFICATE = "certificate" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormGcoreCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormGcoreCDNConfig.tsx index 0a8c372a9..896424f6b 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormGcoreCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormGcoreCDNConfig.tsx @@ -8,13 +8,13 @@ type DeployNodeConfigFormGcoreCDNConfigFieldValues = Nullish<{ certificateId?: string | number; }>; -export type DeployNodeConfigFormGcoreCDNConfigProps = { +export interface DeployNodeConfigFormGcoreCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormGcoreCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormGcoreCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormGcoreCDNConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormGoEdgeConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormGoEdgeConfig.tsx index a5263149d..28603844a 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormGoEdgeConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormGoEdgeConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormGoEdgeConfigFieldValues = Nullish<{ certificateId?: string | number; }>; -export type DeployNodeConfigFormGoEdgeConfigProps = { +export interface DeployNodeConfigFormGoEdgeConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormGoEdgeConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormGoEdgeConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_CERTIFICATE = "certificate" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudCDNConfig.tsx index ec6658f2c..460a5e817 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudCDNConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormHuaweiCloudCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormHuaweiCloudCDNConfigProps = { +export interface DeployNodeConfigFormHuaweiCloudCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormHuaweiCloudCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormHuaweiCloudCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormHuaweiCloudCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudELBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudELBConfig.tsx index 11e4fdecf..b3d023566 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudELBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudELBConfig.tsx @@ -13,13 +13,13 @@ type DeployNodeConfigFormHuaweiCloudELBConfigFieldValues = Nullish<{ listenerId?: string; }>; -export type DeployNodeConfigFormHuaweiCloudELBConfigProps = { +export interface DeployNodeConfigFormHuaweiCloudELBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormHuaweiCloudELBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormHuaweiCloudELBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_CERTIFICATE = "certificate" as const; const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudWAFConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudWAFConfig.tsx index 59dcb1565..ebfe00776 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudWAFConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormHuaweiCloudWAFConfig.tsx @@ -14,13 +14,13 @@ type DeployNodeConfigFormHuaweiCloudWAFConfigFieldValues = Nullish<{ listenerId?: string; }>; -export type DeployNodeConfigFormHuaweiCloudWAFConfigProps = { +export interface DeployNodeConfigFormHuaweiCloudWAFConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormHuaweiCloudWAFConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormHuaweiCloudWAFConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_CERTIFICATE = "certificate" as const; const RESOURCE_TYPE_CLOUDSERVER = "cloudserver" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudALBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudALBConfig.tsx index 2c1c1fce0..5b9127c1b 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudALBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudALBConfig.tsx @@ -14,13 +14,13 @@ type DeployNodeConfigFormJDCloudALBConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormJDCloudALBConfigProps = { +export interface DeployNodeConfigFormJDCloudALBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormJDCloudALBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormJDCloudALBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudCDNConfig.tsx index 021276f19..f35202e6b 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormJDCloudCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormJDCloudCDNConfigProps = { +export interface DeployNodeConfigFormJDCloudCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormJDCloudCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormJDCloudCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormJDCloudCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudLiveConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudLiveConfig.tsx index 98391f3d6..c1e064144 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudLiveConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudLiveConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormJDCloudLiveConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormJDCloudLiveConfigProps = { +export interface DeployNodeConfigFormJDCloudLiveConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormJDCloudLiveConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormJDCloudLiveConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormJDCloudLiveConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudVODConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudVODConfig.tsx index 9226a9450..4c48ed521 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudVODConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormJDCloudVODConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormJDCloudVODConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormJDCloudVODConfigProps = { +export interface DeployNodeConfigFormJDCloudVODConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormJDCloudVODConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormJDCloudVODConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormJDCloudVODConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormKongConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormKongConfig.tsx index 166fc9bac..3f131e148 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormKongConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormKongConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormKongConfigFieldValues = Nullish<{ certificateId?: string; }>; -export type DeployNodeConfigFormKongConfigProps = { +export interface DeployNodeConfigFormKongConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormKongConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormKongConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_CERTIFICATE = "certificate" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormKubernetesSecretConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormKubernetesSecretConfig.tsx index d43b6253d..add0e32fc 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormKubernetesSecretConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormKubernetesSecretConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormKubernetesSecretConfigFieldValues = Nullish<{ secretDataKeyForKey: string; }>; -export type DeployNodeConfigFormKubernetesSecretConfigProps = { +export interface DeployNodeConfigFormKubernetesSecretConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormKubernetesSecretConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormKubernetesSecretConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormKubernetesSecretConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormLeCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormLeCDNConfig.tsx index 9ee38d1d0..7da4e7e65 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormLeCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormLeCDNConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormLeCDNConfigFieldValues = Nullish<{ clientId?: string | number; }>; -export type DeployNodeConfigFormLeCDNConfigProps = { +export interface DeployNodeConfigFormLeCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormLeCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormLeCDNConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_CERTIFICATE = "certificate" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormLocalConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormLocalConfig.tsx index c490418dc..4d8b17f76 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormLocalConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormLocalConfig.tsx @@ -23,13 +23,13 @@ type DeployNodeConfigFormLocalConfigFieldValues = Nullish<{ postCommand?: string; }>; -export type DeployNodeConfigFormLocalConfigProps = { +export interface DeployNodeConfigFormLocalConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormLocalConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormLocalConfigFieldValues) => void; -}; +} const FORMAT_PEM = CERTIFICATE_FORMATS.PEM; const FORMAT_PFX = CERTIFICATE_FORMATS.PFX; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormNetlifySiteConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormNetlifySiteConfig.tsx index ffa38fae1..6d862d03a 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormNetlifySiteConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormNetlifySiteConfig.tsx @@ -7,13 +7,13 @@ type DeployNodeConfigFormNetlifySiteConfigFieldValues = Nullish<{ siteId: string; }>; -export type DeployNodeConfigFormNetlifySiteConfigProps = { +export interface DeployNodeConfigFormNetlifySiteConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormNetlifySiteConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormNetlifySiteConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormNetlifySiteConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormProxmoxVEConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormProxmoxVEConfig.tsx index e66e58cc1..6153dc106 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormProxmoxVEConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormProxmoxVEConfig.tsx @@ -8,13 +8,13 @@ type DeployNodeConfigFormProxmoxVEConfigFieldValues = Nullish<{ autoRestart?: boolean; }>; -export type DeployNodeConfigFormProxmoxVEConfigProps = { +export interface DeployNodeConfigFormProxmoxVEConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormProxmoxVEConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormProxmoxVEConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormProxmoxVEConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormQiniuCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormQiniuCDNConfig.tsx index 7cccf3258..4cd077fd5 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormQiniuCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormQiniuCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormQiniuCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormQiniuCDNConfigProps = { +export interface DeployNodeConfigFormQiniuCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormQiniuCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormQiniuCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormQiniuCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormQiniuKodoConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormQiniuKodoConfig.tsx index ca19a111b..699fabf39 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormQiniuKodoConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormQiniuKodoConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormQiniuKodoConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormQiniuKodoConfigProps = { +export interface DeployNodeConfigFormQiniuKodoConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormQiniuKodoConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormQiniuKodoConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormQiniuKodoConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormQiniuPiliConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormQiniuPiliConfig.tsx index 37b4c415d..b26a2b299 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormQiniuPiliConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormQiniuPiliConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormQiniuPiliConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormQiniuPiliConfigProps = { +export interface DeployNodeConfigFormQiniuPiliConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormQiniuPiliConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormQiniuPiliConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormQiniuPiliConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormRainYunRCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormRainYunRCDNConfig.tsx index 15b3d9369..0a55623c3 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormRainYunRCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormRainYunRCDNConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormRainYunRCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormRainYunRCDNConfigProps = { +export interface DeployNodeConfigFormRainYunRCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormRainYunRCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormRainYunRCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormRainYunRCDNConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormRatPanelSiteConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormRatPanelSiteConfig.tsx index 03f869133..4cf91cc2c 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormRatPanelSiteConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormRatPanelSiteConfig.tsx @@ -7,13 +7,13 @@ type DeployNodeConfigFormRatPanelSiteConfigFieldValues = Nullish<{ siteName: string; }>; -export type DeployNodeConfigFormRatPanelSiteConfigProps = { +export interface DeployNodeConfigFormRatPanelSiteConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormRatPanelSiteConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormRatPanelSiteConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormRatPanelSiteConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormSSHConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormSSHConfig.tsx index 5fae6f9d6..8280a29bf 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormSSHConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormSSHConfig.tsx @@ -25,13 +25,13 @@ type DeployNodeConfigFormSSHConfigFieldValues = Nullish<{ useSCP?: boolean; }>; -export type DeployNodeConfigFormSSHConfigProps = { +export interface DeployNodeConfigFormSSHConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormSSHConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormSSHConfigFieldValues) => void; -}; +} const FORMAT_PEM = CERTIFICATE_FORMATS.PEM; const FORMAT_PFX = CERTIFICATE_FORMATS.PFX; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormSafeLineConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormSafeLineConfig.tsx index 01ff64070..70756560a 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormSafeLineConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormSafeLineConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormSafeLineConfigFieldValues = Nullish<{ certificateId?: string | number; }>; -export type DeployNodeConfigFormSafeLineConfigProps = { +export interface DeployNodeConfigFormSafeLineConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormSafeLineConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormSafeLineConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_CERTIFICATE = "certificate" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCDNConfig.tsx index 9e08f441b..1efd647e0 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCDNConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormTencentCloudCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormTencentCloudCDNConfigProps = { +export interface DeployNodeConfigFormTencentCloudCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormTencentCloudCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCLBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCLBConfig.tsx index 8f6cf9a01..cc9486d83 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCLBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCLBConfig.tsx @@ -15,13 +15,13 @@ type DeployNodeConfigFormTencentCloudCLBConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormTencentCloudCLBConfigProps = { +export interface DeployNodeConfigFormTencentCloudCLBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudCLBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudCLBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCOSConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCOSConfig.tsx index 0db1f7c4a..900c751ff 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCOSConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCOSConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormTencentCloudCOSConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormTencentCloudCOSConfigProps = { +export interface DeployNodeConfigFormTencentCloudCOSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudCOSConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudCOSConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormTencentCloudCOSConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCSSConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCSSConfig.tsx index 76ffe489f..5adcf7cb9 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCSSConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudCSSConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormTencentCloudCSSConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormTencentCloudCSSConfigProps = { +export interface DeployNodeConfigFormTencentCloudCSSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudCSSConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudCSSConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormTencentCloudCSSConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudECDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudECDNConfig.tsx index bf24bacab..779544601 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudECDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudECDNConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormTencentCloudECDNConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormTencentCloudECDNConfigProps = { +export interface DeployNodeConfigFormTencentCloudECDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudECDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudECDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormTencentCloudECDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudEOConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudEOConfig.tsx index 487896249..b9381440e 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudEOConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudEOConfig.tsx @@ -12,13 +12,13 @@ type DeployNodeConfigFormTencentCloudEOConfigFieldValues = Nullish<{ domains: string; }>; -export type DeployNodeConfigFormTencentCloudEOConfigProps = { +export interface DeployNodeConfigFormTencentCloudEOConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudEOConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudEOConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormTencentCloudEOConfigFieldValues => { return {}; @@ -90,7 +90,7 @@ const DeployNodeConfigFormTencentCloudEOConfig = ({ modalTitle={t("workflow_node.deploy.form.tencentcloud_eo_domains.multiple_input_modal.title")} placeholder={t("workflow_node.deploy.form.tencentcloud_eo_domains.placeholder")} placeholderInModal={t("workflow_node.deploy.form.tencentcloud_eo_domains.multiple_input_modal.placeholder")} - splitOptions={{ trim: true, removeEmpty: true }} + splitOptions={{ removeEmpty: true, trimSpace: true }} /> diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudGAAPConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudGAAPConfig.tsx index d7873e065..44360457b 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudGAAPConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudGAAPConfig.tsx @@ -12,13 +12,13 @@ type DeployNodeConfigFormTencentCloudGAAPConfigFieldValues = Nullish<{ listenerId?: string; }>; -export type DeployNodeConfigFormTencentCloudGAAPConfigProps = { +export interface DeployNodeConfigFormTencentCloudGAAPConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudGAAPConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudGAAPConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSCFConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSCFConfig.tsx index 0e2f26317..ff0b60402 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSCFConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSCFConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormTencentCloudSCFConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormTencentCloudSCFConfigProps = { +export interface DeployNodeConfigFormTencentCloudSCFConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudSCFConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudSCFConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormTencentCloudSCFConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLConfig.tsx index 90fe21b38..377734c49 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLConfig.tsx @@ -7,13 +7,13 @@ type DeployNodeConfigFormTencentCloudSSLConfigFieldValues = Nullish<{ endpoint?: string; }>; -export type DeployNodeConfigFormTencentCloudSSLConfigProps = { +export interface DeployNodeConfigFormTencentCloudSSLConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudSSLConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudSSLConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormTencentCloudSSLConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLDeployConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLDeployConfig.tsx index 83e663c70..1b80a0bb6 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLDeployConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLDeployConfig.tsx @@ -12,13 +12,13 @@ type DeployNodeConfigFormTencentCloudSSLDeployConfigFieldValues = Nullish<{ resourceIds: string; }>; -export type DeployNodeConfigFormTencentCloudSSLDeployConfigProps = { +export interface DeployNodeConfigFormTencentCloudSSLDeployConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudSSLDeployConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudSSLDeployConfigFieldValues) => void; -}; +} const MULTIPLE_INPUT_SEPARATOR = ";"; @@ -110,7 +110,7 @@ const DeployNodeConfigFormTencentCloudSSLDeployConfig = ({ modalTitle={t("workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_ids.multiple_input_modal.title")} placeholder={t("workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_ids.placeholder")} placeholderInModal={t("workflow_node.deploy.form.tencentcloud_ssl_deploy_resource_ids.multiple_input_modal.placeholder")} - splitOptions={{ trim: true, removeEmpty: true }} + splitOptions={{ removeEmpty: true, trimSpace: true }} /> diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLUpdateConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLUpdateConfig.tsx index 34f582de7..f45e70559 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLUpdateConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudSSLUpdateConfig.tsx @@ -13,13 +13,13 @@ type DeployNodeConfigFormTencentCloudSSLUpdateConfigFieldValues = Nullish<{ isReplaced?: boolean; }>; -export type DeployNodeConfigFormTencentCloudSSLUpdateConfigProps = { +export interface DeployNodeConfigFormTencentCloudSSLUpdateConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudSSLUpdateConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudSSLUpdateConfigFieldValues) => void; -}; +} const MULTIPLE_INPUT_SEPARATOR = ";"; @@ -105,7 +105,7 @@ const DeployNodeConfigFormTencentCloudSSLUpdateConfig = ({ modalTitle={t("workflow_node.deploy.form.tencentcloud_ssl_update_resource_types.multiple_input_modal.title")} placeholder={t("workflow_node.deploy.form.tencentcloud_ssl_update_resource_types.placeholder")} placeholderInModal={t("workflow_node.deploy.form.tencentcloud_ssl_update_resource_types.multiple_input_modal.placeholder")} - splitOptions={{ trim: true, removeEmpty: true }} + splitOptions={{ removeEmpty: true, trimSpace: true }} /> @@ -119,7 +119,7 @@ const DeployNodeConfigFormTencentCloudSSLUpdateConfig = ({ modalTitle={t("workflow_node.deploy.form.tencentcloud_ssl_update_resource_regions.multiple_input_modal.title")} placeholder={t("workflow_node.deploy.form.tencentcloud_ssl_update_resource_regions.placeholder")} placeholderInModal={t("workflow_node.deploy.form.tencentcloud_ssl_update_resource_regions.multiple_input_modal.placeholder")} - splitOptions={{ trim: true, removeEmpty: true }} + splitOptions={{ removeEmpty: true, trimSpace: true }} /> diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudVODConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudVODConfig.tsx index b08f4eeca..68427535b 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudVODConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudVODConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormTencentCloudVODConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormTencentCloudVODConfigProps = { +export interface DeployNodeConfigFormTencentCloudVODConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudVODConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudVODConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormTencentCloudVODConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudWAFConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudWAFConfig.tsx index 5ef2962ea..cc8a7aae1 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudWAFConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormTencentCloudWAFConfig.tsx @@ -13,13 +13,13 @@ type DeployNodeConfigFormTencentCloudWAFConfigFieldValues = Nullish<{ instanceId: string; }>; -export type DeployNodeConfigFormTencentCloudWAFConfigProps = { +export interface DeployNodeConfigFormTencentCloudWAFConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormTencentCloudWAFConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormTencentCloudWAFConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormTencentCloudWAFConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormUCloudUCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormUCloudUCDNConfig.tsx index b669a2be6..9cf2906db 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormUCloudUCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormUCloudUCDNConfig.tsx @@ -7,13 +7,13 @@ type DeployNodeConfigFormUCloudUCDNConfigFieldValues = Nullish<{ domainId: string; }>; -export type DeployNodeConfigFormUCloudUCDNConfigProps = { +export interface DeployNodeConfigFormUCloudUCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormUCloudUCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormUCloudUCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormUCloudUCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormUCloudUS3Config.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormUCloudUS3Config.tsx index a896e8bb7..b01722ea2 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormUCloudUS3Config.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormUCloudUS3Config.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormUCloudUS3ConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormUCloudUS3ConfigProps = { +export interface DeployNodeConfigFormUCloudUS3ConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormUCloudUS3ConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormUCloudUS3ConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormUCloudUS3ConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormUniCloudWebHostConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormUniCloudWebHostConfig.tsx index 21624c52c..056a4ba71 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormUniCloudWebHostConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormUniCloudWebHostConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormUniCloudWebHostConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormUniCloudWebHostConfigProps = { +export interface DeployNodeConfigFormUniCloudWebHostConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormUniCloudWebHostConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormUniCloudWebHostConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormUniCloudWebHostConfigFieldValues => { return { diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormUpyunCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormUpyunCDNConfig.tsx index 9a12376aa..13b802479 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormUpyunCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormUpyunCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormUpyunCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormUpyunCDNConfigProps = { +export interface DeployNodeConfigFormUpyunCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormUpyunCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormUpyunCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormUpyunCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormUpyunFileConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormUpyunFileConfig.tsx index 27ff78538..1232b642a 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormUpyunFileConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormUpyunFileConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormUpyunFileConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormUpyunFileConfigProps = { +export interface DeployNodeConfigFormUpyunFileConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormUpyunFileConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormUpyunFileConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormUpyunFileConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineALBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineALBConfig.tsx index 58acb3889..0603bf9fa 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineALBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineALBConfig.tsx @@ -14,13 +14,13 @@ type DeployNodeConfigFormVolcEngineALBConfigFieldValues = Nullish<{ domain?: string; }>; -export type DeployNodeConfigFormVolcEngineALBConfigProps = { +export interface DeployNodeConfigFormVolcEngineALBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormVolcEngineALBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormVolcEngineALBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCDNConfig.tsx index a52796e14..175733c7d 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormVolcEngineCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormVolcEngineCDNConfigProps = { +export interface DeployNodeConfigFormVolcEngineCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormVolcEngineCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormVolcEngineCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormVolcEngineCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCLBConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCLBConfig.tsx index ddb4a8298..39aa1a93f 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCLBConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCLBConfig.tsx @@ -12,13 +12,13 @@ type DeployNodeConfigFormVolcEngineCLBConfigFieldValues = Nullish<{ listenerId?: string; }>; -export type DeployNodeConfigFormVolcEngineCLBConfigProps = { +export interface DeployNodeConfigFormVolcEngineCLBConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormVolcEngineCLBConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormVolcEngineCLBConfigFieldValues) => void; -}; +} const RESOURCE_TYPE_LOADBALANCER = "loadbalancer" as const; const RESOURCE_TYPE_LISTENER = "listener" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCertCenterConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCertCenterConfig.tsx index 7286040b0..9c53fe117 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCertCenterConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineCertCenterConfig.tsx @@ -7,13 +7,13 @@ type DeployNodeConfigFormVolcEngineCertCenterConfigFieldValues = Nullish<{ region: string; }>; -export type DeployNodeConfigFormVolcEngineCertCenterConfigProps = { +export interface DeployNodeConfigFormVolcEngineCertCenterConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormVolcEngineCertCenterConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormVolcEngineCertCenterConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormVolcEngineCertCenterConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineDCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineDCDNConfig.tsx index e7c22c73a..f8c983c16 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineDCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineDCDNConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormVolcEngineDCDNConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormVolcEngineDCDNConfigProps = { +export interface DeployNodeConfigFormVolcEngineDCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormVolcEngineDCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormVolcEngineDCDNConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormVolcEngineDCDNConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineImageXConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineImageXConfig.tsx index 56a82e5b8..88dfcedf1 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineImageXConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineImageXConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormVolcEngineImageXConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormVolcEngineImageXConfigProps = { +export interface DeployNodeConfigFormVolcEngineImageXConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormVolcEngineImageXConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormVolcEngineImageXConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormVolcEngineImageXConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineLiveConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineLiveConfig.tsx index bcfb0ff63..54cc9c239 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineLiveConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineLiveConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormVolcEngineLiveConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormVolcEngineLiveConfigProps = { +export interface DeployNodeConfigFormVolcEngineLiveConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormVolcEngineLiveConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormVolcEngineLiveConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormVolcEngineLiveConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineTOSConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineTOSConfig.tsx index b5ddd9d0f..de47b85a1 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineTOSConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormVolcEngineTOSConfig.tsx @@ -11,13 +11,13 @@ type DeployNodeConfigFormVolcEngineTOSConfigFieldValues = Nullish<{ domain: string; }>; -export type DeployNodeConfigFormVolcEngineTOSConfigProps = { +export interface DeployNodeConfigFormVolcEngineTOSConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormVolcEngineTOSConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormVolcEngineTOSConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormVolcEngineTOSConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCDNConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCDNConfig.tsx index 7650894e6..9867f2033 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCDNConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCDNConfig.tsx @@ -10,13 +10,13 @@ type DeployNodeConfigFormWangsuCDNConfigFieldValues = Nullish<{ domains: string; }>; -export type DeployNodeConfigFormWangsuCDNConfigProps = { +export interface DeployNodeConfigFormWangsuCDNConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormWangsuCDNConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormWangsuCDNConfigFieldValues) => void; -}; +} const MULTIPLE_INPUT_SEPARATOR = ";"; @@ -71,7 +71,7 @@ const DeployNodeConfigFormWangsuCDNConfig = ({ modalTitle={t("workflow_node.deploy.form.wangsu_cdn_domains.multiple_input_modal.title")} placeholder={t("workflow_node.deploy.form.wangsu_cdn_domains.placeholder")} placeholderInModal={t("workflow_node.deploy.form.wangsu_cdn_domains.multiple_input_modal.placeholder")} - splitOptions={{ trim: true, removeEmpty: true }} + splitOptions={{ removeEmpty: true, trimSpace: true }} /> diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCDNProConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCDNProConfig.tsx index a22129190..34d303fb7 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCDNProConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCDNProConfig.tsx @@ -12,13 +12,13 @@ type DeployNodeConfigFormWangsuCDNProConfigFieldValues = Nullish<{ webhookId?: string; }>; -export type DeployNodeConfigFormWangsuCDNProConfigProps = { +export interface DeployNodeConfigFormWangsuCDNProConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormWangsuCDNProConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormWangsuCDNProConfigFieldValues) => void; -}; +} const ENVIRONMENT_PRODUCTION = "production" as const; const ENVIRONMENT_STAGING = "stating" as const; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCertificateConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCertificateConfig.tsx index 739e4b288..dcee2ec16 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCertificateConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormWangsuCertificateConfig.tsx @@ -7,13 +7,13 @@ type DeployNodeConfigFormWangsuCertificateConfigFieldValues = Nullish<{ certificateId?: string; }>; -export type DeployNodeConfigFormWangsuCertificateConfigProps = { +export interface DeployNodeConfigFormWangsuCertificateConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormWangsuCertificateConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormWangsuCertificateConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormWangsuCertificateConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/DeployNodeConfigFormWebhookConfig.tsx b/ui/src/components/workflow/node/DeployNodeConfigFormWebhookConfig.tsx index 5dae40e8c..61a37bcc0 100644 --- a/ui/src/components/workflow/node/DeployNodeConfigFormWebhookConfig.tsx +++ b/ui/src/components/workflow/node/DeployNodeConfigFormWebhookConfig.tsx @@ -9,13 +9,13 @@ type DeployNodeConfigFormWebhookConfigFieldValues = Nullish<{ webhookData: string; }>; -export type DeployNodeConfigFormWebhookConfigProps = { +export interface DeployNodeConfigFormWebhookConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: DeployNodeConfigFormWebhookConfigFieldValues; onValuesChange?: (values: DeployNodeConfigFormWebhookConfigFieldValues) => void; -}; +} const initFormModel = (): DeployNodeConfigFormWebhookConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/ExecuteResultBranchNode.tsx b/ui/src/components/workflow/node/ExecuteResultBranchNode.tsx index 146957a17..550fac2d3 100644 --- a/ui/src/components/workflow/node/ExecuteResultBranchNode.tsx +++ b/ui/src/components/workflow/node/ExecuteResultBranchNode.tsx @@ -7,7 +7,7 @@ import AddNode from "./AddNode"; import WorkflowElement from "../WorkflowElement"; import { type SharedNodeProps } from "./_SharedNode"; -export type BrandNodeProps = SharedNodeProps; +export interface BrandNodeProps extends SharedNodeProps {} const ExecuteResultBranchNode = ({ node, disabled }: BrandNodeProps) => { const { token: themeToken } = theme.useToken(); @@ -33,18 +33,18 @@ const ExecuteResultBranchNode = ({ node, disabled }: BrandNodeProps) => { {node.branches?.map((branch, index) => (
{index == 0 && ( <> -
+
)} {node.branches && index == node.branches.length - 1 && ( <> -
-
+
+
)}
{renderBranch(branch, node.id, index)}
diff --git a/ui/src/components/workflow/node/ExecuteResultNode.tsx b/ui/src/components/workflow/node/ExecuteResultNode.tsx index de1d663d2..c556f6a0b 100644 --- a/ui/src/components/workflow/node/ExecuteResultNode.tsx +++ b/ui/src/components/workflow/node/ExecuteResultNode.tsx @@ -6,10 +6,10 @@ import { WorkflowNodeType } from "@/domain/workflow"; import SharedNode, { type SharedNodeProps } from "./_SharedNode"; import AddNode from "./AddNode"; -export type ConditionNodeProps = SharedNodeProps & { +export interface ConditionNodeProps extends SharedNodeProps { branchId: string; branchIndex: number; -}; +} const ExecuteResultNode = ({ node, disabled, branchId, branchIndex }: ConditionNodeProps) => { const { token: themeToken } = theme.useToken(); diff --git a/ui/src/components/workflow/node/MonitorNode.tsx b/ui/src/components/workflow/node/MonitorNode.tsx index 39fb159ed..21167a698 100644 --- a/ui/src/components/workflow/node/MonitorNode.tsx +++ b/ui/src/components/workflow/node/MonitorNode.tsx @@ -10,7 +10,7 @@ import { useWorkflowStore } from "@/stores/workflow"; import SharedNode, { type SharedNodeProps } from "./_SharedNode"; import MonitorNodeConfigForm, { type MonitorNodeConfigFormInstance } from "./MonitorNodeConfigForm"; -export type MonitorNodeProps = SharedNodeProps; +export interface MonitorNodeProps extends SharedNodeProps {} const MonitorNode = ({ node, disabled }: MonitorNodeProps) => { if (node.type !== WorkflowNodeType.Monitor) { diff --git a/ui/src/components/workflow/node/MonitorNodeConfigForm.tsx b/ui/src/components/workflow/node/MonitorNodeConfigForm.tsx index 3d0e8bd74..dc845db4a 100644 --- a/ui/src/components/workflow/node/MonitorNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/MonitorNodeConfigForm.tsx @@ -10,19 +10,19 @@ import { validDomainName, validIPv4Address, validIPv6Address, validPortNumber } type MonitorNodeConfigFormFieldValues = Partial; -export type MonitorNodeConfigFormProps = { +export interface MonitorNodeConfigFormProps { className?: string; style?: React.CSSProperties; disabled?: boolean; initialValues?: MonitorNodeConfigFormFieldValues; onValuesChange?: (values: MonitorNodeConfigFormFieldValues) => void; -}; +} -export type MonitorNodeConfigFormInstance = { +export interface MonitorNodeConfigFormInstance { getFieldsValue: () => ReturnType["getFieldsValue"]>; resetFields: FormInstance["resetFields"]; validateFields: FormInstance["validateFields"]; -}; +} const initFormModel = (): MonitorNodeConfigFormFieldValues => { return defaultNodeConfigForMonitor(); diff --git a/ui/src/components/workflow/node/NotifyNode.tsx b/ui/src/components/workflow/node/NotifyNode.tsx index d652b3f76..67a1229cd 100644 --- a/ui/src/components/workflow/node/NotifyNode.tsx +++ b/ui/src/components/workflow/node/NotifyNode.tsx @@ -11,7 +11,7 @@ import { useWorkflowStore } from "@/stores/workflow"; import SharedNode, { type SharedNodeProps } from "./_SharedNode"; import NotifyNodeConfigForm, { type NotifyNodeConfigFormInstance } from "./NotifyNodeConfigForm"; -export type NotifyNodeProps = SharedNodeProps; +export interface NotifyNodeProps extends SharedNodeProps {} const NotifyNode = ({ node, disabled }: NotifyNodeProps) => { if (node.type !== WorkflowNodeType.Notify) { diff --git a/ui/src/components/workflow/node/NotifyNodeConfigForm.tsx b/ui/src/components/workflow/node/NotifyNodeConfigForm.tsx index c1d6400ca..3a0d5f680 100644 --- a/ui/src/components/workflow/node/NotifyNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/NotifyNodeConfigForm.tsx @@ -23,19 +23,19 @@ import NotifyNodeConfigFormWebhookConfig from "./NotifyNodeConfigFormWebhookConf type NotifyNodeConfigFormFieldValues = Partial; -export type NotifyNodeConfigFormProps = { +export interface NotifyNodeConfigFormProps { className?: string; style?: React.CSSProperties; disabled?: boolean; initialValues?: NotifyNodeConfigFormFieldValues; onValuesChange?: (values: NotifyNodeConfigFormFieldValues) => void; -}; +} -export type NotifyNodeConfigFormInstance = { +export interface NotifyNodeConfigFormInstance { getFieldsValue: () => ReturnType["getFieldsValue"]>; resetFields: FormInstance["resetFields"]; validateFields: FormInstance["validateFields"]; -}; +} const initFormModel = (): NotifyNodeConfigFormFieldValues => { return defaultNodeConfigForNotify(); @@ -206,7 +206,7 @@ const NotifyNodeConfigForm = forwardRef } - usage="notification-only" + usage="notification" afterSubmit={(record) => { const provider = accessProvidersMap.get(record.provider); if (provider?.usages?.includes(ACCESS_USAGES.NOTIFICATION)) { diff --git a/ui/src/components/workflow/node/NotifyNodeConfigFormDiscordBotConfig.tsx b/ui/src/components/workflow/node/NotifyNodeConfigFormDiscordBotConfig.tsx index 200f26846..c6c7aea73 100644 --- a/ui/src/components/workflow/node/NotifyNodeConfigFormDiscordBotConfig.tsx +++ b/ui/src/components/workflow/node/NotifyNodeConfigFormDiscordBotConfig.tsx @@ -7,13 +7,13 @@ type NotifyNodeConfigFormDiscordBotConfigFieldValues = Nullish<{ channelId?: string; }>; -export type NotifyNodeConfigFormDiscordBotConfigProps = { +export interface NotifyNodeConfigFormDiscordBotConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: NotifyNodeConfigFormDiscordBotConfigFieldValues; onValuesChange?: (values: NotifyNodeConfigFormDiscordBotConfigFieldValues) => void; -}; +} const initFormModel = (): NotifyNodeConfigFormDiscordBotConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/NotifyNodeConfigFormEmailConfig.tsx b/ui/src/components/workflow/node/NotifyNodeConfigFormEmailConfig.tsx index 133ee7e4d..966683942 100644 --- a/ui/src/components/workflow/node/NotifyNodeConfigFormEmailConfig.tsx +++ b/ui/src/components/workflow/node/NotifyNodeConfigFormEmailConfig.tsx @@ -10,13 +10,13 @@ type NotifyNodeConfigFormEmailConfigFieldValues = Nullish<{ receiverAddress?: string; }>; -export type NotifyNodeConfigFormEmailConfigProps = { +export interface NotifyNodeConfigFormEmailConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: NotifyNodeConfigFormEmailConfigFieldValues; onValuesChange?: (values: NotifyNodeConfigFormEmailConfigFieldValues) => void; -}; +} const initFormModel = (): NotifyNodeConfigFormEmailConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/NotifyNodeConfigFormMattermostConfig.tsx b/ui/src/components/workflow/node/NotifyNodeConfigFormMattermostConfig.tsx index c091298b2..c77659122 100644 --- a/ui/src/components/workflow/node/NotifyNodeConfigFormMattermostConfig.tsx +++ b/ui/src/components/workflow/node/NotifyNodeConfigFormMattermostConfig.tsx @@ -7,13 +7,13 @@ type NotifyNodeConfigFormMattermostConfigFieldValues = Nullish<{ channelId?: string; }>; -export type NotifyNodeConfigFormMattermostConfigProps = { +export interface NotifyNodeConfigFormMattermostConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: NotifyNodeConfigFormMattermostConfigFieldValues; onValuesChange?: (values: NotifyNodeConfigFormMattermostConfigFieldValues) => void; -}; +} const initFormModel = (): NotifyNodeConfigFormMattermostConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/NotifyNodeConfigFormSlackBotConfig.tsx b/ui/src/components/workflow/node/NotifyNodeConfigFormSlackBotConfig.tsx index 5c304060a..0b18d72c4 100644 --- a/ui/src/components/workflow/node/NotifyNodeConfigFormSlackBotConfig.tsx +++ b/ui/src/components/workflow/node/NotifyNodeConfigFormSlackBotConfig.tsx @@ -7,13 +7,13 @@ type NotifyNodeConfigFormSlackBotConfigFieldValues = Nullish<{ channelId?: string; }>; -export type NotifyNodeConfigFormSlackBotConfigProps = { +export interface NotifyNodeConfigFormSlackBotConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: NotifyNodeConfigFormSlackBotConfigFieldValues; onValuesChange?: (values: NotifyNodeConfigFormSlackBotConfigFieldValues) => void; -}; +} const initFormModel = (): NotifyNodeConfigFormSlackBotConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/NotifyNodeConfigFormTelegramBotConfig.tsx b/ui/src/components/workflow/node/NotifyNodeConfigFormTelegramBotConfig.tsx index 29eaa8074..27850d51f 100644 --- a/ui/src/components/workflow/node/NotifyNodeConfigFormTelegramBotConfig.tsx +++ b/ui/src/components/workflow/node/NotifyNodeConfigFormTelegramBotConfig.tsx @@ -7,13 +7,13 @@ type NotifyNodeConfigFormTelegramBotConfigFieldValues = Nullish<{ chatId?: string | number; }>; -export type NotifyNodeConfigFormTelegramBotConfigProps = { +export interface NotifyNodeConfigFormTelegramBotConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: NotifyNodeConfigFormTelegramBotConfigFieldValues; onValuesChange?: (values: NotifyNodeConfigFormTelegramBotConfigFieldValues) => void; -}; +} const initFormModel = (): NotifyNodeConfigFormTelegramBotConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/NotifyNodeConfigFormWebhookConfig.tsx b/ui/src/components/workflow/node/NotifyNodeConfigFormWebhookConfig.tsx index 940550b27..9297864aa 100644 --- a/ui/src/components/workflow/node/NotifyNodeConfigFormWebhookConfig.tsx +++ b/ui/src/components/workflow/node/NotifyNodeConfigFormWebhookConfig.tsx @@ -9,13 +9,13 @@ type NotifyNodeConfigFormWebhookConfigFieldValues = Nullish<{ webhookData: string; }>; -export type NotifyNodeConfigFormWebhookConfigProps = { +export interface NotifyNodeConfigFormWebhookConfigProps { form: FormInstance; formName: string; disabled?: boolean; initialValues?: NotifyNodeConfigFormWebhookConfigFieldValues; onValuesChange?: (values: NotifyNodeConfigFormWebhookConfigFieldValues) => void; -}; +} const initFormModel = (): NotifyNodeConfigFormWebhookConfigFieldValues => { return {}; diff --git a/ui/src/components/workflow/node/StartNode.tsx b/ui/src/components/workflow/node/StartNode.tsx index b1540b638..45ac116ca 100644 --- a/ui/src/components/workflow/node/StartNode.tsx +++ b/ui/src/components/workflow/node/StartNode.tsx @@ -10,7 +10,7 @@ import { useWorkflowStore } from "@/stores/workflow"; import SharedNode, { type SharedNodeProps } from "./_SharedNode"; import StartNodeConfigForm, { type StartNodeConfigFormInstance } from "./StartNodeConfigForm"; -export type StartNodeProps = SharedNodeProps; +export interface StartNodeProps extends SharedNodeProps {} const StartNode = ({ node, disabled }: StartNodeProps) => { if (node.type !== WorkflowNodeType.Start) { diff --git a/ui/src/components/workflow/node/StartNodeConfigForm.tsx b/ui/src/components/workflow/node/StartNodeConfigForm.tsx index 8d11f861f..3f098a9eb 100644 --- a/ui/src/components/workflow/node/StartNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/StartNodeConfigForm.tsx @@ -12,19 +12,19 @@ import { getNextCronExecutions, validCronExpression } from "@/utils/cron"; type StartNodeConfigFormFieldValues = Partial; -export type StartNodeConfigFormProps = { +export interface StartNodeConfigFormProps { className?: string; style?: React.CSSProperties; disabled?: boolean; initialValues?: StartNodeConfigFormFieldValues; onValuesChange?: (values: StartNodeConfigFormFieldValues) => void; -}; +} -export type StartNodeConfigFormInstance = { +export interface StartNodeConfigFormInstance { getFieldsValue: () => ReturnType["getFieldsValue"]>; resetFields: FormInstance["resetFields"]; validateFields: FormInstance["validateFields"]; -}; +} const initFormModel = (): StartNodeConfigFormFieldValues => { return defaultNodeConfigForStart(); diff --git a/ui/src/components/workflow/node/UnknownNode.tsx b/ui/src/components/workflow/node/UnknownNode.tsx index f25959e96..83240edf5 100644 --- a/ui/src/components/workflow/node/UnknownNode.tsx +++ b/ui/src/components/workflow/node/UnknownNode.tsx @@ -8,7 +8,7 @@ import { useWorkflowStore } from "@/stores/workflow"; import { type SharedNodeProps } from "./_SharedNode"; import AddNode from "./AddNode"; -export type MonitorNodeProps = SharedNodeProps; +export interface MonitorNodeProps extends SharedNodeProps {} const UnknownNode = ({ node, disabled }: MonitorNodeProps) => { const { removeNode } = useWorkflowStore(useZustandShallowSelector(["removeNode"])); diff --git a/ui/src/components/workflow/node/UploadNode.tsx b/ui/src/components/workflow/node/UploadNode.tsx index 6936f147c..38db12c62 100644 --- a/ui/src/components/workflow/node/UploadNode.tsx +++ b/ui/src/components/workflow/node/UploadNode.tsx @@ -10,7 +10,7 @@ import { useWorkflowStore } from "@/stores/workflow"; import SharedNode, { type SharedNodeProps } from "./_SharedNode"; import UploadNodeConfigForm, { type UploadNodeConfigFormInstance } from "./UploadNodeConfigForm"; -export type UploadNodeProps = SharedNodeProps; +export interface UploadNodeProps extends SharedNodeProps {} const UploadNode = ({ node, disabled }: UploadNodeProps) => { if (node.type !== WorkflowNodeType.Upload) { diff --git a/ui/src/components/workflow/node/UploadNodeConfigForm.tsx b/ui/src/components/workflow/node/UploadNodeConfigForm.tsx index 1d331d7b7..1f435a8f9 100644 --- a/ui/src/components/workflow/node/UploadNodeConfigForm.tsx +++ b/ui/src/components/workflow/node/UploadNodeConfigForm.tsx @@ -12,19 +12,19 @@ import { getErrMsg } from "@/utils/error"; type UploadNodeConfigFormFieldValues = Partial; -export type UploadNodeConfigFormProps = { +export interface UploadNodeConfigFormProps { className?: string; style?: React.CSSProperties; disabled?: boolean; initialValues?: UploadNodeConfigFormFieldValues; onValuesChange?: (values: UploadNodeConfigFormFieldValues) => void; -}; +} -export type UploadNodeConfigFormInstance = { +export interface UploadNodeConfigFormInstance { getFieldsValue: () => ReturnType["getFieldsValue"]>; resetFields: FormInstance["resetFields"]; validateFields: FormInstance["validateFields"]; -}; +} const initFormModel = (): UploadNodeConfigFormFieldValues => { return defaultNodeConfigForUpload(); diff --git a/ui/src/components/workflow/node/_SharedNode.tsx b/ui/src/components/workflow/node/_SharedNode.tsx index cced54a3c..bc463c055 100644 --- a/ui/src/components/workflow/node/_SharedNode.tsx +++ b/ui/src/components/workflow/node/_SharedNode.tsx @@ -2,7 +2,7 @@ import { memo, useMemo, useRef } from "react"; import { useTranslation } from "react-i18next"; import { IconCopy, IconDotsVertical, IconLabel, IconTrashX } from "@tabler/icons-react"; import { useControllableValue } from "ahooks"; -import { App, Button, Card, Drawer, Dropdown, Input, type InputRef, type MenuProps, Popover, Space } from "antd"; +import { App, Button, Card, Drawer, Dropdown, Flex, Input, type InputRef, type MenuProps, Popover } from "antd"; import { produce } from "immer"; import { isEqual } from "radash"; @@ -12,10 +12,10 @@ import { useWorkflowStore } from "@/stores/workflow"; import AddNode from "./AddNode"; -export type SharedNodeProps = { +export interface SharedNodeProps { node: WorkflowNode; disabled?: boolean; -}; +} // #region Title type SharedNodeTitleProps = SharedNodeProps & { @@ -360,12 +360,12 @@ const SharedNodeConfigDrawer = ({ } footer={ !!footer && ( - + - + ) } loading={loading} @@ -382,8 +382,8 @@ const SharedNodeConfigDrawer = ({ // #endregion export default { - Title: memo(SharedNodeTitle), - Menu: memo(SharedNodeMenu), - Block: memo(SharedNodeBlock), - ConfigDrawer: memo(SharedNodeConfigDrawer), + Title: SharedNodeTitle, + Menu: SharedNodeMenu, + Block: SharedNodeBlock, + ConfigDrawer: SharedNodeConfigDrawer, }; diff --git a/ui/src/domain/provider.ts b/ui/src/domain/provider.ts index 9c098fc5a..ea643a754 100644 --- a/ui/src/domain/provider.ts +++ b/ui/src/domain/provider.ts @@ -107,97 +107,99 @@ export const accessProvidersMap: Map [ - e[0] as string, + [ACCESS_PROVIDERS.EMAIL, "provider.email", "/imgs/providers/email.svg", [ACCESS_USAGES.NOTIFICATION]], + [ACCESS_PROVIDERS.DINGTALKBOT, "provider.dingtalkbot", "/imgs/providers/dingtalk.svg", [ACCESS_USAGES.NOTIFICATION]], + [ACCESS_PROVIDERS.LARKBOT, "provider.larkbot", "/imgs/providers/lark.svg", [ACCESS_USAGES.NOTIFICATION]], + [ACCESS_PROVIDERS.WECOMBOT, "provider.wecombot", "/imgs/providers/wecom.svg", [ACCESS_USAGES.NOTIFICATION]], + [ACCESS_PROVIDERS.DISCORDBOT, "provider.discordbot", "/imgs/providers/discord.svg", [ACCESS_USAGES.NOTIFICATION]], + [ACCESS_PROVIDERS.SLACKBOT, "provider.slackbot", "/imgs/providers/slack.svg", [ACCESS_USAGES.NOTIFICATION]], + [ACCESS_PROVIDERS.TELEGRAMBOT, "provider.telegrambot", "/imgs/providers/telegram.svg", [ACCESS_USAGES.NOTIFICATION]], + [ACCESS_PROVIDERS.MATTERMOST, "provider.mattermost", "/imgs/providers/mattermost.svg", [ACCESS_USAGES.NOTIFICATION]], + ] satisfies Array<[AccessProviderType, string, string, AccessUsageType[], "builtin"] | [AccessProviderType, string, string, AccessUsageType[]]> + ).map(([type, name, icon, usages, builtin]) => [ + type, { - type: e[0] as AccessProviderType, - name: e[1] as string, - icon: e[2] as string, - usages: e[3] as AccessUsageType[], - builtin: ([ACCESS_PROVIDERS.LOCAL, ACCESS_PROVIDERS.LETSENCRYPT, ACCESS_PROVIDERS.LETSENCRYPTSTAGING] as string[]).includes(e[0] as string), + type: type, + name: name, + icon: icon, + usages: usages, + builtin: builtin === "builtin", }, ]) ); @@ -233,18 +235,20 @@ export const caProvidersMap: Map = new 注意:此处的顺序决定显示在前端的顺序。 NOTICE: The following order determines the order displayed at the frontend. */ - [ - [CA_PROVIDERS.LETSENCRYPT, "builtin"], - [CA_PROVIDERS.LETSENCRYPTSTAGING, "builtin"], - [CA_PROVIDERS.BUYPASS], - [CA_PROVIDERS.GOOGLETRUSTSERVICES], - [CA_PROVIDERS.SSLCOM], - [CA_PROVIDERS.ZEROSSL], - [CA_PROVIDERS.ACMECA], - ].map(([type, builtin]) => [ + ( + [ + [CA_PROVIDERS.LETSENCRYPT, "builtin"], + [CA_PROVIDERS.LETSENCRYPTSTAGING, "builtin"], + [CA_PROVIDERS.BUYPASS], + [CA_PROVIDERS.GOOGLETRUSTSERVICES], + [CA_PROVIDERS.SSLCOM], + [CA_PROVIDERS.ZEROSSL], + [CA_PROVIDERS.ACMECA], + ] satisfies Array<[CAProviderType, "builtin"] | [CAProviderType]> + ).map(([type, builtin]) => [ type, { - type: type as CAProviderType, + type: type, name: accessProvidersMap.get(type.split("-")[0])!.name, icon: accessProvidersMap.get(type.split("-")[0])!.icon, provider: type.split("-")[0] as AccessProviderType, @@ -325,50 +329,52 @@ export const acmeDns01ProvidersMap: Map [ + ( + [ + [ACME_DNS01_PROVIDERS.ALIYUN_DNS, "provider.aliyun.dns"], + [ACME_DNS01_PROVIDERS.ALIYUN_ESA, "provider.aliyun.esa"], + [ACME_DNS01_PROVIDERS.TENCENTCLOUD_DNS, "provider.tencentcloud.dns"], + [ACME_DNS01_PROVIDERS.TENCENTCLOUD_EO, "provider.tencentcloud.eo"], + [ACME_DNS01_PROVIDERS.BAIDUCLOUD_DNS, "provider.baiducloud.dns"], + [ACME_DNS01_PROVIDERS.HUAWEICLOUD_DNS, "provider.huaweicloud.dns"], + [ACME_DNS01_PROVIDERS.VOLCENGINE_DNS, "provider.volcengine.dns"], + [ACME_DNS01_PROVIDERS.JDCLOUD_DNS, "provider.jdcloud.dns"], + [ACME_DNS01_PROVIDERS.AWS_ROUTE53, "provider.aws.route53"], + [ACME_DNS01_PROVIDERS.AZURE_DNS, "provider.azure.dns"], + [ACME_DNS01_PROVIDERS.BUNNY, "provider.bunny"], + [ACME_DNS01_PROVIDERS.CLOUDFLARE, "provider.cloudflare"], + [ACME_DNS01_PROVIDERS.CLOUDNS, "provider.cloudns"], + [ACME_DNS01_PROVIDERS.CONSTELLIX, "provider.constellix"], + [ACME_DNS01_PROVIDERS.DESEC, "provider.desec"], + [ACME_DNS01_PROVIDERS.DIGITALOCEAN, "provider.digitalocean"], + [ACME_DNS01_PROVIDERS.DNSLA, "provider.dnsla"], + [ACME_DNS01_PROVIDERS.DUCKDNS, "provider.duckdns"], + [ACME_DNS01_PROVIDERS.DYNV6, "provider.dynv6"], + [ACME_DNS01_PROVIDERS.GCORE, "provider.gcore"], + [ACME_DNS01_PROVIDERS.GNAME, "provider.gname"], + [ACME_DNS01_PROVIDERS.GODADDY, "provider.godaddy"], + [ACME_DNS01_PROVIDERS.HETZNER, "provider.hetzner"], + [ACME_DNS01_PROVIDERS.NAMECHEAP, "provider.namecheap"], + [ACME_DNS01_PROVIDERS.NAMEDOTCOM, "provider.namedotcom"], + [ACME_DNS01_PROVIDERS.NAMESILO, "provider.namesilo"], + [ACME_DNS01_PROVIDERS.NETCUP, "provider.netcup"], + [ACME_DNS01_PROVIDERS.NETLIFY, "provider.netlify"], + [ACME_DNS01_PROVIDERS.NS1, "provider.ns1"], + [ACME_DNS01_PROVIDERS.PORKBUN, "provider.porkbun"], + [ACME_DNS01_PROVIDERS.SPACESHIP, "provider.spaceship"], + [ACME_DNS01_PROVIDERS.VERCEL, "provider.vercel"], + [ACME_DNS01_PROVIDERS.CMCCCLOUD_DNS, "provider.cmcccloud.dns"], + [ACME_DNS01_PROVIDERS.CTCCCLOUD_SMARTDNS, "provider.ctcccloud.smartdns"], + [ACME_DNS01_PROVIDERS.RAINYUN, "provider.rainyun"], + [ACME_DNS01_PROVIDERS.UCLOUD_UDNR, "provider.ucloud.udnr"], + [ACME_DNS01_PROVIDERS.WESTCN, "provider.westcn"], + [ACME_DNS01_PROVIDERS.POWERDNS, "provider.powerdns"], + [ACME_DNS01_PROVIDERS.ACMEHTTPREQ, "provider.acmehttpreq"], + ] satisfies Array<[ACMEDns01ProviderType, string]> + ).map(([type, name]) => [ type, { - type: type as ACMEDns01ProviderType, + type: type, name: name, icon: accessProvidersMap.get(type.split("-")[0])!.icon, provider: type.split("-")[0] as AccessProviderType, @@ -518,114 +524,116 @@ export const deploymentProvidersMap: Map [ + ( + [ + [DEPLOYMENT_PROVIDERS.LOCAL, "provider.local", DEPLOYMENT_CATEGORIES.OTHER, "builtin"], + [DEPLOYMENT_PROVIDERS.SSH, "provider.ssh", DEPLOYMENT_CATEGORIES.OTHER], + [DEPLOYMENT_PROVIDERS.WEBHOOK, "provider.webhook", DEPLOYMENT_CATEGORIES.OTHER], + [DEPLOYMENT_PROVIDERS.KUBERNETES_SECRET, "provider.kubernetes.secret", DEPLOYMENT_CATEGORIES.OTHER], + [DEPLOYMENT_PROVIDERS.ALIYUN_OSS, "provider.aliyun.oss", DEPLOYMENT_CATEGORIES.STORAGE], + [DEPLOYMENT_PROVIDERS.ALIYUN_CDN, "provider.aliyun.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.ALIYUN_DCDN, "provider.aliyun.dcdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.ALIYUN_ESA, "provider.aliyun.esa", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.ALIYUN_CLB, "provider.aliyun.clb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.ALIYUN_ALB, "provider.aliyun.alb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.ALIYUN_NLB, "provider.aliyun.nlb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.ALIYUN_WAF, "provider.aliyun.waf", DEPLOYMENT_CATEGORIES.FIREWALL], + [DEPLOYMENT_PROVIDERS.ALIYUN_DDOS, "provider.aliyun.ddos", DEPLOYMENT_CATEGORIES.FIREWALL], + [DEPLOYMENT_PROVIDERS.ALIYUN_LIVE, "provider.aliyun.live", DEPLOYMENT_CATEGORIES.AV], + [DEPLOYMENT_PROVIDERS.ALIYUN_VOD, "provider.aliyun.vod", DEPLOYMENT_CATEGORIES.AV], + [DEPLOYMENT_PROVIDERS.ALIYUN_FC, "provider.aliyun.fc", DEPLOYMENT_CATEGORIES.SERVERLESS], + [DEPLOYMENT_PROVIDERS.ALIYUN_APIGW, "provider.aliyun.apigw", DEPLOYMENT_CATEGORIES.APIGATEWAY], + [DEPLOYMENT_PROVIDERS.ALIYUN_GA, "provider.aliyun.ga", DEPLOYMENT_CATEGORIES.ACCELERATOR], + [DEPLOYMENT_PROVIDERS.ALIYUN_CAS, "provider.aliyun.cas_upload", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.ALIYUN_CAS_DEPLOY, "provider.aliyun.cas_deploy", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_COS, "provider.tencentcloud.cos", DEPLOYMENT_CATEGORIES.STORAGE], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_CDN, "provider.tencentcloud.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_ECDN, "provider.tencentcloud.ecdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_EO, "provider.tencentcloud.eo", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_CLB, "provider.tencentcloud.clb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_WAF, "provider.tencentcloud.waf", DEPLOYMENT_CATEGORIES.FIREWALL], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_CSS, "provider.tencentcloud.css", DEPLOYMENT_CATEGORIES.AV], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_VOD, "provider.tencentcloud.vod", DEPLOYMENT_CATEGORIES.AV], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_SCF, "provider.tencentcloud.scf", DEPLOYMENT_CATEGORIES.SERVERLESS], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_GAAP, "provider.tencentcloud.gaap", DEPLOYMENT_CATEGORIES.ACCELERATOR], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_SSL, "provider.tencentcloud.ssl_upload", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_SSL_DEPLOY, "provider.tencentcloud.ssl_deploy", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.TENCENTCLOUD_SSL_UPDATE, "provider.tencentcloud.ssl_update", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.BAIDUCLOUD_CDN, "provider.baiducloud.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.BAIDUCLOUD_BLB, "provider.baiducloud.blb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.BAIDUCLOUD_APPBLB, "provider.baiducloud.appblb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.BAIDUCLOUD_CERT, "provider.baiducloud.cert_upload", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.HUAWEICLOUD_CDN, "provider.huaweicloud.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.HUAWEICLOUD_ELB, "provider.huaweicloud.elb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.HUAWEICLOUD_WAF, "provider.huaweicloud.waf", DEPLOYMENT_CATEGORIES.FIREWALL], + [DEPLOYMENT_PROVIDERS.HUAWEICLOUD_SCM, "provider.huaweicloud.scm_upload", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.VOLCENGINE_TOS, "provider.volcengine.tos", DEPLOYMENT_CATEGORIES.STORAGE], + [DEPLOYMENT_PROVIDERS.VOLCENGINE_CDN, "provider.volcengine.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.VOLCENGINE_DCDN, "provider.volcengine.dcdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.VOLCENGINE_CLB, "provider.volcengine.clb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.VOLCENGINE_ALB, "provider.volcengine.alb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.VOLCENGINE_IMAGEX, "provider.volcengine.imagex", DEPLOYMENT_CATEGORIES.STORAGE], + [DEPLOYMENT_PROVIDERS.VOLCENGINE_LIVE, "provider.volcengine.live", DEPLOYMENT_CATEGORIES.AV], + [DEPLOYMENT_PROVIDERS.VOLCENGINE_CERTCENTER, "provider.volcengine.certcenter_upload", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.JDCLOUD_ALB, "provider.jdcloud.alb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.JDCLOUD_CDN, "provider.jdcloud.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.JDCLOUD_LIVE, "provider.jdcloud.live", DEPLOYMENT_CATEGORIES.AV], + [DEPLOYMENT_PROVIDERS.JDCLOUD_VOD, "provider.jdcloud.vod", DEPLOYMENT_CATEGORIES.AV], + [DEPLOYMENT_PROVIDERS.QINIU_KODO, "provider.qiniu.kodo", DEPLOYMENT_CATEGORIES.STORAGE], + [DEPLOYMENT_PROVIDERS.QINIU_CDN, "provider.qiniu.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.QINIU_PILI, "provider.qiniu.pili", DEPLOYMENT_CATEGORIES.AV], + [DEPLOYMENT_PROVIDERS.UPYUN_FILE, "provider.upyun.file", DEPLOYMENT_CATEGORIES.STORAGE], + [DEPLOYMENT_PROVIDERS.UPYUN_CDN, "provider.upyun.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.BAISHAN_CDN, "provider.baishan.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.WANGSU_CDN, "provider.wangsu.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.WANGSU_CDNPRO, "provider.wangsu.cdnpro", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.WANGSU_CERTIFICATE, "provider.wangsu.certificate_upload", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.DOGECLOUD_CDN, "provider.dogecloud.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.BYTEPLUS_CDN, "provider.byteplus.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.UCLOUD_US3, "provider.ucloud.us3", DEPLOYMENT_CATEGORIES.STORAGE], + [DEPLOYMENT_PROVIDERS.UCLOUD_UCDN, "provider.ucloud.ucdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.CTCCCLOUD_CDN, "provider.ctcccloud.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.CTCCCLOUD_ICDN, "provider.ctcccloud.icdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.CTCCCLOUD_AO, "provider.ctcccloud.ao", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.CTCCCLOUD_ELB, "provider.ctcccloud.elb", DEPLOYMENT_CATEGORIES.LOADBALANCE], + [DEPLOYMENT_PROVIDERS.CTCCCLOUD_LVDN, "provider.ctcccloud.lvdn", DEPLOYMENT_CATEGORIES.AV], + [DEPLOYMENT_PROVIDERS.CTCCCLOUD_CMS, "provider.ctcccloud.cms_upload", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.RAINYUN_RCDN, "provider.rainyun.rcdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.UNICLOUD_WEBHOST, "provider.unicloud.webhost", DEPLOYMENT_CATEGORIES.WEBSITE], + [DEPLOYMENT_PROVIDERS.AWS_CLOUDFRONT, "provider.aws.cloudfront", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.AWS_ACM, "provider.aws.acm", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.AWS_IAM, "provider.aws.iam", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.AZURE_KEYVAULT, "provider.azure.keyvault", DEPLOYMENT_CATEGORIES.SSL], + [DEPLOYMENT_PROVIDERS.BUNNY_CDN, "provider.bunny.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.CACHEFLY, "provider.cachefly", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.EDGIO_APPLICATIONS, "provider.edgio.applications", DEPLOYMENT_CATEGORIES.WEBSITE], + [DEPLOYMENT_PROVIDERS.GCORE_CDN, "provider.gcore.cdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.NETLIFY_SITE, "provider.netlify.site", DEPLOYMENT_CATEGORIES.WEBSITE], + [DEPLOYMENT_PROVIDERS.CDNFLY, "provider.cdnfly", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.FLEXCDN, "provider.flexcdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.GOEDGE, "provider.goedge", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS.LECDN, "provider.lecdn", DEPLOYMENT_CATEGORIES.CDN], + [DEPLOYMENT_PROVIDERS["1PANEL_SITE"], "provider.1panel.site", DEPLOYMENT_CATEGORIES.WEBSITE], + [DEPLOYMENT_PROVIDERS["1PANEL_CONSOLE"], "provider.1panel.console", DEPLOYMENT_CATEGORIES.OTHER], + [DEPLOYMENT_PROVIDERS.BAOTAPANEL_SITE, "provider.baotapanel.site", DEPLOYMENT_CATEGORIES.WEBSITE], + [DEPLOYMENT_PROVIDERS.BAOTAPANEL_CONSOLE, "provider.baotapanel.console", DEPLOYMENT_CATEGORIES.OTHER], + [DEPLOYMENT_PROVIDERS.RATPANEL_SITE, "provider.ratpanel.site", DEPLOYMENT_CATEGORIES.WEBSITE], + [DEPLOYMENT_PROVIDERS.RATPANEL_CONSOLE, "provider.ratpanel.console", DEPLOYMENT_CATEGORIES.OTHER], + [DEPLOYMENT_PROVIDERS.BAOTAWAF_SITE, "provider.baotawaf.site", DEPLOYMENT_CATEGORIES.FIREWALL], + [DEPLOYMENT_PROVIDERS.BAOTAWAF_CONSOLE, "provider.baotawaf.console", DEPLOYMENT_CATEGORIES.OTHER], + [DEPLOYMENT_PROVIDERS.SAFELINE, "provider.safeline", DEPLOYMENT_CATEGORIES.FIREWALL], + [DEPLOYMENT_PROVIDERS.APISIX, "provider.apisix", DEPLOYMENT_CATEGORIES.APIGATEWAY], + [DEPLOYMENT_PROVIDERS.KONG, "provider.kong", DEPLOYMENT_CATEGORIES.APIGATEWAY], + [DEPLOYMENT_PROVIDERS.PROXMOXVE, "provider.proxmoxve", DEPLOYMENT_CATEGORIES.NAS], + ] satisfies Array<[DeploymentProviderType, string, DeploymentCategoryType, "builtin"] | [DeploymentProviderType, string, DeploymentCategoryType]> + ).map(([type, name, category, builtin]) => [ type, { - type: type as DeploymentProviderType, + type: type, name: name, icon: accessProvidersMap.get(type.split("-")[0])!.icon, provider: type.split("-")[0] as AccessProviderType, - category: category as DeploymentCategoryType, + category: category, builtin: builtin === "builtin", }, ]) @@ -649,7 +657,7 @@ export const NOTIFICATION_PROVIDERS = Object.freeze({ WECOMBOT: `${ACCESS_PROVIDERS.WECOMBOT}`, } as const); -export type NotificationProviderType = (typeof CA_PROVIDERS)[keyof typeof CA_PROVIDERS]; +export type NotificationProviderType = (typeof NOTIFICATION_PROVIDERS)[keyof typeof NOTIFICATION_PROVIDERS]; export type NotificationProvider = { type: NotificationProviderType; @@ -663,20 +671,22 @@ export const notificationProvidersMap: Map [ + ( + [ + [NOTIFICATION_PROVIDERS.EMAIL], + [NOTIFICATION_PROVIDERS.WEBHOOK], + [NOTIFICATION_PROVIDERS.DINGTALKBOT], + [NOTIFICATION_PROVIDERS.LARKBOT], + [NOTIFICATION_PROVIDERS.WECOMBOT], + [NOTIFICATION_PROVIDERS.DISCORDBOT], + [NOTIFICATION_PROVIDERS.SLACKBOT], + [NOTIFICATION_PROVIDERS.TELEGRAMBOT], + [NOTIFICATION_PROVIDERS.MATTERMOST], + ] satisfies Array<[NotificationProviderType]> + ).map(([type]) => [ type, { - type: type as CAProviderType, + type: type, name: accessProvidersMap.get(type.split("-")[0])!.name, icon: accessProvidersMap.get(type.split("-")[0])!.icon, provider: type.split("-")[0] as AccessProviderType, diff --git a/ui/src/global.css b/ui/src/global.css index f5496404e..1a7b2b175 100644 --- a/ui/src/global.css +++ b/ui/src/global.css @@ -41,6 +41,15 @@ } @layer base { + /* Reset ol, ul, dl */ + ol, + ul, + dl { + margin-left: 0; + margin-right: 0; + padding-left: 1.25em; + } + /* Fix non-antd icon's position not correct */ .ant-btn > .ant-btn-icon, svg.tabler-icon, diff --git a/ui/src/i18n/locales/en/nls.access.json b/ui/src/i18n/locales/en/nls.access.json index d2de29a24..c6b47655f 100644 --- a/ui/src/i18n/locales/en/nls.access.json +++ b/ui/src/i18n/locales/en/nls.access.json @@ -22,9 +22,9 @@ "access.props.provider.usage.ca": "CA", "access.props.provider.usage.notification": "Notification", "access.props.provider.builtin": "Built-in", - "access.props.usage.both_dns_hosting": "Provider", - "access.props.usage.ca_only": "Certificate authority", - "access.props.usage.notification_only": "Notification channel", + "access.props.usage.dns_hosting": "Provider", + "access.props.usage.ca": "Certificate authority", + "access.props.usage.notification": "Notification channel", "access.props.created_at": "Created at", "access.props.updated_at": "Updated at", @@ -34,10 +34,6 @@ "access.form.provider.placeholder": "Please select a provider", "access.form.provider.tooltip": "DNS provider: The provider that hosts your domain names and manages your DNS records.
Hosting provider: The provider that hosts your servers or cloud services for deploying certificates.

Cannot be edited after saving.", "access.form.provider.search.placeholder": "Search provider ...", - "access.form.certificate_authority.label": "Certificate authority", - "access.form.certificate_authority.placeholder": "Please select a certificate authority", - "access.form.notification_channel.label": "Notification channel", - "access.form.notification_channel.placeholder": "Please select a notification channel", "access.form.1panel_server_url.label": "1Panel server URL", "access.form.1panel_server_url.placeholder": "Please enter 1Panel server URL", "access.form.1panel_api_version.label": "1Panel version", @@ -492,10 +488,10 @@ "access.form.webhook_default_data.errmsg.json_invalid": "Please enter a valiod JSON string", "access.form.webhook_default_data_for_deployment.label": "Webhook data for deployment (Optional)", "access.form.webhook_default_data_for_deployment.placeholder": "Please enter Webhook data", - "access.form.webhook_default_data_for_deployment.guide": "Tips: The Webhook data should be in JSON format.

The values in JSON support template variables, which will be replaced by actual values when sent to the Webhook URL. Supported variables:
  1. ${DOMAIN}: The primary domain of the certificate (CommonName).
  2. ${DOMAINS}: The domain list of the certificate (SubjectAltNames).
  3. ${CERTIFICATE}: The PEM format content of the certificate file.
  4. ${SERVER_CERTIFICATE}: The PEM format content of the server certificate file.
  5. ${INTERMEDIA_CERTIFICATE}: The PEM format content of the intermediate CA certificate file.
  6. ${PRIVATE_KEY}: The PEM format content of the private key file.

When the request method is GET, the data will be passed as query string. Otherwise, the data will be encoded in the format indicated by the Content-Type in the request headers. Supported formats:
  1. application/json (default).
  2. application/x-www-form-urlencoded: Nested data is not supported.
  3. multipart/form-data: Nested data is not supported.
  4. ", + "access.form.webhook_default_data_for_deployment.guide": "Tips: The Webhook data should be in JSON format.

    The values in JSON support template variables, which will be replaced by actual values when sent to the Webhook URL. Supported variables:
    1. ${DOMAIN}: The primary domain of the certificate (CommonName).
    2. ${DOMAINS}: The domain list of the certificate (SubjectAltNames).
    3. ${CERTIFICATE}: The PEM format content of the certificate file.
    4. ${SERVER_CERTIFICATE}: The PEM format content of the server certificate file.
    5. ${INTERMEDIA_CERTIFICATE}: The PEM format content of the intermediate CA certificate file.
    6. ${PRIVATE_KEY}: The PEM format content of the private key file.

    When the request method is GET, the data will be passed as query string. Otherwise, the data will be encoded in the format indicated by the Content-Type in the request headers. Supported formats:
    1. application/json (default).
    2. application/x-www-form-urlencoded: Nested data is not supported.
    3. multipart/form-data: Nested data is not supported.
    4. ", "access.form.webhook_default_data_for_notification.label": "Webhook data for notification (Optional)", "access.form.webhook_default_data_for_notification.placeholder": "Please enter Webhook data", - "access.form.webhook_default_data_for_notification.guide": "Tips: The Webhook data should be in JSON format.

      The values in JSON support template variables, which will be replaced by actual values when sent to the Webhook URL. Supported variables:
      1. ${SUBJECT}: The subject of notification.
      2. ${MESSAGE}: The message of notification.

      When the request method is GET, the data will be passed as query string. Otherwise, the data will be encoded in the format indicated by the Content-Type in the request headers. Supported formats:
      1. application/json (default).
      2. application/x-www-form-urlencoded: Nested data is not supported.
      3. multipart/form-data: Nested data is not supported.
      4. ", + "access.form.webhook_default_data_for_notification.guide": "Tips: The Webhook data should be in JSON format.

        The values in JSON support template variables, which will be replaced by actual values when sent to the Webhook URL. Supported variables:
        1. ${SUBJECT}: The subject of notification.
        2. ${MESSAGE}: The message of notification.

        When the request method is GET, the data will be passed as query string. Otherwise, the data will be encoded in the format indicated by the Content-Type in the request headers. Supported formats:
        1. application/json (default).
        2. application/x-www-form-urlencoded: Nested data is not supported.
        3. multipart/form-data: Nested data is not supported.
        4. ", "access.form.webhook_preset_data.button": "Use preset template", "access.form.webhook_preset_data.option.bark.label": "Bark", "access.form.webhook_preset_data.option.gotify.label": "Gotify", diff --git a/ui/src/i18n/locales/en/nls.certificate.json b/ui/src/i18n/locales/en/nls.certificate.json index 49035827a..d408978d3 100644 --- a/ui/src/i18n/locales/en/nls.certificate.json +++ b/ui/src/i18n/locales/en/nls.certificate.json @@ -14,7 +14,7 @@ "certificate.props.subject_alt_names": "Name", "certificate.props.validity": "Expiry", "certificate.props.validity.left_days": "{{left}} / {{total}} days left", - "certificate.props.validity.less_than_a_day": "Less than 1 day", + "certificate.props.validity.less_than_a_day": "≤1 / {{total}} days left", "certificate.props.validity.expired": "Expired", "certificate.props.validity.expiration": "Expire on {{date}}", "certificate.props.validity.filter.all": "All", diff --git a/ui/src/i18n/locales/en/nls.dashboard.json b/ui/src/i18n/locales/en/nls.dashboard.json index 02d3f168b..cee194014 100644 --- a/ui/src/i18n/locales/en/nls.dashboard.json +++ b/ui/src/i18n/locales/en/nls.dashboard.json @@ -12,7 +12,6 @@ "dashboard.quick_actions": "Quick actions", "dashboard.quick_actions.create_workflow": "Create workflow", - "dashboard.quick_actions.change_login_password": "Change login password", - "dashboard.quick_actions.cofigure_notification": "Configure notificaion", - "dashboard.quick_actions.configure_ca": "Configure certificate authority" + "dashboard.quick_actions.change_password": "Change password", + "dashboard.quick_actions.configure_ca": "Configure CA" } diff --git a/ui/src/i18n/locales/en/nls.settings.json b/ui/src/i18n/locales/en/nls.settings.json index 2cc517de3..b484db88f 100644 --- a/ui/src/i18n/locales/en/nls.settings.json +++ b/ui/src/i18n/locales/en/nls.settings.json @@ -51,7 +51,7 @@ "settings.sslprovider.form.sslcom_eab_hmac_key.tooltip": "For more information, see https://www.ssl.com/how-to/generate-acme-credentials-for-reseller-customers/", "settings.persistence.tab": "Persistence", - "settings.persistence.title": "Setup data retention", + "settings.persistence.title": "Data retention", "settings.persistence.form.workflow_runs_max_days.label": "Max days retention of workflow history runs", "settings.persistence.form.workflow_runs_max_days.placeholder": "Please enter the maximum retention days of workflow history runs", "settings.persistence.form.workflow_runs_max_days.unit": "days", diff --git a/ui/src/i18n/locales/en/nls.workflow.nodes.json b/ui/src/i18n/locales/en/nls.workflow.nodes.json index 54aae7bb5..bb30992f1 100644 --- a/ui/src/i18n/locales/en/nls.workflow.nodes.json +++ b/ui/src/i18n/locales/en/nls.workflow.nodes.json @@ -22,7 +22,7 @@ "workflow_node.start.form.trigger_cron.errmsg.invalid": "Please enter a valid cron expression", "workflow_node.start.form.trigger_cron.tooltip": "Exactly 5 space separated segments. Time zone is based on the server.", "workflow_node.start.form.trigger_cron.extra": "Expected execution time for the last 5 times:", - "workflow_node.start.form.trigger_cron.guide": "Tips: If you have multiple workflows, it is recommended to set them to run at multiple times of the day instead of always running at specific times. Don't always set it to midnight every day to avoid spikes in traffic.

          Reference links:
          1. Let’s Encrypt rate limits
          2. Why should my Let’s Encrypt (ACME) client run at a random time?", + "workflow_node.start.form.trigger_cron.guide": "Tips: If you have multiple workflows, it is recommended to set them to run at different times of the day instead of always running at a specific time. And please don't always set it to midnight every day to avoid spikes in traffic.

          Reference links:
          1. Let’s Encrypt rate limits
          2. Why should my Let’s Encrypt (ACME) client run at a random time?", "workflow_node.apply.label": "Obtain certificate", "workflow_node.apply.default_name": "Application", @@ -671,13 +671,13 @@ "workflow_node.deploy.form.ssh_use_scp.tooltip": "If the remote server does not support SFTP, please enable this option to fallback to SCP.", "workflow_node.deploy.form.tencentcloud_cdn_endpoint.label": "Tencent Cloud CDN API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_cdn_endpoint.placeholder": "Please enter Tencent Cloud CDN API endpoint (e.g. cdn.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_cdn_endpoint.tooltip": "
          • cdn.intl.tencentcloudapi.com for Tencent Cloud International
          • cdn.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_cdn_endpoint.tooltip": "
          • cdn.intl.tencentcloudapi.com for Tencent Cloud International
          • cdn.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_cdn_domain.label": "Tencent Cloud CDN domain", "workflow_node.deploy.form.tencentcloud_cdn_domain.placeholder": "Please enter Tencent Cloud CDN domain name", "workflow_node.deploy.form.tencentcloud_cdn_domain.tooltip": "For more information, see https://console.tencentcloud.com/cdn", "workflow_node.deploy.form.tencentcloud_clb_endpoint.label": "Tencent Cloud CLB API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_clb_endpoint.placeholder": "Please enter Tencent Cloud CLB API endpoint (e.g. clb.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_clb_endpoint.tooltip": "
          • clb.intl.tencentcloudapi.com for Tencent Cloud International
          • clb.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_clb_endpoint.tooltip": "
          • clb.intl.tencentcloudapi.com for Tencent Cloud International
          • clb.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_clb_region.label": "Tencent Cloud CLB region", "workflow_node.deploy.form.tencentcloud_clb_region.placeholder": "Please enter Tencent Cloud CLB region (e.g. ap-guangzhou)", "workflow_node.deploy.form.tencentcloud_clb_region.tooltip": "For more information, see https://www.tencentcloud.com/document/product/214/13629", @@ -710,19 +710,19 @@ "workflow_node.deploy.form.tencentcloud_cos_domain.tooltip": "For more information, see https://console.tencentcloud.com/cos", "workflow_node.deploy.form.tencentcloud_css_endpoint.label": "Tencent Cloud CSS API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_css_endpoint.placeholder": "Please enter Tencent Cloud CSS API endpoint (e.g. live.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_css_endpoint.tooltip": "
          • live.intl.tencentcloudapi.com for Tencent Cloud International
          • live.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_css_endpoint.tooltip": "
          • live.intl.tencentcloudapi.com for Tencent Cloud International
          • live.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_css_domain.label": "Tencent Cloud CSS play domain", "workflow_node.deploy.form.tencentcloud_css_domain.placeholder": "Please enter Tencent Cloud CSS play domain name", "workflow_node.deploy.form.tencentcloud_css_domain.tooltip": "For more information, see https://console.tencentcloud.com/live", "workflow_node.deploy.form.tencentcloud_ecdn_endpoint.label": "Tencent Cloud ECDN API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_ecdn_endpoint.placeholder": "Please enter Tencent Cloud ECDN API endpoint (e.g. cdn.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_ecdn_endpoint.tooltip": "
          • cdn.intl.tencentcloudapi.com for Tencent Cloud International
          • cdn.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_ecdn_endpoint.tooltip": "
          • cdn.intl.tencentcloudapi.com for Tencent Cloud International
          • cdn.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_ecdn_domain.label": "Tencent Cloud ECDN domain", "workflow_node.deploy.form.tencentcloud_ecdn_domain.placeholder": "Please enter Tencent Cloud ECDN domain name", "workflow_node.deploy.form.tencentcloud_ecdn_domain.tooltip": "For more information, see https://console.tencentcloud.com/cdn", "workflow_node.deploy.form.tencentcloud_eo_endpoint.label": "Tencent Cloud EdgeOne API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_eo_endpoint.placeholder": "Please enter Tencent Cloud EdgeOne API endpoint (e.g. teo.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_eo_endpoint.tooltip": "
          • cdn.intl.tencentcloudapi.com for Tencent Cloud International
          • teo.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_eo_endpoint.tooltip": "
          • cdn.intl.tencentcloudapi.com for Tencent Cloud International
          • teo.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_eo_zone_id.label": "Tencent Cloud EdgeOne zone ID", "workflow_node.deploy.form.tencentcloud_eo_zone_id.placeholder": "Please enter Tencent Cloud EdgeOne zone ID", "workflow_node.deploy.form.tencentcloud_eo_zone_id.tooltip": "For more information, see https://console.tencentcloud.com/edgeone", @@ -733,7 +733,7 @@ "workflow_node.deploy.form.tencentcloud_eo_domains.multiple_input_modal.placeholder": "Please enter Tencent Cloud EdgeOne domain name", "workflow_node.deploy.form.tencentcloud_gaap_endpoint.label": "Tencent Cloud GAAP API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_gaap_endpoint.placeholder": "Please enter Tencent Cloud GAAP API endpoint (e.g. gaap.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_gaap_endpoint.tooltip": "
          • gaap.intl.tencentcloudapi.com for Tencent Cloud International
          • gaap.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_gaap_endpoint.tooltip": "
          • gaap.intl.tencentcloudapi.com for Tencent Cloud International
          • gaap.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_gaap_resource_type.label": "Resource type", "workflow_node.deploy.form.tencentcloud_gaap_resource_type.placeholder": "Please select resource type", "workflow_node.deploy.form.tencentcloud_gaap_resource_type.option.listener.label": "GAAP listener", @@ -745,7 +745,7 @@ "workflow_node.deploy.form.tencentcloud_gaap_listener_id.tooltip": "For more information, see https://console.tencentcloud.com/gaap", "workflow_node.deploy.form.tencentcloud_scf_endpoint.label": "Tencent Cloud SCF API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_scf_endpoint.placeholder": "Please enter Tencent Cloud SCF API endpoint (e.g. scf.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_scf_endpoint.tooltip": "
          • scf.intl.tencentcloudapi.com for Tencent Cloud International
          • scf.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_scf_endpoint.tooltip": "
          • scf.intl.tencentcloudapi.com for Tencent Cloud International
          • scf.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_scf_region.label": "Tencent Cloud SCF region", "workflow_node.deploy.form.tencentcloud_scf_region.placeholder": "Please enter Tencent Cloud SCF region (e.g. ap-guangzhou)", "workflow_node.deploy.form.tencentcloud_scf_region.tooltip": "For more information, see https://www.tencentcloud.com/document/product/583/17299", @@ -754,11 +754,11 @@ "workflow_node.deploy.form.tencentcloud_scf_domain.tooltip": "For more information, see https://console.tencentcloud.com/scf", "workflow_node.deploy.form.tencentcloud_ssl_endpoint.label": "Tencent Cloud SSL API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_ssl_endpoint.placeholder": "Please enter Tencent Cloud SSL API endpoint (e.g. ssl.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_ssl_endpoint.tooltip": "
          • ssl.intl.tencentcloudapi.com for Tencent Cloud International
          • ssl.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_ssl_endpoint.tooltip": "
          • ssl.intl.tencentcloudapi.com for Tencent Cloud International
          • ssl.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_ssl_deploy.guide": "TIPS: This will invoke Tencent Cloud OpenAPI DeployCertificateInstance to create an asynchronously deployment task. You need to go to the Tencent Cloud console to check the actual deployment results by yourself.", "workflow_node.deploy.form.tencentcloud_ssl_deploy_endpoint.label": "Tencent Cloud SSL API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_ssl_deploy_endpoint.placeholder": "Please enter Tencent Cloud SSL API endpoint (e.g. ssl.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_ssl_deploy_endpoint.tooltip": "
          • ssl.intl.tencentcloudapi.com for Tencent Cloud International
          • ssl.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_ssl_deploy_endpoint.tooltip": "
          • ssl.intl.tencentcloudapi.com for Tencent Cloud International
          • ssl.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_ssl_deploy_region.label": "Tencent Cloud service region", "workflow_node.deploy.form.tencentcloud_ssl_deploy_region.placeholder": "Please enter Tencent Cloud service region (e.g. ap-guangzhou)", "workflow_node.deploy.form.tencentcloud_ssl_deploy_region.tooltip": "For more information, see https://www.tencentcloud.com/document/product/1007/36573", @@ -774,7 +774,7 @@ "workflow_node.deploy.form.tencentcloud_ssl_update.guide": "TIPS: This will invoke Tencent Cloud OpenAPI UpdateCertificateInstance or UploadUpdateCertificateInstance to create an asynchronously deployment task. You need to go to the Tencent Cloud console to check the actual deployment results by yourself.", "workflow_node.deploy.form.tencentcloud_ssl_update_endpoint.label": "Tencent Cloud SSL API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_ssl_update_endpoint.placeholder": "Please enter Tencent Cloud SSL API endpoint (e.g. ssl.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_ssl_update_endpoint.tooltip": "
          • ssl.intl.tencentcloudapi.com for Tencent Cloud International
          • ssl.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_ssl_update_endpoint.tooltip": "
          • ssl.intl.tencentcloudapi.com for Tencent Cloud International
          • ssl.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_ssl_update_certificate_id.label": "Tencent Cloud SSL certificate ID", "workflow_node.deploy.form.tencentcloud_ssl_update_certificate_id.placeholder": "Please enter Tencent Cloud SSL certificate ID", "workflow_node.deploy.form.tencentcloud_ssl_update_certificate_id.tooltip": "For more information, see https://console.cloud.tencent.com/certoverview", @@ -792,7 +792,7 @@ "workflow_node.deploy.form.tencentcloud_ssl_update_is_replaced.tooltip": "When unchecked, it will invoke UpdateCertificateInstance; otherwise, it will invoke UploadUpdateCertificateInstance.", "workflow_node.deploy.form.tencentcloud_vod_endpoint.label": "Tencent Cloud VOD API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_vod_endpoint.placeholder": "Please enter Tencent Cloud VOD API endpoint (e.g. vod.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_vod_endpoint.tooltip": "
          • vod.intl.tencentcloudapi.com for Tencent Cloud International
          • vod.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_vod_endpoint.tooltip": "
          • vod.intl.tencentcloudapi.com for Tencent Cloud International
          • vod.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_vod_sub_app_id.label": "Tencent Cloud VOD App ID", "workflow_node.deploy.form.tencentcloud_vod_sub_app_id.placeholder": "Please enter Tencent Cloud VOD App ID", "workflow_node.deploy.form.tencentcloud_vod_sub_app_id.tooltip": "For more information, see https://console.tencentcloud.com/vod", @@ -801,7 +801,7 @@ "workflow_node.deploy.form.tencentcloud_vod_domain.tooltip": "For more information, see https://console.tencentcloud.com/vod", "workflow_node.deploy.form.tencentcloud_waf_endpoint.label": "Tencent Cloud WAF API endpoint (Optional)", "workflow_node.deploy.form.tencentcloud_waf_endpoint.placeholder": "Please enter Tencent Cloud WAF API endpoint (e.g. waf.intl.tencentcloudapi.com)", - "workflow_node.deploy.form.tencentcloud_waf_endpoint.tooltip": "
          • waf.intl.tencentcloudapi.com for Tencent Cloud International
          • waf.tencentcloudapi.com for Tencent Cloud in China
          ", + "workflow_node.deploy.form.tencentcloud_waf_endpoint.tooltip": "
          • waf.intl.tencentcloudapi.com for Tencent Cloud International
          • waf.tencentcloudapi.com for Tencent Cloud in China
          ", "workflow_node.deploy.form.tencentcloud_waf_region.label": "Tencent Cloud WAF region", "workflow_node.deploy.form.tencentcloud_waf_region.placeholder": "Please enter Tencent Cloud WAF region (e.g. ap-guangzhou)", "workflow_node.deploy.form.tencentcloud_waf_region.tooltip": "For more information, see https://www.tencentcloud.com/document/product/627/38085", @@ -926,7 +926,7 @@ "workflow_node.deploy.form.webhook_data.label": "Webhook data (Optional)", "workflow_node.deploy.form.webhook_data.placeholder": "Please enter Webhook data to override the default value", "workflow_node.deploy.form.webhook_data.tooltip": "Leave it blank to use the default Webhook data provided by the credential.", - "workflow_node.deploy.form.webhook_data.guide": "
          Supported variables:
          1. ${DOMAIN}: The primary domain of the certificate (CommonName).
          2. ${DOMAINS}: The domain list of the certificate (SubjectAltNames).
          3. ${CERTIFICATE}: The PEM format content of the certificate file.
          4. ${SERVER_CERTIFICATE}: The PEM format content of the server certificate file.
          5. ${INTERMEDIA_CERTIFICATE}: The PEM format content of the intermediate CA certificate file.
          6. ${PRIVATE_KEY}: The PEM format content of the private key file.

          Please visit the authorization management page for addtional notes.", + "workflow_node.deploy.form.webhook_data.guide": "
          Supported variables:
          1. ${DOMAIN}: The primary domain of the certificate (CommonName).
          2. ${DOMAINS}: The domain list of the certificate (SubjectAltNames).
          3. ${CERTIFICATE}: The PEM format content of the certificate file.
          4. ${SERVER_CERTIFICATE}: The PEM format content of the server certificate file.
          5. ${INTERMEDIA_CERTIFICATE}: The PEM format content of the intermediate CA certificate file.
          6. ${PRIVATE_KEY}: The PEM format content of the private key file.

          Please visit the authorization management page for addtional notes.", "workflow_node.deploy.form.webhook_data.errmsg.json_invalid": "Please enter a valiod JSON string", "workflow_node.deploy.form.strategy_config.label": "Strategy settings", "workflow_node.deploy.form.skip_on_last_succeeded.label": "Repeated deployment", @@ -983,7 +983,7 @@ "workflow_node.notify.form.webhook_data.label": "Webhook data (Optional)", "workflow_node.notify.form.webhook_data.placeholder": "Please enter Webhook data to override the default value", "workflow_node.notify.form.webhook_data.tooltip": "Leave it blank to use the default Webhook data provided by the credential.", - "workflow_node.notify.form.webhook_data.guide": "
          Supported variables:
          1. ${SUBJECT}: The subject of notification.
          2. ${MESSAGE}: The message of notification.

          Please visit the authorization management page for addtional notes.", + "workflow_node.notify.form.webhook_data.guide": "
          Supported variables:
          1. ${SUBJECT}: The subject of notification.
          2. ${MESSAGE}: The message of notification.

          Please visit the authorization management page for addtional notes.", "workflow_node.notify.form.webhook_data.errmsg.json_invalid": "Please enter a valiod JSON string", "workflow_node.notify.form.strategy_config.label": "Strategy settings", "workflow_node.notify.form.skip_on_all_prev_skipped.label": "Silent behavior", diff --git a/ui/src/i18n/locales/zh/nls.access.json b/ui/src/i18n/locales/zh/nls.access.json index 68aa52a04..31eb9bb0f 100644 --- a/ui/src/i18n/locales/zh/nls.access.json +++ b/ui/src/i18n/locales/zh/nls.access.json @@ -21,9 +21,9 @@ "access.props.provider.usage.ca": "证书颁发机构", "access.props.provider.usage.notification": "通知渠道", "access.props.provider.builtin": "内置", - "access.props.usage.both_dns_hosting": "提供商", - "access.props.usage.ca_only": "证书颁发机构", - "access.props.usage.notification_only": "通知渠道", + "access.props.usage.dns_hosting": "提供商", + "access.props.usage.ca": "证书颁发机构", + "access.props.usage.notification": "通知渠道", "access.props.created_at": "创建时间", "access.props.updated_at": "更新时间", @@ -33,10 +33,6 @@ "access.form.provider.placeholder": "请选择提供商", "access.form.provider.tooltip": "提供商分为两种类型:
          【DNS 提供商】你的 DNS 托管方,通常等同于域名注册商,用于在申请证书时管理你的域名解析记录。
          【主机提供商】你的服务器或云服务的托管方,用于部署签发的证书。

          该字段保存后不可修改。", "access.form.provider.search.placeholder": "搜索提供商……", - "access.form.certificate_authority.label": "证书颁发机构", - "access.form.certificate_authority.placeholder": "请选择证书颁发机构", - "access.form.notification_channel.label": "通知渠道", - "access.form.notification_channel.placeholder": "请选择通知渠道", "access.form.common_allow_insecure_conns.label": "忽略 SSL/TLS 证书错误", "access.form.common_allow_insecure_conns.switch.on": "允许", "access.form.common_allow_insecure_conns.switch.off": "不允许", @@ -491,10 +487,10 @@ "access.form.webhook_default_data.errmsg.json_invalid": "请输入有效的 JSON 格式字符串", "access.form.webhook_default_data_for_deployment.label": "默认的 Webhook 部署证书回调数据(可选)", "access.form.webhook_default_data_for_deployment.placeholder": "请输入默认的 Webhook 回调数据", - "access.form.webhook_default_data_for_deployment.guide": "小贴士:回调数据是一个 JSON 格式的数据。

          其中值支持模板变量,将在被发送到指定的 Webhook URL 时被替换为实际值;其他内容将保持原样。支持的变量:
          1. ${DOMAIN}:证书的主域名(即 CommonName)。
          2. ${DOMAINS}:证书的多域名列表(即 SubjectAltNames)。
          3. ${CERTIFICATE}:证书文件 PEM 格式内容。
          4. ${SERVER_CERTIFICATE}:证书文件(仅含服务器证书)PEM 格式内容。
          5. ${INTERMEDIA_CERTIFICATE}:证书文件(仅含中间证书)PEM 格式内容。
          6. ${PRIVATE_KEY}:私钥文件 PEM 格式内容。

          当请求谓词为 GET 时,回调数据将作为查询参数;否则,回调数据将按照请求标头中 Content-Type 所指示的格式进行编码。支持的格式:
          1. application/json(默认)。
          2. application/x-www-form-urlencoded:不支持嵌套数据。
          3. multipart/form-data:不支持嵌套数据。
          4. ", + "access.form.webhook_default_data_for_deployment.guide": "小贴士:回调数据是一个 JSON 格式的数据。

            其中值支持模板变量,将在被发送到指定的 Webhook URL 时被替换为实际值;其他内容将保持原样。支持的变量:
            1. ${DOMAIN}:证书的主域名(即 CommonName)。
            2. ${DOMAINS}:证书的多域名列表(即 SubjectAltNames)。
            3. ${CERTIFICATE}:证书文件 PEM 格式内容。
            4. ${SERVER_CERTIFICATE}:证书文件(仅含服务器证书)PEM 格式内容。
            5. ${INTERMEDIA_CERTIFICATE}:证书文件(仅含中间证书)PEM 格式内容。
            6. ${PRIVATE_KEY}:私钥文件 PEM 格式内容。

            当请求谓词为 GET 时,回调数据将作为查询参数;否则,回调数据将按照请求标头中 Content-Type 所指示的格式进行编码。支持的格式:
            1. application/json(默认)。
            2. application/x-www-form-urlencoded:不支持嵌套数据。
            3. multipart/form-data:不支持嵌套数据。
            4. ", "access.form.webhook_default_data_for_notification.label": "默认的 Webhook 推送通知回调数据(可选)", "access.form.webhook_default_data_for_notification.placeholder": "请输入默认的 Webhook 回调数据", - "access.form.webhook_default_data_for_notification.guide": "小贴士:回调数据是一个 JSON 格式的数据。

              其中值支持模板变量,将在被发送到指定的 Webhook URL 时被替换为实际值;其他内容将保持原样。支持的变量:
              1. ${SUBJECT}:通知主题。
              2. ${MESSAGE}:通知内容。

              当请求谓词为 GET 时,回调数据将作为查询参数;否则,回调数据将按照请求标头中 Content-Type 所指示的格式进行编码。支持的格式:
              1. application/json(默认)。
              2. application/x-www-form-urlencoded:不支持嵌套数据。
              3. multipart/form-data:不支持嵌套数据。
              4. ", + "access.form.webhook_default_data_for_notification.guide": "小贴士:回调数据是一个 JSON 格式的数据。

                其中值支持模板变量,将在被发送到指定的 Webhook URL 时被替换为实际值;其他内容将保持原样。支持的变量:
                1. ${SUBJECT}:通知主题。
                2. ${MESSAGE}:通知内容。

                当请求谓词为 GET 时,回调数据将作为查询参数;否则,回调数据将按照请求标头中 Content-Type 所指示的格式进行编码。支持的格式:
                1. application/json(默认)。
                2. application/x-www-form-urlencoded:不支持嵌套数据。
                3. multipart/form-data:不支持嵌套数据。
                4. ", "access.form.webhook_preset_data.button": "使用预设模板", "access.form.webhook_preset_data.option.bark.label": "Bark", "access.form.webhook_preset_data.option.gotify.label": "Gotify", diff --git a/ui/src/i18n/locales/zh/nls.certificate.json b/ui/src/i18n/locales/zh/nls.certificate.json index e174c73e3..a86621be5 100644 --- a/ui/src/i18n/locales/zh/nls.certificate.json +++ b/ui/src/i18n/locales/zh/nls.certificate.json @@ -14,7 +14,7 @@ "certificate.props.subject_alt_names": "名称", "certificate.props.validity": "有效期限", "certificate.props.validity.left_days": "{{left}} / {{total}} 天", - "certificate.props.validity.less_than_a_day": "不足 1 天", + "certificate.props.validity.less_than_a_day": "≤1 / {{total}} 天", "certificate.props.validity.expired": "已过期", "certificate.props.validity.expiration": "{{date}} 过期", "certificate.props.validity.filter.all": "全部", diff --git a/ui/src/i18n/locales/zh/nls.dashboard.json b/ui/src/i18n/locales/zh/nls.dashboard.json index 30eb59725..f3c34cb31 100644 --- a/ui/src/i18n/locales/zh/nls.dashboard.json +++ b/ui/src/i18n/locales/zh/nls.dashboard.json @@ -12,7 +12,6 @@ "dashboard.quick_actions": "快捷操作", "dashboard.quick_actions.create_workflow": "新建工作流", - "dashboard.quick_actions.change_login_password": "修改登录密码", - "dashboard.quick_actions.cofigure_notification": "消息推送设置", - "dashboard.quick_actions.configure_ca": "证书颁发机构配置" + "dashboard.quick_actions.change_password": "修改登录密码", + "dashboard.quick_actions.configure_ca": "配置证书颁发机构" } diff --git a/ui/src/i18n/locales/zh/nls.settings.json b/ui/src/i18n/locales/zh/nls.settings.json index aa2b8ffde..bec04b3ea 100644 --- a/ui/src/i18n/locales/zh/nls.settings.json +++ b/ui/src/i18n/locales/zh/nls.settings.json @@ -51,7 +51,7 @@ "settings.sslprovider.form.sslcom_eab_hmac_key.tooltip": "这是什么?请参阅 https://www.ssl.com/how-to/generate-acme-credentials-for-reseller-customers/", "settings.persistence.tab": "数据持久化", - "settings.persistence.title": "设置定期清理数据", + "settings.persistence.title": "定期清理数据", "settings.persistence.form.workflow_runs_max_days.label": "工作流执行历史保留天数", "settings.persistence.form.workflow_runs_max_days.placeholder": "请输入执行历史保留天数", "settings.persistence.form.workflow_runs_max_days.unit": "天", diff --git a/ui/src/i18n/locales/zh/nls.workflow.nodes.json b/ui/src/i18n/locales/zh/nls.workflow.nodes.json index 3a7cddc34..95295eef8 100644 --- a/ui/src/i18n/locales/zh/nls.workflow.nodes.json +++ b/ui/src/i18n/locales/zh/nls.workflow.nodes.json @@ -924,7 +924,7 @@ "workflow_node.deploy.form.webhook_data.label": "Webhook 回调数据(可选)", "workflow_node.deploy.form.webhook_data.placeholder": "请输入 Webhook 回调数据以覆盖默认值", "workflow_node.deploy.form.webhook_data.tooltip": "不填写时,将使用所选部署目标授权的默认 Webhook 回调数据。", - "workflow_node.deploy.form.webhook_data.guide": "
                  支持的变量:
                  1. ${DOMAIN}:证书的主域名(即 CommonName)。
                  2. ${DOMAINS}:证书的多域名列表(即 SubjectAltNames)。
                  3. ${CERTIFICATE}:证书文件 PEM 格式内容。
                  4. ${SERVER_CERTIFICATE}:证书文件(仅含服务器证书)PEM 格式内容。
                  5. ${INTERMEDIA_CERTIFICATE}:证书文件(仅含中间证书)PEM 格式内容。
                  6. ${PRIVATE_KEY}:私钥文件 PEM 格式内容。

                  其他注意事项请前往授权管理页面查看。", + "workflow_node.deploy.form.webhook_data.guide": "
                  支持的变量:
                  1. ${DOMAIN}:证书的主域名(即 CommonName)。
                  2. ${DOMAINS}:证书的多域名列表(即 SubjectAltNames)。
                  3. ${CERTIFICATE}:证书文件 PEM 格式内容。
                  4. ${SERVER_CERTIFICATE}:证书文件(仅含服务器证书)PEM 格式内容。
                  5. ${INTERMEDIA_CERTIFICATE}:证书文件(仅含中间证书)PEM 格式内容。
                  6. ${PRIVATE_KEY}:私钥文件 PEM 格式内容。

                  其他注意事项请前往授权管理页面查看。", "workflow_node.deploy.form.webhook_data.errmsg.json_invalid": "请输入有效的 JSON 格式字符串", "workflow_node.deploy.form.strategy_config.label": "执行策略", "workflow_node.deploy.form.skip_on_last_succeeded.label": "重复部署", @@ -981,7 +981,7 @@ "workflow_node.notify.form.webhook_data.label": "Webhook 回调数据(可选)", "workflow_node.notify.form.webhook_data.placeholder": "请输入 Webhook 回调数据以覆盖默认值", "workflow_node.notify.form.webhook_data.tooltip": "不填写时,将使用所选部署目标授权的默认 Webhook 回调数据。", - "workflow_node.notify.form.webhook_data.guide": "
                  支持的变量:
                  1. ${SUBJECT}:通知主题。
                  2. ${MESSAGE}:通知内容。

                  其他注意事项请前往授权管理页面查看。", + "workflow_node.notify.form.webhook_data.guide": "
                  支持的变量:
                  1. ${SUBJECT}:通知主题。
                  2. ${MESSAGE}:通知内容。

                  其他注意事项请前往授权管理页面查看。", "workflow_node.notify.form.webhook_data.errmsg.json_invalid": "请输入有效的 JSON 格式字符串", "workflow_node.notify.form.strategy_config.label": "执行策略", "workflow_node.notify.form.skip_on_all_prev_skipped.label": "静默行为", diff --git a/ui/src/pages/accesses/AccessList.tsx b/ui/src/pages/accesses/AccessList.tsx index c73ac36d9..49fffc139 100644 --- a/ui/src/pages/accesses/AccessList.tsx +++ b/ui/src/pages/accesses/AccessList.tsx @@ -30,7 +30,7 @@ const AccessList = () => { const [filters, setFilters] = useState>(() => { return { - usage: "both-dns-hosting" satisfies AccessUsageProp, + usage: "dns-hosting" satisfies AccessUsageProp, keyword: searchParams.get("keyword"), }; }); @@ -51,7 +51,7 @@ const AccessList = () => { render: (_, record) => { return (
                  - +
                  {record.name || "\u00A0"} @@ -144,11 +144,11 @@ const AccessList = () => { .filter((e) => { const provider = accessProvidersMap.get(e.provider); switch (filters["usage"] as AccessUsageProp) { - case "both-dns-hosting": + case "dns-hosting": return !e.reserve && (provider?.usages?.includes(ACCESS_USAGES.DNS) || provider?.usages?.includes(ACCESS_USAGES.HOSTING)); - case "ca-only": + case "ca": return e.reserve === "ca" && provider?.usages?.includes(ACCESS_USAGES.CA); - case "notification-only": + case "notification": return e.reserve === "notification" && provider?.usages?.includes(ACCESS_USAGES.NOTIFICATION); } }); @@ -262,16 +262,16 @@ const AccessList = () => { activeKey={filters["usage"] as string} items={[ { - key: "both-dns-hosting", - label: t("access.props.usage.both_dns_hosting"), + key: "dns-hosting", + label: t("access.props.usage.dns_hosting"), }, { - key: "ca-only", - label: t("access.props.usage.ca_only"), + key: "ca", + label: t("access.props.usage.ca"), }, { - key: "notification-only", - label: t("access.props.usage.notification_only"), + key: "notification", + label: t("access.props.usage.notification"), }, ]} size="large" diff --git a/ui/src/pages/certificates/CertificateList.tsx b/ui/src/pages/certificates/CertificateList.tsx index ad2f2467a..5b6621d5e 100644 --- a/ui/src/pages/certificates/CertificateList.tsx +++ b/ui/src/pages/certificates/CertificateList.tsx @@ -65,15 +65,12 @@ const CertificateList = () => {   {t("certificate.props.validity.left_days", { left: leftDays, total })} - ) : leftDays >= 1 ? ( - -   - {t("certificate.props.validity.left_days", { left: leftDays, total })} - ) : (   - {t("certificate.props.validity.less_than_a_day")} + {leftDays >= 1 + ? t("certificate.props.validity.left_days", { left: leftDays, total }) + : t("certificate.props.validity.less_than_a_day", { total })} ) ) : ( diff --git a/ui/src/pages/dashboard/Dashboard.tsx b/ui/src/pages/dashboard/Dashboard.tsx index 42b8e4841..7c814cd51 100644 --- a/ui/src/pages/dashboard/Dashboard.tsx +++ b/ui/src/pages/dashboard/Dashboard.tsx @@ -42,18 +42,18 @@ const Dashboard = () => { - - + +
                  - +