feat(07): add CSV format help text and Exchange 401 diagnostic hints
- CSV import dialog shows format line + example before mode selection - Exchange connection test: on 401, inline hint lists common causes (wrong credentials, domain format, username prefix, O365 not supported) - Both de/en translations updated Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -111,6 +111,11 @@ export function CsvImportButton({ onImported }: CsvImportButtonProps) {
|
||||
{/* Import mode inline dialog (below button, per UI-SPEC) */}
|
||||
{showDialog && selectedFile && (
|
||||
<div className="absolute right-0 top-10 z-30 w-80 rounded border border-border bg-card p-4 shadow-md">
|
||||
<div className="mb-3 rounded bg-muted/50 px-3 py-2 text-xs text-muted-foreground space-y-0.5">
|
||||
<p>{t('csvFormatHelp')}</p>
|
||||
<p className="font-mono">{t('csvFormatExample')}</p>
|
||||
</div>
|
||||
|
||||
<p className="text-sm font-medium text-foreground mb-3">
|
||||
{t('importMode')}
|
||||
</p>
|
||||
|
||||
+30
-14
@@ -507,20 +507,36 @@ export function InboxConfigForm() {
|
||||
|
||||
{/* Inline test feedback */}
|
||||
{testResult !== null && (
|
||||
<p
|
||||
className="text-sm"
|
||||
style={{
|
||||
color: testResult.success
|
||||
? 'oklch(0.40 0.15 148)'
|
||||
: 'var(--destructive)',
|
||||
}}
|
||||
>
|
||||
{testResult.success
|
||||
? t('form.testSuccess')
|
||||
: t('form.testFailed', {
|
||||
error: testResult.message ?? 'Unbekannter Fehler',
|
||||
})}
|
||||
</p>
|
||||
<div className="space-y-1">
|
||||
<p
|
||||
className="text-sm"
|
||||
style={{
|
||||
color: testResult.success
|
||||
? 'oklch(0.40 0.15 148)'
|
||||
: 'var(--destructive)',
|
||||
}}
|
||||
>
|
||||
{testResult.success
|
||||
? t('form.testSuccess')
|
||||
: t('form.testFailed', {
|
||||
error: testResult.message ?? 'Unbekannter Fehler',
|
||||
})}
|
||||
</p>
|
||||
{/* 401 hint for Exchange */}
|
||||
{!testResult.success &&
|
||||
form.protocol === 'exchange' &&
|
||||
testResult.message?.includes('401') && (
|
||||
<div className="rounded bg-muted/50 px-3 py-2 text-xs text-muted-foreground space-y-1">
|
||||
<p className="font-medium">{t('form.exchangeAuthHint')}</p>
|
||||
<ul className="list-disc list-inside space-y-0.5">
|
||||
<li>{t('form.exchangeAuthHint1')}</li>
|
||||
<li>{t('form.exchangeAuthHint2')}</li>
|
||||
<li>{t('form.exchangeAuthHint3')}</li>
|
||||
<li>{t('form.exchangeAuthHint4')}</li>
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Inline save feedback */}
|
||||
|
||||
Reference in New Issue
Block a user