mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-04 07:22:34 +00:00
#591 - notification-channels
This commit is contained in:
@ -66,7 +66,7 @@ export default function ConnectStorageProvider({
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogTrigger asChild>{children}</DialogTrigger>
|
||||
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-xl">
|
||||
<DialogContent className="max-h-screen overflow-y-auto sm:max-w-2xl">
|
||||
<DialogHeader>
|
||||
<DialogTitle>Connect to storage provider</DialogTitle>
|
||||
<DialogDescription className="sr-only">Connect to a new storage provider</DialogDescription>
|
||||
@ -109,21 +109,27 @@ export default function ConnectStorageProvider({
|
||||
/>
|
||||
<InputError message={form.errors.name} />
|
||||
</FormField>
|
||||
{page.props.configs.storage_providers_custom_fields[form.data.provider]?.map((item: string) => (
|
||||
<FormField key={item}>
|
||||
<Label htmlFor={item} className="capitalize">
|
||||
{item.replaceAll('_', ' ')}
|
||||
</Label>
|
||||
<Input
|
||||
type="text"
|
||||
name={item}
|
||||
id={item}
|
||||
value={(form.data[item as keyof StorageProviderForm] as string) ?? ''}
|
||||
onChange={(e) => form.setData(item as keyof StorageProviderForm, e.target.value)}
|
||||
/>
|
||||
<InputError message={form.errors[item as keyof StorageProviderForm]} />
|
||||
</FormField>
|
||||
))}
|
||||
<div
|
||||
className={
|
||||
page.props.configs.storage_providers_custom_fields[form.data.provider].length > 1 ? 'grid grid-cols-2 items-start gap-6' : ''
|
||||
}
|
||||
>
|
||||
{page.props.configs.storage_providers_custom_fields[form.data.provider]?.map((item: string) => (
|
||||
<FormField key={item}>
|
||||
<Label htmlFor={item} className="capitalize">
|
||||
{item.replaceAll('_', ' ')}
|
||||
</Label>
|
||||
<Input
|
||||
type="text"
|
||||
name={item}
|
||||
id={item}
|
||||
value={(form.data[item as keyof StorageProviderForm] as string) ?? ''}
|
||||
onChange={(e) => form.setData(item as keyof StorageProviderForm, e.target.value)}
|
||||
/>
|
||||
<InputError message={form.errors[item as keyof StorageProviderForm]} />
|
||||
</FormField>
|
||||
))}
|
||||
</div>
|
||||
<FormField>
|
||||
<div className="flex items-center space-x-3">
|
||||
<Checkbox id="global" name="global" checked={form.data.global} onClick={() => form.setData('global', !form.data.global)} />
|
||||
|
Reference in New Issue
Block a user