mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: add UI selection
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
|
import { Checkbox } from "@/components/ui/checkbox";
|
||||||
import {
|
import {
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
@@ -11,6 +12,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
Form,
|
Form,
|
||||||
FormControl,
|
FormControl,
|
||||||
|
FormDescription,
|
||||||
FormField,
|
FormField,
|
||||||
FormItem,
|
FormItem,
|
||||||
FormLabel,
|
FormLabel,
|
||||||
@@ -30,6 +32,7 @@ const deleteComposeSchema = z.object({
|
|||||||
projectName: z.string().min(1, {
|
projectName: z.string().min(1, {
|
||||||
message: "Compose name is required",
|
message: "Compose name is required",
|
||||||
}),
|
}),
|
||||||
|
deleteVolumes: z.boolean(),
|
||||||
});
|
});
|
||||||
|
|
||||||
type DeleteCompose = z.infer<typeof deleteComposeSchema>;
|
type DeleteCompose = z.infer<typeof deleteComposeSchema>;
|
||||||
@@ -49,6 +52,7 @@ export const DeleteCompose = ({ composeId }: Props) => {
|
|||||||
const form = useForm<DeleteCompose>({
|
const form = useForm<DeleteCompose>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
projectName: "",
|
projectName: "",
|
||||||
|
deleteVolumes: false,
|
||||||
},
|
},
|
||||||
resolver: zodResolver(deleteComposeSchema),
|
resolver: zodResolver(deleteComposeSchema),
|
||||||
});
|
});
|
||||||
@@ -114,6 +118,27 @@ export const DeleteCompose = ({ composeId }: Props) => {
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="deleteVolumes"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<div className="flex items-center">
|
||||||
|
<FormControl>
|
||||||
|
<Checkbox
|
||||||
|
checked={field.value}
|
||||||
|
onCheckedChange={field.onChange}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
|
||||||
|
<FormLabel className="ml-2">
|
||||||
|
Delete volumes associated with this compose
|
||||||
|
</FormLabel>
|
||||||
|
</div>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user