Merge branch 'main' into feat/notify

This commit is contained in:
yoan
2024-09-22 20:07:56 +08:00
10 changed files with 756 additions and 30 deletions

File diff suppressed because one or more lines are too long

2
ui/dist/index.html vendored
View File

@@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Certimate - Your Trusted SSL Automation Partner</title>
<script type="module" crossorigin src="/assets/index-BLKGMHXS.js"></script>
<script type="module" crossorigin src="/assets/index-Cum7econ.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BmYeXvQX.css">
</head>
<body class="bg-background">

View File

@@ -56,13 +56,22 @@ const AccessSSHForm = ({
const originGroup = data ? (data.group ? data.group : "") : "";
const domainReg = /^(?:\*\.)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$/;
const ipReg =
/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
const formSchema = z.object({
id: z.string().optional(),
name: z.string().min(1).max(64),
configType: accessFormType,
host: z.string().ip({
message: "请输入合法的IP地址",
}),
host: z.string().refine(
(str) => {
return ipReg.test(str) || domainReg.test(str);
},
{
message: "请输入正确的域名或IP",
}
),
group: z.string().optional(),
port: z.string().min(1).max(5),
username: z.string().min(1).max(64),
@@ -316,7 +325,7 @@ const AccessSSHForm = ({
name="host"
render={({ field }) => (
<FormItem className="grow">
<FormLabel>IP</FormLabel>
<FormLabel>HOST</FormLabel>
<FormControl>
<Input placeholder="请输入Host" {...field} />
</FormControl>

View File

@@ -22,7 +22,7 @@ const DeployState = ({ deployment }: DeployStateProps) => {
return (
<>
{deployment.phase === "deploy" && deployment.phaseSuccess ? (
{(deployment.phase === "deploy" && deployment.phaseSuccess) || deployment.wholeSuccess ? (
<CircleCheck size={16} className="text-green-700" />
) : (
<>

View File

@@ -10,6 +10,7 @@ export type Deployment = {
};
phase: Pahse;
phaseSuccess: boolean;
wholeSuccess: boolean;
deployedAt: string;
created: string;
updated: string;

View File

@@ -1 +1 @@
export const version = "Certimate v0.1.9";
export const version = "Certimate v0.1.10";