Some checks failed
Release Workflow / determine-release-type (push) Has been cancelled
Release Workflow / checks (push) Has been cancelled
Release Workflow / e2e-tests (push) Has been cancelled
Release Workflow / build-images (push) Has been cancelled
Release Workflow / publish-release (push) Has been cancelled
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "~/client/components/ui/form";
|
|
import { Textarea } from "~/client/components/ui/textarea";
|
|
import type { UseFormReturn } from "react-hook-form";
|
|
import type { InternalFormValues } from "./types";
|
|
|
|
type AdvancedSectionProps = {
|
|
form: UseFormReturn<InternalFormValues>;
|
|
};
|
|
|
|
export const AdvancedSection = ({ form }: AdvancedSectionProps) => {
|
|
return (
|
|
<FormField
|
|
control={form.control}
|
|
name="customResticParamsText"
|
|
render={({ field }) => (
|
|
<FormItem>
|
|
<FormLabel>Custom restic parameters</FormLabel>
|
|
<FormControl>
|
|
<Textarea
|
|
{...field}
|
|
placeholder="--exclude-larger-than 500M --no-scan --read-concurrency 8"
|
|
className="font-mono text-sm min-h-24"
|
|
/>
|
|
</FormControl>
|
|
<FormDescription>
|
|
Advanced: enter one restic flag per line (e.g.{" "}
|
|
<code className="bg-muted px-1 rounded">--exclude-larger-than 500M</code>). Only the supported flag list is
|
|
accepted.
|
|
</FormDescription>
|
|
<FormMessage />
|
|
</FormItem>
|
|
)}
|
|
/>
|
|
);
|
|
};
|