mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-13 18:36:37 +08:00
[优化] 设置ui优化
This commit is contained in:
@@ -1175,35 +1175,30 @@ export function SettingsPage() {
|
|||||||
|
|
||||||
<div className="grid gap-6 xl:grid-cols-[1fr_1fr]">
|
<div className="grid gap-6 xl:grid-cols-[1fr_1fr]">
|
||||||
<AppCard
|
<AppCard
|
||||||
title="通用与 SMTP 设置"
|
title="通用设置"
|
||||||
description="服务器地址会影响邮件链接、OAuth 回调和部署命令展示。"
|
description="服务器地址会影响邮件链接、OAuth 回调和部署命令展示。"
|
||||||
action={
|
action={
|
||||||
<PrimaryButton
|
<PrimaryButton
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
void runBusyAction('system-core', async () => {
|
void runBusyAction('system-general', async () => {
|
||||||
await saveOptionEntries(
|
await saveOptionEntries(
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
'ServerAddress',
|
'ServerAddress',
|
||||||
normalizeServerUrl(systemFields.ServerAddress),
|
normalizeServerUrl(systemFields.ServerAddress),
|
||||||
],
|
],
|
||||||
['SMTPServer', systemFields.SMTPServer.trim()],
|
|
||||||
['SMTPPort', systemFields.SMTPPort.trim()],
|
|
||||||
['SMTPAccount', systemFields.SMTPAccount.trim()],
|
|
||||||
['SMTPToken', systemFields.SMTPToken.trim()],
|
|
||||||
],
|
],
|
||||||
'通用与 SMTP 设置已保存。',
|
'通用设置已保存。',
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
disabled={busyKey === 'system-core'}
|
disabled={busyKey === 'system-general'}
|
||||||
>
|
>
|
||||||
{busyKey === 'system-core' ? '保存中...' : '保存通用设置'}
|
{busyKey === 'system-general' ? '保存中...' : '保存通用设置'}
|
||||||
</PrimaryButton>
|
</PrimaryButton>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="space-y-5">
|
|
||||||
<ResourceField label="服务器地址">
|
<ResourceField label="服务器地址">
|
||||||
<ResourceInput
|
<ResourceInput
|
||||||
value={systemFields.ServerAddress}
|
value={systemFields.ServerAddress}
|
||||||
@@ -1216,6 +1211,33 @@ export function SettingsPage() {
|
|||||||
placeholder="https://yourdomain.com"
|
placeholder="https://yourdomain.com"
|
||||||
/>
|
/>
|
||||||
</ResourceField>
|
</ResourceField>
|
||||||
|
</AppCard>
|
||||||
|
|
||||||
|
<AppCard
|
||||||
|
title="SMTP 设置"
|
||||||
|
description="用于邮件验证码、密码重置和其他邮件通知发送。"
|
||||||
|
action={
|
||||||
|
<PrimaryButton
|
||||||
|
type="button"
|
||||||
|
onClick={() =>
|
||||||
|
void runBusyAction('system-smtp', async () => {
|
||||||
|
await saveOptionEntries(
|
||||||
|
[
|
||||||
|
['SMTPServer', systemFields.SMTPServer.trim()],
|
||||||
|
['SMTPPort', systemFields.SMTPPort.trim()],
|
||||||
|
['SMTPAccount', systemFields.SMTPAccount.trim()],
|
||||||
|
['SMTPToken', systemFields.SMTPToken.trim()],
|
||||||
|
],
|
||||||
|
'SMTP 设置已保存。',
|
||||||
|
);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
disabled={busyKey === 'system-smtp'}
|
||||||
|
>
|
||||||
|
{busyKey === 'system-smtp' ? '保存中...' : '保存 SMTP 设置'}
|
||||||
|
</PrimaryButton>
|
||||||
|
}
|
||||||
|
>
|
||||||
<div className="grid gap-5 md:grid-cols-2">
|
<div className="grid gap-5 md:grid-cols-2">
|
||||||
<ResourceField label="SMTP 服务器">
|
<ResourceField label="SMTP 服务器">
|
||||||
<ResourceInput
|
<ResourceInput
|
||||||
@@ -1270,7 +1292,6 @@ export function SettingsPage() {
|
|||||||
/>
|
/>
|
||||||
</ResourceField>
|
</ResourceField>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</AppCard>
|
</AppCard>
|
||||||
|
|
||||||
<AppCard
|
<AppCard
|
||||||
|
|||||||
Reference in New Issue
Block a user