feat: add ucloud ucdn deployer

This commit is contained in:
Fu Diwei
2025-01-14 21:31:10 +08:00
parent e430109228
commit e87ac72281
23 changed files with 559 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import { memo, useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { Avatar, Space, Typography } from "antd";
import { Avatar, Flex, Typography } from "antd";
import { produce } from "immer";
import { deployProvidersMap } from "@/domain/provider";
@@ -45,10 +45,10 @@ const DeployNode = ({ node, disabled }: DeployNodeProps) => {
const config = (node.config as WorkflowNodeConfigForDeploy) ?? {};
const provider = deployProvidersMap.get(config.provider);
return (
<Space className="max-w-full">
<Flex className="size-full overflow-hidden" align="center" gap={8}>
<Avatar src={provider?.icon} size="small" />
<Typography.Text className="truncate">{t(provider?.name ?? "")}</Typography.Text>
</Space>
<Typography.Text className="flex-1 truncate">{t(provider?.name ?? "")}</Typography.Text>
</Flex>
);
}, [node]);