style(web): UI kit 组件与画布/后台面板 Prettier 格式化与 migrations.go gofmt 清理
This commit is contained in:
@@ -140,16 +140,7 @@ export function AdminExportButton({
|
||||
}
|
||||
|
||||
export function AdminTableEmpty({ filtered = false, title, description, action }: { filtered?: boolean; title?: string; description?: string; action?: ReactNode }) {
|
||||
return (
|
||||
<EmptyState
|
||||
size="compact"
|
||||
icon={SearchX}
|
||||
title={title || (filtered ? "没有符合筛选条件的数据" : "暂无数据")}
|
||||
description={description}
|
||||
action={action}
|
||||
className="min-h-40 w-full justify-center"
|
||||
/>
|
||||
);
|
||||
return <EmptyState size="compact" icon={SearchX} title={title || (filtered ? "没有符合筛选条件的数据" : "暂无数据")} description={description} action={action} className="min-h-40 w-full justify-center" />;
|
||||
}
|
||||
|
||||
export function AdminFilterChip({ label, onRemove }: { label: ReactNode; onRemove: () => void }) {
|
||||
|
||||
@@ -312,7 +312,11 @@ export function CapabilityScopeEditor({ capability, sourceSpecs, value, onChange
|
||||
</CapabilityBlock>
|
||||
) : null}
|
||||
|
||||
{!sourceInputs.length && !sourceOptions.length && !source.operations?.length ? <Callout tone="info" title="该类型暂无额外能力参数">线路仍可按优先级和权重参与路由。</Callout> : null}
|
||||
{!sourceInputs.length && !sourceOptions.length && !source.operations?.length ? (
|
||||
<Callout tone="info" title="该类型暂无额外能力参数">
|
||||
线路仍可按优先级和权重参与路由。
|
||||
</Callout>
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -499,7 +499,9 @@ export default function AdminPaymentsPage() {
|
||||
}
|
||||
scroll
|
||||
>
|
||||
<Callout className="my-4" tone="info" title="平台不提供支付退款">管理端仅提供查单、关单和对账。关单前始终先向渠道查单;对账发现已支付未入账订单时会幂等补发积分。</Callout>
|
||||
<Callout className="my-4" tone="info" title="平台不提供支付退款">
|
||||
管理端仅提供查单、关单和对账。关单前始终先向渠道查单;对账发现已支付未入账订单时会幂等补发积分。
|
||||
</Callout>
|
||||
<Tabs
|
||||
activeKey={activeTab}
|
||||
onChange={setActiveTab}
|
||||
@@ -612,7 +614,11 @@ export default function AdminPaymentsPage() {
|
||||
>
|
||||
{providerDrawer ? (
|
||||
<Form form={providerForm} layout="vertical" requiredMark="optional">
|
||||
<Callout className="mb-4" tone={providerDrawer.pluginEnabled ? "info" : "warning"} title={providerDrawer.pluginEnabled ? "密钥会加密保存,历史订单固定使用创建时的配置版本。" : "该宿主插件当前已在插件管理中停用;保存配置后仍需开放插件才能接受新订单。"} />
|
||||
<Callout
|
||||
className="mb-4"
|
||||
tone={providerDrawer.pluginEnabled ? "info" : "warning"}
|
||||
title={providerDrawer.pluginEnabled ? "密钥会加密保存,历史订单固定使用创建时的配置版本。" : "该宿主插件当前已在插件管理中停用;保存配置后仍需开放插件才能接受新订单。"}
|
||||
/>
|
||||
<Form.Item name="enabled" label="渠道配置启用" valuePropName="checked">
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
@@ -700,7 +706,11 @@ export default function AdminPaymentsPage() {
|
||||
setDetailItems([]);
|
||||
}}
|
||||
>
|
||||
{detailRun?.error ? <Callout className="mb-4" tone="error" title="对账执行失败">{detailRun.error}</Callout> : null}
|
||||
{detailRun?.error ? (
|
||||
<Callout className="mb-4" tone="error" title="对账执行失败">
|
||||
{detailRun.error}
|
||||
</Callout>
|
||||
) : null}
|
||||
<AdminDataTable
|
||||
toolbar={
|
||||
<Select
|
||||
|
||||
@@ -239,8 +239,8 @@ export function ComfyUIBridgeSettingsPane() {
|
||||
<h4 className="text-sm font-semibold">安装 Bridge</h4>
|
||||
<p className="mt-1 text-xs text-foreground/60">在能访问 ComfyUI 的机器上运行;Windows 使用独立程序,Linux 使用对应架构的原生程序,不需要安装 Node.js、npm 或项目源码。</p>
|
||||
</div>
|
||||
<SegmentedControl
|
||||
size="sm"
|
||||
<SegmentedControl
|
||||
size="sm"
|
||||
value={bridgePlatform}
|
||||
options={[
|
||||
{ label: "Windows", value: "windows" },
|
||||
@@ -252,8 +252,8 @@ size="sm"
|
||||
{bridgePlatform === "linux" ? (
|
||||
<div className="mt-3 flex flex-wrap items-center gap-2 text-xs text-foreground/65">
|
||||
<span>Linux 架构:</span>
|
||||
<SegmentedControl
|
||||
size="sm"
|
||||
<SegmentedControl
|
||||
size="sm"
|
||||
value={linuxArchitecture}
|
||||
options={[
|
||||
{ label: "x64", value: "amd64" },
|
||||
@@ -372,7 +372,7 @@ size="sm"
|
||||
<Input value={config.workflowId} placeholder="workflow.json" onChange={(event) => update({ workflowId: event.target.value })} onBlur={(event) => selectWorkflow(event.target.value.trim())} />
|
||||
</Form.Item>
|
||||
<div className="workflow-workspace-tabs lg:col-span-12">
|
||||
<SegmentedControl
|
||||
<SegmentedControl
|
||||
block
|
||||
value={workspaceMode}
|
||||
options={[
|
||||
|
||||
@@ -99,9 +99,18 @@ export default function DiagnosticsPanel({ taskId, projectId }: DiagnosticsPanel
|
||||
<span className="rounded-full bg-foreground/[.045] px-2.5 py-1 text-[var(--fs-tiny)] font-medium text-foreground/48">最长 24 小时</span>
|
||||
</div>
|
||||
<div className="mt-4 grid gap-4 md:grid-cols-[minmax(0,230px)_minmax(0,1fr)] md:items-end">
|
||||
<label className="block">
|
||||
<label className="block">
|
||||
<span className="mb-2 block text-xs font-semibold text-foreground/65">时间范围</span>
|
||||
<Select ariaLabel="时间范围" className="w-full" value={range} options={rangeOptions} onChange={(value) => { const next = rangeOptions.find((option) => option.value === value)?.value; if (next) setRange(next); }} />
|
||||
<Select
|
||||
ariaLabel="时间范围"
|
||||
className="w-full"
|
||||
value={range}
|
||||
options={rangeOptions}
|
||||
onChange={(value) => {
|
||||
const next = rangeOptions.find((option) => option.value === value)?.value;
|
||||
if (next) setRange(next);
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
<div className="rounded-lg border border-border/55 bg-foreground/[.025] px-3.5 py-3" aria-live="polite">
|
||||
<div className="flex items-center gap-2 text-sm font-medium text-foreground/78">
|
||||
|
||||
@@ -194,7 +194,12 @@ export function LocalCliSettings() {
|
||||
<h2 id="dreamina-cli-title" className="text-base font-semibold">
|
||||
Dreamina CLI
|
||||
</h2>
|
||||
<StatusBadge variant="filled" className="m-0" tone={presentation.dreamina.tone === "processing" ? "loading" : presentation.dreamina.tone === "default" ? "neutral" : presentation.dreamina.tone} label={presentation.dreamina.label} />
|
||||
<StatusBadge
|
||||
variant="filled"
|
||||
className="m-0"
|
||||
tone={presentation.dreamina.tone === "processing" ? "loading" : presentation.dreamina.tone === "default" ? "neutral" : presentation.dreamina.tone}
|
||||
label={presentation.dreamina.label}
|
||||
/>
|
||||
{status?.version ? <Tag className="m-0">v{status.version}</Tag> : null}
|
||||
{presentation.dreamina.creditLabel ? (
|
||||
<Tag color="blue" className="m-0">
|
||||
|
||||
@@ -261,7 +261,7 @@ export function RunningHubSettingsPane() {
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="类型" className="mb-0 lg:col-span-3">
|
||||
<SegmentedControl
|
||||
<SegmentedControl
|
||||
block
|
||||
value={kind}
|
||||
options={[
|
||||
@@ -296,7 +296,7 @@ export function RunningHubSettingsPane() {
|
||||
</div>
|
||||
</Form.Item>
|
||||
<div className="workflow-workspace-tabs lg:col-span-12">
|
||||
<SegmentedControl
|
||||
<SegmentedControl
|
||||
block
|
||||
value={workspaceMode}
|
||||
options={[
|
||||
|
||||
Reference in New Issue
Block a user