Add SMTP password field.
Added a password field to the Mail Settings tab in the General Settings panel, ensuring it is saved and retrieved via the `/api/settings` endpoint.
This commit is contained in:
@@ -47,6 +47,7 @@ const GeneralSettingsPanel: React.FC<GeneralSettingsPanelProps> = () => {
|
||||
port: 587,
|
||||
host: '',
|
||||
username: '',
|
||||
password: '',
|
||||
authMethod: '',
|
||||
tls: true,
|
||||
localName: ''
|
||||
@@ -73,6 +74,7 @@ const GeneralSettingsPanel: React.FC<GeneralSettingsPanelProps> = () => {
|
||||
port: 587,
|
||||
host: '',
|
||||
username: '',
|
||||
password: '',
|
||||
authMethod: '',
|
||||
tls: true,
|
||||
localName: ''
|
||||
@@ -131,6 +133,7 @@ const GeneralSettingsPanel: React.FC<GeneralSettingsPanelProps> = () => {
|
||||
port: 587,
|
||||
host: '',
|
||||
username: '',
|
||||
password: '',
|
||||
authMethod: '',
|
||||
tls: true,
|
||||
localName: ''
|
||||
|
||||
@@ -140,6 +140,26 @@ const MailSettingsTab: React.FC<MailSettingsTabProps> = ({
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="smtp.password"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>{t("smtpPassword", "settings")}</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
{...field}
|
||||
type="password"
|
||||
disabled={!isEditing || !form.watch('smtp.enabled')}
|
||||
placeholder="••••••••"
|
||||
/>
|
||||
</FormControl>
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
||||
Reference in New Issue
Block a user