EmailProviders-Settings: Input "Bezeichnung im UI" für customerEmailLabel
Das customerEmailLabel-Feld existierte im Backend (samt Update-Logik und Public-Endpoint), war aber im UI nicht erreichbar – das Label wurde immer nur aus der Domain abgeleitet. Neuer optionaler Input "Bezeichnung im UI" unter dem Domain-Hinweis. Leer = automatisch aus Domain ableiten (bisheriges Verhalten), ausgefüllt = überschreibt die Ableitung (z.B. "interne Kunden Email Adressen" als Tab-Label). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,11 @@ interface ProviderFormData {
|
|||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
domain: string;
|
domain: string;
|
||||||
|
// Optional: Bezeichnung im UI. Wenn leer, wird sie aus der Domain abgeleitet
|
||||||
|
// (z.B. "stressfrei-wechseln.de" → "Stressfrei-Wechseln"). Hier kann ein
|
||||||
|
// freier Override gesetzt werden (z.B. "interne Kunden Email Adressen"),
|
||||||
|
// ohne die echte Domain zu ändern.
|
||||||
|
customerEmailLabel: string;
|
||||||
defaultForwardEmail: string;
|
defaultForwardEmail: string;
|
||||||
// Verschlüsselungs-Einstellungen
|
// Verschlüsselungs-Einstellungen
|
||||||
imapEncryption: MailEncryption;
|
imapEncryption: MailEncryption;
|
||||||
@@ -51,6 +56,7 @@ const emptyForm: ProviderFormData = {
|
|||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: '',
|
||||||
domain: 'stressfrei-wechseln.de',
|
domain: 'stressfrei-wechseln.de',
|
||||||
|
customerEmailLabel: '',
|
||||||
defaultForwardEmail: '',
|
defaultForwardEmail: '',
|
||||||
imapEncryption: 'SSL',
|
imapEncryption: 'SSL',
|
||||||
smtpEncryption: 'SSL',
|
smtpEncryption: 'SSL',
|
||||||
@@ -140,6 +146,7 @@ export default function EmailProviders() {
|
|||||||
username: config.username || '',
|
username: config.username || '',
|
||||||
password: '', // Passwort wird nicht geladen
|
password: '', // Passwort wird nicht geladen
|
||||||
domain: config.domain,
|
domain: config.domain,
|
||||||
|
customerEmailLabel: config.customerEmailLabel || '',
|
||||||
defaultForwardEmail: config.defaultForwardEmail || '',
|
defaultForwardEmail: config.defaultForwardEmail || '',
|
||||||
imapEncryption: config.imapEncryption ?? 'SSL',
|
imapEncryption: config.imapEncryption ?? 'SSL',
|
||||||
smtpEncryption: config.smtpEncryption ?? 'SSL',
|
smtpEncryption: config.smtpEncryption ?? 'SSL',
|
||||||
@@ -288,6 +295,7 @@ export default function EmailProviders() {
|
|||||||
apiKey: formData.apiKey, // Leerer String wird im Backend zu null
|
apiKey: formData.apiKey, // Leerer String wird im Backend zu null
|
||||||
username: formData.username,
|
username: formData.username,
|
||||||
domain: formData.domain,
|
domain: formData.domain,
|
||||||
|
customerEmailLabel: formData.customerEmailLabel.trim() || null,
|
||||||
defaultForwardEmail: formData.defaultForwardEmail,
|
defaultForwardEmail: formData.defaultForwardEmail,
|
||||||
imapEncryption: formData.imapEncryption,
|
imapEncryption: formData.imapEncryption,
|
||||||
smtpEncryption: formData.smtpEncryption,
|
smtpEncryption: formData.smtpEncryption,
|
||||||
@@ -572,6 +580,20 @@ export default function EmailProviders() {
|
|||||||
und als Bezeichnung im UI angezeigt ("{formData.domain ? formData.domain.split('.')[0].split('-').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join('-') : 'Meine-Domain'}").
|
und als Bezeichnung im UI angezeigt ("{formData.domain ? formData.domain.split('.')[0].split('-').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join('-') : 'Meine-Domain'}").
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Input
|
||||||
|
label="Bezeichnung im UI (optional)"
|
||||||
|
value={formData.customerEmailLabel}
|
||||||
|
onChange={(e) => setFormData({ ...formData, customerEmailLabel: e.target.value })}
|
||||||
|
placeholder={formData.domain ? formData.domain.split('.')[0].split('-').map(s => s.charAt(0).toUpperCase() + s.slice(1)).join('-') : 'aus Domain ableiten'}
|
||||||
|
maxLength={60}
|
||||||
|
/>
|
||||||
|
<p className="text-xs text-gray-500 mt-1">
|
||||||
|
Überschreibt die aus der Domain abgeleitete Bezeichnung – z.B.
|
||||||
|
"interne Kunden Email Adressen". Leer lassen für Auto-Ableitung.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
label="Standard-Weiterleitungsadresse"
|
label="Standard-Weiterleitungsadresse"
|
||||||
value={formData.defaultForwardEmail}
|
value={formData.defaultForwardEmail}
|
||||||
|
|||||||
Reference in New Issue
Block a user