From ae6d871046687537d594caac63b52ad6590d12d9 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 12 Mar 2026 17:06:54 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E8=AE=BE=E7=BD=AEui?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../settings/components/settings-page.tsx | 149 ++++++++++-------- 1 file changed, 85 insertions(+), 64 deletions(-) diff --git a/atsf_server/web/features/settings/components/settings-page.tsx b/atsf_server/web/features/settings/components/settings-page.tsx index 806feb3d..5eaf9183 100644 --- a/atsf_server/web/features/settings/components/settings-page.tsx +++ b/atsf_server/web/features/settings/components/settings-page.tsx @@ -1175,101 +1175,122 @@ export function SettingsPage() {
- void runBusyAction('system-core', async () => { + void runBusyAction('system-general', async () => { await saveOptionEntries( [ [ 'ServerAddress', normalizeServerUrl(systemFields.ServerAddress), ], + ], + '通用设置已保存。', + ); + }) + } + disabled={busyKey === 'system-general'} + > + {busyKey === 'system-general' ? '保存中...' : '保存通用设置'} + + } + > + + + setSystemFields((previous) => ({ + ...previous, + ServerAddress: event.target.value, + })) + } + placeholder="https://yourdomain.com" + /> + + + + + void runBusyAction('system-smtp', async () => { + await saveOptionEntries( + [ ['SMTPServer', systemFields.SMTPServer.trim()], ['SMTPPort', systemFields.SMTPPort.trim()], ['SMTPAccount', systemFields.SMTPAccount.trim()], ['SMTPToken', systemFields.SMTPToken.trim()], ], - '通用与 SMTP 设置已保存。', + 'SMTP 设置已保存。', ); }) } - disabled={busyKey === 'system-core'} + disabled={busyKey === 'system-smtp'} > - {busyKey === 'system-core' ? '保存中...' : '保存通用设置'} + {busyKey === 'system-smtp' ? '保存中...' : '保存 SMTP 设置'} } > -
- +
+ setSystemFields((previous) => ({ ...previous, - ServerAddress: event.target.value, + SMTPServer: event.target.value, })) } - placeholder="https://yourdomain.com" + placeholder="smtp.qq.com" + /> + + + + setSystemFields((previous) => ({ + ...previous, + SMTPPort: event.target.value, + })) + } + placeholder="587" + /> + + + + setSystemFields((previous) => ({ + ...previous, + SMTPAccount: event.target.value, + })) + } + placeholder="name@example.com" + /> + + + + setSystemFields((previous) => ({ + ...previous, + SMTPToken: event.target.value, + })) + } + placeholder="请输入新的 SMTP 凭证" /> -
- - - setSystemFields((previous) => ({ - ...previous, - SMTPServer: event.target.value, - })) - } - placeholder="smtp.qq.com" - /> - - - - setSystemFields((previous) => ({ - ...previous, - SMTPPort: event.target.value, - })) - } - placeholder="587" - /> - - - - setSystemFields((previous) => ({ - ...previous, - SMTPAccount: event.target.value, - })) - } - placeholder="name@example.com" - /> - - - - setSystemFields((previous) => ({ - ...previous, - SMTPToken: event.target.value, - })) - } - placeholder="请输入新的 SMTP 凭证" - /> - -