style(ui): unify settings input fields with consistent label style
Build and Deploy / build-and-push (push) Successful in 52s
Build and Deploy / build-and-push (push) Successful in 52s
This commit is contained in:
+37
-31
@@ -267,8 +267,14 @@ export default function Settings() {
|
||||
</Card>
|
||||
<Card className="space-y-3 p-4">
|
||||
<h2 className="font-medium">站点设置</h2>
|
||||
<Input placeholder="站点标题" value={siteForm.title} onChange={(e) => setSiteForm((f) => ({ ...f, title: e.target.value }))} />
|
||||
<Input placeholder="站点副标题" value={siteForm.subtitle} onChange={(e) => setSiteForm((f) => ({ ...f, subtitle: e.target.value }))} />
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">站点标题</label>
|
||||
<Input placeholder="任务池" value={siteForm.title} onChange={(e) => setSiteForm((f) => ({ ...f, title: e.target.value }))} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">站点副标题</label>
|
||||
<Input placeholder="轻量级任务调度平台" value={siteForm.subtitle} onChange={(e) => setSiteForm((f) => ({ ...f, subtitle: e.target.value }))} />
|
||||
</div>
|
||||
<div className="grid gap-3 md:grid-cols-2">
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">分页大小</label>
|
||||
@@ -332,38 +338,38 @@ taskpool mcp --http :8053`}</pre>
|
||||
</div>
|
||||
<h3 className="pt-2 text-sm font-medium text-[var(--text-secondary)]">日志保留</h3>
|
||||
<p className="text-xs text-[var(--text-muted)]">设置各类日志的保留天数和最大条数限制,超出后自动清理最旧记录</p>
|
||||
<div className="space-y-3">
|
||||
<div className="rounded-md border border-[var(--border)] bg-[var(--bg-tertiary)]/50 p-3">
|
||||
<div className="mb-2 text-sm font-medium text-[var(--text-primary)]">系统通知</div>
|
||||
<p className="mb-2 text-xs text-[var(--text-muted)]">系统级事件通知,如任务失败报警、服务状态变更等</p>
|
||||
<div className="grid gap-2 md:grid-cols-2">
|
||||
<Input placeholder="保留天数" value={siteForm.system_notice_days} onChange={(e) => setSiteForm((f) => ({ ...f, system_notice_days: e.target.value }))} />
|
||||
<Input placeholder="最大条数" value={siteForm.system_notice_max_count} onChange={(e) => setSiteForm((f) => ({ ...f, system_notice_max_count: e.target.value }))} />
|
||||
</div>
|
||||
<div className="grid gap-3 md:grid-cols-2">
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">系统通知保留天数</label>
|
||||
<Input placeholder="7" value={siteForm.system_notice_days} onChange={(e) => setSiteForm((f) => ({ ...f, system_notice_days: e.target.value }))} />
|
||||
</div>
|
||||
<div className="rounded-md border border-[var(--border)] bg-[var(--bg-tertiary)]/50 p-3">
|
||||
<div className="mb-2 text-sm font-medium text-[var(--text-primary)]">推送日志</div>
|
||||
<p className="mb-2 text-xs text-[var(--text-muted)]">消息推送记录,如钉钉、企业微信、Telegram 等渠道的发送历史</p>
|
||||
<div className="grid gap-2 md:grid-cols-2">
|
||||
<Input placeholder="保留天数" value={siteForm.push_log_days} onChange={(e) => setSiteForm((f) => ({ ...f, push_log_days: e.target.value }))} />
|
||||
<Input placeholder="最大条数" value={siteForm.push_log_max_count} onChange={(e) => setSiteForm((f) => ({ ...f, push_log_max_count: e.target.value }))} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">系统通知最大条数</label>
|
||||
<Input placeholder="1000" value={siteForm.system_notice_max_count} onChange={(e) => setSiteForm((f) => ({ ...f, system_notice_max_count: e.target.value }))} />
|
||||
</div>
|
||||
<div className="rounded-md border border-[var(--border)] bg-[var(--bg-tertiary)]/50 p-3">
|
||||
<div className="mb-2 text-sm font-medium text-[var(--text-primary)]">登录日志</div>
|
||||
<p className="mb-2 text-xs text-[var(--text-muted)]">用户登录记录,包含 IP、时间、状态等安全审计信息</p>
|
||||
<div className="grid gap-2 md:grid-cols-2">
|
||||
<Input placeholder="保留天数" value={siteForm.login_log_days} onChange={(e) => setSiteForm((f) => ({ ...f, login_log_days: e.target.value }))} />
|
||||
<Input placeholder="最大条数" value={siteForm.login_log_max_count} onChange={(e) => setSiteForm((f) => ({ ...f, login_log_max_count: e.target.value }))} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">推送日志保留天数</label>
|
||||
<Input placeholder="7" value={siteForm.push_log_days} onChange={(e) => setSiteForm((f) => ({ ...f, push_log_days: e.target.value }))} />
|
||||
</div>
|
||||
<div className="rounded-md border border-[var(--border)] bg-[var(--bg-tertiary)]/50 p-3">
|
||||
<div className="mb-2 text-sm font-medium text-[var(--text-primary)]">调度日志</div>
|
||||
<p className="mb-2 text-xs text-[var(--text-muted)]">任务执行日志,包含命令输出、执行状态、耗时等信息</p>
|
||||
<div className="grid gap-2 md:grid-cols-2">
|
||||
<Input placeholder="保留天数" value={siteForm.scheduler_log_days} onChange={(e) => setSiteForm((f) => ({ ...f, scheduler_log_days: e.target.value }))} />
|
||||
<Input placeholder="最大条数" value={siteForm.scheduler_log_max_count} onChange={(e) => setSiteForm((f) => ({ ...f, scheduler_log_max_count: e.target.value }))} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">推送日志最大条数</label>
|
||||
<Input placeholder="1000" value={siteForm.push_log_max_count} onChange={(e) => setSiteForm((f) => ({ ...f, push_log_max_count: e.target.value }))} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">登录日志保留天数</label>
|
||||
<Input placeholder="30" value={siteForm.login_log_days} onChange={(e) => setSiteForm((f) => ({ ...f, login_log_days: e.target.value }))} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">登录日志最大条数</label>
|
||||
<Input placeholder="1000" value={siteForm.login_log_max_count} onChange={(e) => setSiteForm((f) => ({ ...f, login_log_max_count: e.target.value }))} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">调度日志保留天数</label>
|
||||
<Input placeholder="7" value={siteForm.scheduler_log_days} onChange={(e) => setSiteForm((f) => ({ ...f, scheduler_log_days: e.target.value }))} />
|
||||
</div>
|
||||
<div>
|
||||
<label className="mb-1 block text-xs text-[var(--text-muted)]">调度日志最大条数</label>
|
||||
<Input placeholder="1000" value={siteForm.scheduler_log_max_count} onChange={(e) => setSiteForm((f) => ({ ...f, scheduler_log_max_count: e.target.value }))} />
|
||||
</div>
|
||||
</div>
|
||||
<Button onClick={() => saveSite.mutate()} disabled={saveSite.isPending}>
|
||||
|
||||
Reference in New Issue
Block a user