diff --git a/src/components/wizard/AzureAuthToggle.tsx b/src/components/wizard/AzureAuthToggle.tsx index 845d0fa..321995a 100644 --- a/src/components/wizard/AzureAuthToggle.tsx +++ b/src/components/wizard/AzureAuthToggle.tsx @@ -1,6 +1,7 @@ import { useState } from 'react'; import type { UseFormRegister, FieldError } from 'react-hook-form'; import { PasswordField } from '../ui/PasswordField'; +import { BACKEND_REGISTRY } from '../../schemas/registry'; type AuthMethod = 'sas' | 'key'; @@ -15,6 +16,9 @@ interface AzureAuthToggleProps { export function AzureAuthToggle({ register, errors }: AzureAuthToggleProps) { const [authMethod, setAuthMethod] = useState('sas'); + const sasUrlTooltip = BACKEND_REGISTRY.azureblob.fields.find(f => f.key === 'sas_url')?.tooltipText; + const keyTooltip = BACKEND_REGISTRY.azureblob.fields.find(f => f.key === 'key')?.tooltipText; + return (
{/* Segmented control */} @@ -54,6 +58,7 @@ export function AzureAuthToggle({ register, errors }: AzureAuthToggleProps) { registration={register('sas_url')} placeholder="https://mystorageaccount.blob.core.windows.net/?sv=..." helpText="Full SAS URL including account and container" + tooltipText={sasUrlTooltip} />
@@ -63,6 +68,7 @@ export function AzureAuthToggle({ register, errors }: AzureAuthToggleProps) { error={errors.key} registration={register('key')} helpText="Base64-encoded storage account key" + tooltipText={keyTooltip} />
diff --git a/src/components/wizard/SftpAuthToggle.tsx b/src/components/wizard/SftpAuthToggle.tsx index 5a4fbd2..2af5184 100644 --- a/src/components/wizard/SftpAuthToggle.tsx +++ b/src/components/wizard/SftpAuthToggle.tsx @@ -14,9 +14,29 @@ interface SftpAuthToggleProps { export function SftpAuthToggle({ register, errors }: SftpAuthToggleProps) { const [authMethod, setAuthMethod] = useState('password'); + const [showAuthTip, setShowAuthTip] = useState(false); return (
+ {/* Auth method label + ⓘ button */} +
+ Authentication Method + +
+ {showAuthTip && ( +

+ Password auth sends your password to the SFTP server on each connection. + Key-based auth uses a private key (more secure — the server only stores your public key). + Paste the full private key PEM content (including the -----BEGIN/END----- lines) if using key-based auth. +

+ )} {/* Segmented control */}