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,
|
port: 587,
|
||||||
host: '',
|
host: '',
|
||||||
username: '',
|
username: '',
|
||||||
|
password: '',
|
||||||
authMethod: '',
|
authMethod: '',
|
||||||
tls: true,
|
tls: true,
|
||||||
localName: ''
|
localName: ''
|
||||||
@@ -73,6 +74,7 @@ const GeneralSettingsPanel: React.FC<GeneralSettingsPanelProps> = () => {
|
|||||||
port: 587,
|
port: 587,
|
||||||
host: '',
|
host: '',
|
||||||
username: '',
|
username: '',
|
||||||
|
password: '',
|
||||||
authMethod: '',
|
authMethod: '',
|
||||||
tls: true,
|
tls: true,
|
||||||
localName: ''
|
localName: ''
|
||||||
@@ -131,6 +133,7 @@ const GeneralSettingsPanel: React.FC<GeneralSettingsPanelProps> = () => {
|
|||||||
port: 587,
|
port: 587,
|
||||||
host: '',
|
host: '',
|
||||||
username: '',
|
username: '',
|
||||||
|
password: '',
|
||||||
authMethod: '',
|
authMethod: '',
|
||||||
tls: true,
|
tls: true,
|
||||||
localName: ''
|
localName: ''
|
||||||
|
|||||||
@@ -140,6 +140,26 @@ const MailSettingsTab: React.FC<MailSettingsTabProps> = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</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">
|
<div className="mt-4">
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export interface GeneralSettings {
|
|||||||
port?: number;
|
port?: number;
|
||||||
host?: string;
|
host?: string;
|
||||||
username?: string;
|
username?: string;
|
||||||
|
password?: string;
|
||||||
authMethod?: string;
|
authMethod?: string;
|
||||||
tls?: boolean;
|
tls?: boolean;
|
||||||
localName?: string;
|
localName?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user