mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-19 22:53:41 +08:00
feat: support LOGIN as SMTP authentication method.
This commit is contained in:
@@ -16,6 +16,7 @@ const SystemSetting = () => {
|
||||
SMTPAccount: '',
|
||||
SMTPFrom: '',
|
||||
SMTPToken: '',
|
||||
SMTPAuthLoginEnabled: '',
|
||||
ServerAddress: '',
|
||||
Footer: '',
|
||||
WeChatAuthEnabled: '',
|
||||
@@ -72,6 +73,7 @@ const SystemSetting = () => {
|
||||
case 'TurnstileCheckEnabled':
|
||||
case 'EmailDomainRestrictionEnabled':
|
||||
case 'RegisterEnabled':
|
||||
case 'SMTPAuthLoginEnabled':
|
||||
value = inputs[key] === 'true' ? 'false' : 'true';
|
||||
break;
|
||||
default:
|
||||
@@ -103,7 +105,7 @@ const SystemSetting = () => {
|
||||
}
|
||||
if (
|
||||
name === 'Notice' ||
|
||||
name.startsWith('SMTP') ||
|
||||
(name.startsWith('SMTP') && !name.endsWith('Enabled')) ||
|
||||
name === 'ServerAddress' ||
|
||||
name === 'GitHubClientId' ||
|
||||
name === 'GitHubClientSecret' ||
|
||||
@@ -411,6 +413,12 @@ const SystemSetting = () => {
|
||||
checked={inputs.RegisterEnabled === 'true'}
|
||||
placeholder='敏感信息不会发送到前端显示'
|
||||
/>
|
||||
<Form.Checkbox
|
||||
checked={inputs.SMTPAuthLoginEnabled === 'true'}
|
||||
label='使用 SMTP LOGIN 认证方式'
|
||||
name='SMTPAuthLoginEnabled'
|
||||
onChange={handleInputChange}
|
||||
/>
|
||||
</Form.Group>
|
||||
<Form.Button onClick={submitSMTP}>保存 SMTP 设置</Form.Button>
|
||||
<Divider />
|
||||
|
||||
Reference in New Issue
Block a user