优化复刻视频脚本和下拉框样式
This commit is contained in:
@@ -4,6 +4,7 @@ import { adminApi } from "../../api";
|
||||
import { Pager } from "../../components/pager";
|
||||
import { IconKitSvg } from "../../components/IconKitSvg";
|
||||
import { SystemLoading } from "../../components/loading";
|
||||
import { CustomSelect } from "../../components/custom-select";
|
||||
import type { AdminLedger, AdminQuotaPolicy, AdminTeam } from "../../types";
|
||||
import { pts } from "../stage-config";
|
||||
|
||||
@@ -214,10 +215,13 @@ export function AdminLedgersPage({ notify }: { notify: Notify }) {
|
||||
<p className="admin-modal-desc">为团队手动加 / 减额度(争议补偿)。金额可为负;调额后余额不得为负。会落一条调额流水。</p>
|
||||
<div className="field">
|
||||
<label className="field-label">团队 <span className="req">*</span></label>
|
||||
<select className="select" value={form.team} onChange={(e) => setForm((f) => ({ ...f, team: e.target.value }))}>
|
||||
<option value="">选择团队…</option>
|
||||
{teams.map((t) => <option key={t.id} value={t.id}>{t.name}</option>)}
|
||||
</select>
|
||||
<CustomSelect
|
||||
fill
|
||||
value={form.team}
|
||||
placeholder="选择团队…"
|
||||
onChange={(next) => setForm((f) => ({ ...f, team: next }))}
|
||||
options={teams.map((t) => ({ value: t.id, label: t.name }))}
|
||||
/>
|
||||
</div>
|
||||
<div className="field">
|
||||
<label className="field-label">金额 <span className="field-hint">正=加,负=减</span></label>
|
||||
@@ -372,10 +376,14 @@ export function AdminQuotaPage({ notify }: { notify: Notify }) {
|
||||
<p className="admin-modal-desc">各上限留空 = 该维度不限。任一上限触发即拦截生成(在原余额管控之上叠加)。</p>
|
||||
<div className="field">
|
||||
<label className="field-label">团队 <span className="req">*</span></label>
|
||||
<select className="select" value={editing.team} disabled={Boolean(editing.id)} onChange={(e) => setEditing((p) => ({ ...p, team: e.target.value }))}>
|
||||
<option value="">选择团队…</option>
|
||||
{teams.map((t) => <option key={t.id} value={t.id}>{t.name}</option>)}
|
||||
</select>
|
||||
<CustomSelect
|
||||
fill
|
||||
value={editing.team}
|
||||
disabled={Boolean(editing.id)}
|
||||
placeholder="选择团队…"
|
||||
onChange={(next) => setEditing((p) => ({ ...p, team: next }))}
|
||||
options={teams.map((t) => ({ value: t.id, label: t.name }))}
|
||||
/>
|
||||
</div>
|
||||
<div className="field-row">
|
||||
<div className="field">
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Server, X } from "lucide-react";
|
||||
import { adminApi } from "../../api";
|
||||
import { Pager } from "../../components/pager";
|
||||
import { SystemLoading } from "../../components/loading";
|
||||
import { CustomSelect } from "../../components/custom-select";
|
||||
import type { AdminModel, AdminProvider } from "../../types";
|
||||
import { pts } from "../stage-config";
|
||||
|
||||
@@ -229,10 +230,14 @@ export function AdminModelsPage({ notify }: { notify: Notify }) {
|
||||
<div className="modal-b">
|
||||
<div className="field">
|
||||
<label className="field-label">供应商 <span className="req">*</span></label>
|
||||
<select className="select" value={modelModal.provider} disabled={Boolean(modelModal.id)} onChange={(e) => setModelModal((m) => m && ({ ...m, provider: e.target.value }))}>
|
||||
<option value="">选择供应商…</option>
|
||||
{providers.map((p) => <option key={p.id} value={p.id}>{p.display_name}</option>)}
|
||||
</select>
|
||||
<CustomSelect
|
||||
fill
|
||||
value={modelModal.provider}
|
||||
disabled={Boolean(modelModal.id)}
|
||||
placeholder="选择供应商…"
|
||||
onChange={(next) => setModelModal((m) => m && ({ ...m, provider: next }))}
|
||||
options={providers.map((p) => ({ value: p.id, label: p.display_name }))}
|
||||
/>
|
||||
</div>
|
||||
<div className="field-row">
|
||||
<div className="field">
|
||||
@@ -241,9 +246,13 @@ export function AdminModelsPage({ notify }: { notify: Notify }) {
|
||||
</div>
|
||||
<div className="field">
|
||||
<label className="field-label">能力</label>
|
||||
<select className="select" value={modelModal.capability} disabled={Boolean(modelModal.id)} onChange={(e) => setModelModal((m) => m && ({ ...m, capability: e.target.value }))}>
|
||||
{CAPABILITIES.map((c) => <option key={c} value={c}>{c}</option>)}
|
||||
</select>
|
||||
<CustomSelect
|
||||
fill
|
||||
value={modelModal.capability}
|
||||
disabled={Boolean(modelModal.id)}
|
||||
onChange={(next) => setModelModal((m) => m && ({ ...m, capability: next }))}
|
||||
options={CAPABILITIES.map((c) => ({ value: c, label: c }))}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="field">
|
||||
|
||||
Reference in New Issue
Block a user