feat(quick-260914-m97): Feld Fehlermeldungen an im SMTP-Formular — settings-api, Formular, i18n settings.smtp
- SmtpConfig.bugReportRecipient (string | null) und SaveSmtpPayload.bugReportRecipient (null loescht, fehlend bewahrt) - Eingabefeld type=email hinter der Absenderadresse mit Hinweistext; Payload traegt immer trim() || null - Zwei Komponententests: Vorbelegung aus GET, PUT-Payload mit Wert bzw. null - i18n settings.smtp.bugReportRecipient / bugReportRecipientHelp in de und en Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018N9CD3ebPKm1b32bPpBknY
This commit is contained in:
@@ -23,6 +23,7 @@ interface FormState {
|
||||
username: string;
|
||||
password: string; // T-07-17: always starts blank; never pre-filled from server
|
||||
fromAddress: string;
|
||||
bugReportRecipient: string; // quick-260914-m97: Postfach fuer den Fehler-melden-Knopf
|
||||
}
|
||||
|
||||
const DEFAULT_FORM: FormState = {
|
||||
@@ -32,6 +33,7 @@ const DEFAULT_FORM: FormState = {
|
||||
username: '',
|
||||
password: '',
|
||||
fromAddress: '',
|
||||
bugReportRecipient: '',
|
||||
};
|
||||
|
||||
type TestFeedback =
|
||||
@@ -70,6 +72,7 @@ export function SmtpSettingsForm() {
|
||||
username: config.username ?? '',
|
||||
password: '', // T-07-17: never pre-filled
|
||||
fromAddress: config.fromAddress,
|
||||
bugReportRecipient: config.bugReportRecipient ?? '',
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -95,6 +98,8 @@ export function SmtpSettingsForm() {
|
||||
if (form.username.trim()) payload.username = form.username.trim();
|
||||
// T-07-17: only include password when user has typed a new one
|
||||
if (form.password) payload.password = form.password;
|
||||
// quick-260914-m97: das Formular ist der einzige Klient — leer bedeutet loeschen (null)
|
||||
payload.bugReportRecipient = form.bugReportRecipient.trim() || null;
|
||||
return payload;
|
||||
};
|
||||
|
||||
@@ -300,6 +305,26 @@ export function SmtpSettingsForm() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Fehlermeldungen an (quick-260914-m97) */}
|
||||
<div>
|
||||
<label htmlFor="smtp-bug-report-recipient" className={labelClass}>
|
||||
{t('smtp.bugReportRecipient')}
|
||||
</label>
|
||||
<input
|
||||
id="smtp-bug-report-recipient"
|
||||
type="email"
|
||||
placeholder="fehler@example.com"
|
||||
className={inputClass}
|
||||
value={form.bugReportRecipient}
|
||||
onChange={(e) =>
|
||||
setForm((prev) => ({ ...prev, bugReportRecipient: e.target.value }))
|
||||
}
|
||||
/>
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
{t('smtp.bugReportRecipientHelp')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Test-E-Mail Empfänger */}
|
||||
<div>
|
||||
<label htmlFor="smtp-test-to" className={labelClass}>
|
||||
|
||||
Reference in New Issue
Block a user