On hover on the Zerobyte version in the sidebar A card will appear to show the versions of the binaries (restic, rclone, shoutrrr)
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import type { UseFormReturn } from "react-hook-form";
|
|
import { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "~/client/components/ui/form";
|
|
import { Input } from "~/client/components/ui/input";
|
|
import type { NotificationFormValues } from "../create-notification-form";
|
|
|
|
type Props = {
|
|
form: UseFormReturn<NotificationFormValues>;
|
|
};
|
|
|
|
export const CustomForm = ({ form }: Props) => {
|
|
return (
|
|
<FormField
|
|
control={form.control}
|
|
name="shoutrrrUrl"
|
|
render={({ field }) => (
|
|
<FormItem>
|
|
<FormLabel>Shoutrrr URL</FormLabel>
|
|
<FormControl>
|
|
<Input
|
|
{...field}
|
|
placeholder="smtp://user:pass@smtp.gmail.com:587/?from=you@gmail.com&to=recipient@example.com"
|
|
/>
|
|
</FormControl>
|
|
<FormDescription>
|
|
Direct Shoutrrr URL for power users. See
|
|
<a
|
|
href="https://shoutrrr.nickfedor.com/latest/services/overview/"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="text-strong-accent hover:underline"
|
|
>
|
|
Shoutrrr documentation
|
|
</a>
|
|
for supported services and URL formats.
|
|
</FormDescription>
|
|
<FormMessage />
|
|
</FormItem>
|
|
)}
|
|
/>
|
|
);
|
|
};
|