diff --git a/src/components/wizard/RemoteConfigStep.tsx b/src/components/wizard/RemoteConfigStep.tsx index 3102816..cd53a1e 100644 --- a/src/components/wizard/RemoteConfigStep.tsx +++ b/src/components/wizard/RemoteConfigStep.tsx @@ -9,6 +9,7 @@ import { BACKEND_REGISTRY } from '../../schemas/registry'; import { BACKEND_SCHEMAS } from '../../schemas'; import { FieldRenderer } from '../ui/FieldRenderer'; import { AzureAuthToggle } from './AzureAuthToggle'; +import { SftpAuthToggle } from './SftpAuthToggle'; import type { FieldError } from 'react-hook-form'; export function RemoteConfigStep() { @@ -42,9 +43,13 @@ export function RemoteConfigStep() { }; const backendLabel: Record, string> = { - azureblob: 'Azure Blob Storage', - s3: 'Amazon S3', + azureblob: 'Azure Blob Storage', + s3: 'Amazon S3', 's3-compatible': 'S3-Compatible Storage', + onedrive: 'OneDrive', + sftp: 'SFTP', + gcs: 'Google Cloud Storage', + b2: 'Backblaze B2', }; return ( @@ -68,8 +73,30 @@ export function RemoteConfigStep() { }} /> + ) : backendType === 'sftp' ? ( + <> + {/* host and user via FieldRenderer */} + f.key === 'host')!} + register={register} + error={errors.host as FieldError | undefined} + /> + f.key === 'user')!} + register={register} + error={errors.user as FieldError | undefined} + /> + {/* Auth toggle handles pass + key_pem — both always registered */} + + ) : ( - /* S3 and S3-compatible: full registry loop — FieldRenderer handles provider hiding */ + /* All others (onedrive, gcs, b2, s3, s3-compatible): full registry loop */ BACKEND_REGISTRY[backendType].fields.map(field => (