force deploy and custom nameservers
This commit is contained in:
@@ -13,8 +13,10 @@ export type Domain = {
|
||||
phaseSuccess?: boolean;
|
||||
lastDeployedAt?: string;
|
||||
variables?: string;
|
||||
nameservers?: string;
|
||||
group?: string;
|
||||
enabled?: boolean;
|
||||
deployed?: boolean;
|
||||
created?: string;
|
||||
updated?: string;
|
||||
deleted?: string;
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const version = "Certimate v0.1.7";
|
||||
export const version = "Certimate v0.1.8";
|
||||
|
||||
@@ -80,6 +80,7 @@ const Edit = () => {
|
||||
}),
|
||||
variables: z.string().optional(),
|
||||
group: z.string().optional(),
|
||||
nameservers: z.string().optional(),
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
@@ -93,6 +94,7 @@ const Edit = () => {
|
||||
targetType: "",
|
||||
variables: "",
|
||||
group: "",
|
||||
nameservers: "",
|
||||
},
|
||||
});
|
||||
|
||||
@@ -107,6 +109,7 @@ const Edit = () => {
|
||||
targetType: domain.targetType,
|
||||
variables: domain.variables,
|
||||
group: domain.group,
|
||||
nameservers: domain.nameservers,
|
||||
});
|
||||
}
|
||||
}, [domain, form]);
|
||||
@@ -153,6 +156,7 @@ const Edit = () => {
|
||||
targetAccess: targetAccess,
|
||||
targetType: data.targetType,
|
||||
variables: data.variables,
|
||||
nameservers: data.nameservers,
|
||||
};
|
||||
|
||||
try {
|
||||
@@ -515,6 +519,26 @@ const Edit = () => {
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="nameservers"
|
||||
render={({ field }) => (
|
||||
<FormItem hidden={tab != "advance"}>
|
||||
<FormLabel>域名服务器</FormLabel>
|
||||
<FormControl>
|
||||
<Textarea
|
||||
placeholder={`自定义域名服务器,多个用分号隔开,如:\n8.8.8.8;\n8.8.4.4;`}
|
||||
{...field}
|
||||
className="placeholder:whitespace-pre-wrap"
|
||||
/>
|
||||
</FormControl>
|
||||
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
<div className="flex justify-end">
|
||||
<Button type="submit">保存</Button>
|
||||
</div>
|
||||
|
||||
@@ -149,6 +149,10 @@ const Home = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleForceClick = async (domain: Domain) => {
|
||||
await handleRightNowClick({ ...domain, deployed: false });
|
||||
};
|
||||
|
||||
const handleDownloadClick = async (domain: Domain) => {
|
||||
const zipName = `${domain.id}-${domain.domain}.zip`;
|
||||
const files: CustomFile[] = [
|
||||
@@ -291,6 +295,23 @@ const Home = () => {
|
||||
</Button>
|
||||
</Show>
|
||||
|
||||
<Show
|
||||
when={
|
||||
(domain.enabled ? true : false) && domain.deployed
|
||||
? true
|
||||
: false
|
||||
}
|
||||
>
|
||||
<Separator orientation="vertical" className="h-4 mx-2" />
|
||||
<Button
|
||||
variant={"link"}
|
||||
className="p-0"
|
||||
onClick={() => handleForceClick(domain)}
|
||||
>
|
||||
强行部署
|
||||
</Button>
|
||||
</Show>
|
||||
|
||||
<Show when={domain.expiredAt ? true : false}>
|
||||
<Separator orientation="vertical" className="h-4 mx-2" />
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user