- WorkflowBatchImportWizard:目录扫描/多文件 → dry-run 逐文件报告 → 确认导入; warn 可补用途、需确认与 fail 项不导入不标可运行、重复导入全量 conflict 跳过 - WorkflowLibrary:view=meta 轻量列表(搜索/分类/模型/媒介/收藏/最近/启停/ 去重/批量标注),完整 JSON 仅操作时按需加载;试运行复用 WorkflowTestDialog; 保留用途确认、输出指定、单文件导入等既有能力 - api/types:listMeta、convert、importBatch、importScanDry/Commit、touch、 dedupe 客户端与 WorkflowMeta/转换报告类型;update 支持 favorite/tags/ category/model_family - i18n 130 键 ×7 语言;changelog Co-authored-by: multica-agent <github@multica.ai>
909 lines
24 KiB
Svelte
909 lines
24 KiB
Svelte
<script lang="ts">
|
|
import Drawer from '$lib/components/ui/Drawer.svelte';
|
|
import Button from '$lib/components/ui/Button.svelte';
|
|
import Icon from '$lib/components/ui/Icon.svelte';
|
|
import {
|
|
apiErrorMessage,
|
|
workflows,
|
|
type ComfyEndpoint,
|
|
type WorkflowConvertFileReport,
|
|
type WorkflowConvertReport,
|
|
type WorkflowImportResult,
|
|
type WorkflowUIFileInput,
|
|
type WorkflowUsage,
|
|
} from '$lib/api';
|
|
import { WORKFLOW_USAGES } from '$lib/comfy/types';
|
|
import { t } from '$lib/i18n.svelte';
|
|
import { toast } from '$lib/toast';
|
|
|
|
/**
|
|
* 批量导入向导 (HEL-682 / S4):扫描服务器目录或选择多个本地文件 →
|
|
* dry-run 逐文件预检报告(ok / warn / fail / 需人工确认,含建议元数据)→
|
|
* 确认后提交导入。warn 项可补充用途后以启用状态入库;fail 与需人工确认项
|
|
* 不会被导入,也不得被标作可运行。重复导入按内容去重,全部跳过。
|
|
*/
|
|
interface Props {
|
|
open?: boolean;
|
|
endpoints: ComfyEndpoint[];
|
|
onimported?: () => void;
|
|
}
|
|
|
|
let { open = $bindable(false), endpoints, onimported }: Props = $props();
|
|
|
|
type Step = 'source' | 'report' | 'result';
|
|
|
|
let step = $state<Step>('source');
|
|
let mode = $state<'scan' | 'files'>('scan');
|
|
let scanRoot = $state('example_ComfyUI_workflows');
|
|
let preflightId = $state('');
|
|
let inputFiles = $state<WorkflowUIFileInput[]>([]);
|
|
let nonUiSkipped = $state<string[]>([]);
|
|
let reading = $state(false);
|
|
let running = $state(false);
|
|
let importing = $state(false);
|
|
let error = $state('');
|
|
let report = $state<WorkflowConvertReport | null>(null);
|
|
let result = $state<WorkflowImportResult | null>(null);
|
|
let usageApplied = $state(0);
|
|
/** Per-file usage chosen in the report step, keyed by name\0source_path. */
|
|
let usageBy = $state<Record<string, WorkflowUsage>>({});
|
|
/** Files the user un-checked (file-picker mode only). */
|
|
let excludedKeys = $state<Set<string>>(new Set());
|
|
let rSearch = $state('');
|
|
let rFilter = $state<'all' | 'warn' | 'blocked'>('all');
|
|
let expandedIssues = $state<Set<string>>(new Set());
|
|
let visible = $state(60);
|
|
let fileInput = $state<HTMLInputElement | null>(null);
|
|
|
|
function rk(f: { name: string; source_path: string | null }): string {
|
|
return `${f.name}\u0000${f.source_path ?? ''}`;
|
|
}
|
|
|
|
function reset() {
|
|
step = 'source';
|
|
inputFiles = [];
|
|
nonUiSkipped = [];
|
|
report = null;
|
|
result = null;
|
|
usageApplied = 0;
|
|
usageBy = {};
|
|
excludedKeys = new Set();
|
|
rSearch = '';
|
|
rFilter = 'all';
|
|
expandedIssues = new Set();
|
|
visible = 60;
|
|
error = '';
|
|
}
|
|
|
|
function usageLabel(u: WorkflowUsage | null | undefined): string {
|
|
return u ? t(`usage.${u}`) : t('usage.pending');
|
|
}
|
|
|
|
function mediaIcon(kind: string): 'image' | 'film' | 'music' {
|
|
if (kind === 'video') return 'film';
|
|
if (kind === 'audio') return 'music';
|
|
return 'image';
|
|
}
|
|
|
|
function mediaTitle(kind: string): string {
|
|
if (kind === 'video') return t('wl.mediaVideo');
|
|
if (kind === 'audio') return t('wl.mediaAudio');
|
|
return t('wl.mediaImage');
|
|
}
|
|
|
|
async function readPickedFiles(list: FileList | null) {
|
|
if (!list?.length) return;
|
|
reading = true;
|
|
error = '';
|
|
try {
|
|
const items: WorkflowUIFileInput[] = [];
|
|
const skipped: string[] = [];
|
|
for (const file of Array.from(list)) {
|
|
try {
|
|
const data = JSON.parse(await file.text());
|
|
if (!(data && typeof data === 'object' && Array.isArray(data.nodes))) {
|
|
skipped.push(file.name);
|
|
continue;
|
|
}
|
|
items.push({
|
|
name: file.name.replace(/\.json$/i, ''),
|
|
source_path: file.name,
|
|
workflow_json: data,
|
|
});
|
|
} catch {
|
|
skipped.push(file.name);
|
|
}
|
|
}
|
|
inputFiles = items;
|
|
nonUiSkipped = skipped;
|
|
} finally {
|
|
reading = false;
|
|
if (fileInput) fileInput.value = '';
|
|
}
|
|
}
|
|
|
|
async function runDryRun() {
|
|
running = true;
|
|
error = '';
|
|
try {
|
|
let res: WorkflowConvertReport;
|
|
if (mode === 'scan') {
|
|
res = await workflows.importScanDry(scanRoot.trim() || 'example_ComfyUI_workflows');
|
|
inputFiles = [];
|
|
nonUiSkipped = [];
|
|
} else {
|
|
if (inputFiles.length === 0) {
|
|
error = t('wiz.noFiles');
|
|
return;
|
|
}
|
|
res = await workflows.convert(
|
|
inputFiles,
|
|
preflightId ? { endpoint_id: preflightId } : undefined,
|
|
);
|
|
}
|
|
report = res;
|
|
usageBy = {};
|
|
excludedKeys = new Set(res.files.filter((f) => !f.importable).map((f) => rk(f)));
|
|
rSearch = '';
|
|
rFilter = 'all';
|
|
expandedIssues = new Set();
|
|
visible = 60;
|
|
step = 'report';
|
|
} catch (err) {
|
|
error = apiErrorMessage(err);
|
|
} finally {
|
|
running = false;
|
|
}
|
|
}
|
|
|
|
const selectedCount = $derived(
|
|
report
|
|
? mode === 'files'
|
|
? report.files.filter((f) => f.importable && !excludedKeys.has(rk(f))).length
|
|
: report.importable
|
|
: 0,
|
|
);
|
|
const blockedCount = $derived(
|
|
report ? report.files.filter((f) => !f.importable).length : 0,
|
|
);
|
|
|
|
const filteredFiles = $derived.by(() => {
|
|
if (!report) return [];
|
|
const q = rSearch.trim().toLowerCase();
|
|
return report.files.filter((f) => {
|
|
if (rFilter === 'warn' && f.status !== 'warn') return false;
|
|
if (rFilter === 'blocked' && f.importable) return false;
|
|
if (!q) return true;
|
|
return (
|
|
f.name.toLowerCase().includes(q) ||
|
|
(f.source_path ?? '').toLowerCase().includes(q) ||
|
|
(f.suggested?.model_family ?? '').toLowerCase().includes(q)
|
|
);
|
|
});
|
|
});
|
|
|
|
function needsUsagePick(f: WorkflowConvertFileReport): boolean {
|
|
return Boolean(f.importable && (!f.suggested?.usage || f.suggested.usage_ambiguous));
|
|
}
|
|
|
|
function setUsage(f: WorkflowConvertFileReport, usage: string) {
|
|
const key = rk(f);
|
|
if (usage) usageBy = { ...usageBy, [key]: usage as WorkflowUsage };
|
|
else {
|
|
const next = { ...usageBy };
|
|
delete next[key];
|
|
usageBy = next;
|
|
}
|
|
}
|
|
|
|
function toggleIssue(f: WorkflowConvertFileReport) {
|
|
const key = rk(f);
|
|
const next = new Set(expandedIssues);
|
|
if (next.has(key)) next.delete(key);
|
|
else next.add(key);
|
|
expandedIssues = next;
|
|
}
|
|
|
|
function skipText(reason: string | null | undefined): string {
|
|
if (reason === 'conflict') return t('wiz.conflict');
|
|
return reason ?? '';
|
|
}
|
|
|
|
async function runImport() {
|
|
if (!report) return;
|
|
importing = true;
|
|
error = '';
|
|
try {
|
|
let res: WorkflowImportResult;
|
|
if (mode === 'files') {
|
|
const files = inputFiles
|
|
.map((item, i) => ({ item, f: report!.files[i] }))
|
|
.filter(({ f }) => f?.importable && !excludedKeys.has(rk(f)))
|
|
.map(({ item, f }) => {
|
|
const usage = usageBy[rk(f)];
|
|
return usage ? { ...item, usage } : item;
|
|
});
|
|
res = await workflows.importBatch(files);
|
|
} else {
|
|
res = await workflows.importScanCommit(scanRoot.trim() || 'example_ComfyUI_workflows');
|
|
}
|
|
result = res;
|
|
// Directory commits import everything found server-side; usage
|
|
// choices from the report step are applied to the fresh rows here.
|
|
if (mode === 'scan') {
|
|
let applied = 0;
|
|
for (const f of res.files) {
|
|
const usage = usageBy[rk(f)];
|
|
if (f.result === 'imported' && f.id != null && usage) {
|
|
try {
|
|
await workflows.update(f.id, {
|
|
usage,
|
|
usage_source: 'user',
|
|
is_enabled: true,
|
|
});
|
|
applied++;
|
|
} catch {
|
|
try {
|
|
await workflows.update(f.id, { usage, usage_source: 'user' });
|
|
applied++;
|
|
} catch {
|
|
/* keep the imported row, skip the override */
|
|
}
|
|
}
|
|
}
|
|
}
|
|
usageApplied = applied;
|
|
}
|
|
step = 'result';
|
|
onimported?.();
|
|
if (res.imported > 0) toast.success(t('wiz.importedToast', { n: res.imported }));
|
|
} catch (err) {
|
|
error = apiErrorMessage(err);
|
|
} finally {
|
|
importing = false;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<Drawer bind:open title={t('wiz.title')} width={780} onclose={reset}>
|
|
<ol class="wz-steps" aria-label={t('wiz.title')}>
|
|
<li class:active={step === 'source'} class:done={step !== 'source'}>
|
|
<span class="wz-step-n">1</span>{t('wiz.stepSource')}
|
|
</li>
|
|
<li class:active={step === 'report'} class:done={step === 'result'}>
|
|
<span class="wz-step-n">2</span>{t('wiz.stepReport')}
|
|
</li>
|
|
<li class:active={step === 'result'}>
|
|
<span class="wz-step-n">3</span>{t('wiz.stepResult')}
|
|
</li>
|
|
</ol>
|
|
|
|
{#if error}
|
|
<div class="wz-error" role="alert">
|
|
<Icon name="alert" size={14} />
|
|
<span>{error}</span>
|
|
</div>
|
|
{/if}
|
|
|
|
{#if step === 'source'}
|
|
<div class="seg wz-mode" role="radiogroup" aria-label={t('wiz.sourceLabel')}>
|
|
<button
|
|
type="button"
|
|
class="seg-item"
|
|
class:selected={mode === 'scan'}
|
|
aria-pressed={mode === 'scan'}
|
|
onclick={() => (mode = 'scan')}
|
|
>
|
|
<Icon name="folder" size={14} />
|
|
{t('wiz.modeScan')}
|
|
</button>
|
|
<button
|
|
type="button"
|
|
class="seg-item"
|
|
class:selected={mode === 'files'}
|
|
aria-pressed={mode === 'files'}
|
|
onclick={() => (mode = 'files')}
|
|
>
|
|
<Icon name="upload" size={14} />
|
|
{t('wiz.modeFiles')}
|
|
</button>
|
|
</div>
|
|
|
|
{#if mode === 'scan'}
|
|
<label class="wz-field">
|
|
<span class="wz-label">{t('wiz.rootLabel')}</span>
|
|
<input
|
|
class="a-input wz-root"
|
|
value={scanRoot}
|
|
spellcheck="false"
|
|
oninput={(e) => (scanRoot = e.currentTarget.value)}
|
|
placeholder="example_ComfyUI_workflows"
|
|
/>
|
|
<span class="wz-hint">{t('wiz.rootHint')}</span>
|
|
</label>
|
|
{:else}
|
|
<div class="wz-field">
|
|
<span class="wz-label">{t('wiz.pickFiles')}</span>
|
|
<button type="button" class="a-btn secondary" onclick={() => fileInput?.click()}>
|
|
<Icon name="upload" size={14} />
|
|
{t('wiz.pickFilesBtn')}
|
|
</button>
|
|
<input
|
|
bind:this={fileInput}
|
|
type="file"
|
|
accept=".json,application/json"
|
|
multiple
|
|
class="wz-file-hidden"
|
|
onchange={(e) => void readPickedFiles(e.currentTarget.files)}
|
|
/>
|
|
<span class="wz-hint">{t('wiz.pickFilesHint')}</span>
|
|
{#if reading}
|
|
<p class="wz-read">{t('common.loading')}…</p>
|
|
{/if}
|
|
{#if inputFiles.length}
|
|
<p class="wz-read ok">
|
|
<Icon name="check" size={13} />
|
|
{t('wiz.parsed', { n: inputFiles.length })}
|
|
</p>
|
|
{/if}
|
|
{#if nonUiSkipped.length}
|
|
<p class="wz-read bad">
|
|
<Icon name="alert" size={13} />
|
|
{t('wiz.notUi', { n: nonUiSkipped.length })}
|
|
</p>
|
|
{/if}
|
|
</div>
|
|
{/if}
|
|
|
|
{#if mode === 'files' && endpoints.length > 0}
|
|
<label class="wz-field">
|
|
<span class="wz-label">{t('wiz.preflight')}</span>
|
|
<select class="a-select wz-preflight" value={preflightId} onchange={(e) => (preflightId = e.currentTarget.value)}>
|
|
<option value="">{t('wiz.preflightNone')}</option>
|
|
{#each endpoints as ep (ep.id)}
|
|
<option value={ep.id}>{ep.name}</option>
|
|
{/each}
|
|
</select>
|
|
<span class="wz-hint">{t('wiz.preflightHint')}</span>
|
|
</label>
|
|
{/if}
|
|
{:else if step === 'report' && report}
|
|
<div class="wz-summary">
|
|
<span class="wz-chip">{t('wiz.total', { n: report.total })}</span>
|
|
<span class="wz-chip ok">{t('wiz.ok', { n: report.ok })}</span>
|
|
<span class="wz-chip warn">{t('wiz.warn', { n: report.warn })}</span>
|
|
<span class="wz-chip fail">{t('wiz.fail', { n: report.fail })}</span>
|
|
<span class="wz-chip confirm">{t('wiz.confirmCount', { n: report.needs_confirmation })}</span>
|
|
<span class="wz-chip importable">{t('wiz.importable', { n: report.importable })}</span>
|
|
</div>
|
|
<p class="wz-note">{t('wiz.reportHint')}</p>
|
|
|
|
<div class="wz-toolbar">
|
|
<div class="filters" role="group" aria-label={t('wiz.filterLabel')}>
|
|
<button type="button" class="a-chip" class:sel={rFilter === 'all'} aria-pressed={rFilter === 'all'} onclick={() => (rFilter = 'all')}>
|
|
{t('wl.filterAll')}
|
|
</button>
|
|
<button type="button" class="a-chip" class:sel={rFilter === 'warn'} aria-pressed={rFilter === 'warn'} onclick={() => (rFilter = 'warn')}>
|
|
{t('wiz.filterWarn')}
|
|
</button>
|
|
<button type="button" class="a-chip" class:sel={rFilter === 'blocked'} aria-pressed={rFilter === 'blocked'} onclick={() => (rFilter = 'blocked')}>
|
|
{t('wiz.filterBlocked')}
|
|
</button>
|
|
</div>
|
|
<input
|
|
class="a-input wz-search"
|
|
value={rSearch}
|
|
oninput={(e) => (rSearch = e.currentTarget.value)}
|
|
placeholder={t('wiz.searchPh')}
|
|
aria-label={t('wiz.searchPh')}
|
|
/>
|
|
</div>
|
|
|
|
<div class="wz-list">
|
|
{#each filteredFiles.slice(0, visible) as f (rk(f))}
|
|
<div class="wz-row" class:blocked={!f.importable}>
|
|
{#if mode === 'files'}
|
|
<input
|
|
type="checkbox"
|
|
class="wz-check"
|
|
aria-label={t('wiz.includeAria', { name: f.name })}
|
|
disabled={!f.importable}
|
|
checked={f.importable && !excludedKeys.has(rk(f))}
|
|
onchange={(e) => {
|
|
const next = new Set(excludedKeys);
|
|
if (e.currentTarget.checked) next.delete(rk(f));
|
|
else next.add(rk(f));
|
|
excludedKeys = next;
|
|
}}
|
|
/>
|
|
{/if}
|
|
<span class="wz-dot {f.status}" title={f.status}></span>
|
|
<div class="wz-main">
|
|
<div class="wz-line">
|
|
<span class="wz-name" title={f.suggested?.description ?? f.name}>{f.name}</span>
|
|
{#if f.suggested?.model_family}
|
|
<span class="tag tag-usage">{f.suggested.model_family}</span>
|
|
{/if}
|
|
{#if f.suggested}
|
|
<span class="tag tag-usage">{usageLabel(f.suggested.usage)}</span>
|
|
<span class="wz-media" aria-hidden="true">
|
|
{#each f.suggested.media_in as m (m)}
|
|
<span class="wz-m" title={mediaTitle(m)}><Icon name={mediaIcon(m)} size={12} /></span>
|
|
{/each}
|
|
{#if f.suggested.media_out.length}
|
|
<span class="wz-arrow">→</span>
|
|
{#each f.suggested.media_out as m (m)}
|
|
<span class="wz-m" title={mediaTitle(m)}><Icon name={mediaIcon(m)} size={12} /></span>
|
|
{/each}
|
|
{/if}
|
|
</span>
|
|
{/if}
|
|
{#if f.status === 'warn'}
|
|
<span class="tag tag-warn">{t('wiz.warnTag')}</span>
|
|
{/if}
|
|
{#if f.needs_confirmation}
|
|
<span class="tag tag-error">{t('wiz.confirmTag')}</span>
|
|
{/if}
|
|
{#if f.preflight && !f.preflight.ok}
|
|
<span class="tag tag-error" title={f.preflight.findings.map((x) => x.message).join('\n')}>
|
|
{t('wiz.preflightTag')}
|
|
</span>
|
|
{/if}
|
|
</div>
|
|
{#if f.source_path}
|
|
<div class="wz-path mono">{f.source_path}</div>
|
|
{/if}
|
|
{#if !f.importable && f.skip_reason}
|
|
<div class="wz-skip">{t('wiz.skipReason', { reason: skipText(f.skip_reason) })}</div>
|
|
{/if}
|
|
{#if needsUsagePick(f)}
|
|
<label class="wz-usage">
|
|
<span>{t('wiz.usagePick')}</span>
|
|
<select
|
|
class="a-select wz-usage-select"
|
|
value={usageBy[rk(f)] ?? ''}
|
|
onchange={(e) => setUsage(f, e.currentTarget.value)}
|
|
>
|
|
<option value="">{t('wiz.usageNone')}</option>
|
|
{#each WORKFLOW_USAGES as u (u)}
|
|
<option value={u}>{usageLabel(u)}</option>
|
|
{/each}
|
|
</select>
|
|
</label>
|
|
{/if}
|
|
{#if f.issues.length}
|
|
<button type="button" class="wz-issues-toggle" onclick={() => toggleIssue(f)} aria-expanded={expandedIssues.has(rk(f))}>
|
|
<Icon name="alert" size={12} />
|
|
{t('wiz.issues', { n: f.issues.length })}
|
|
</button>
|
|
{#if expandedIssues.has(rk(f))}
|
|
<ul class="wz-issues">
|
|
{#each f.issues as iss, i (`${rk(f)}#${i}`)}
|
|
<li class="lvl-{iss.level}">
|
|
<span class="mono">{iss.node_id}</span>
|
|
{iss.message}
|
|
</li>
|
|
{/each}
|
|
</ul>
|
|
{/if}
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
{/each}
|
|
</div>
|
|
{#if filteredFiles.length > visible}
|
|
<button type="button" class="a-btn ghost wz-more" onclick={() => (visible += 100)}>
|
|
{t('wl.moreCount', { n: Math.min(100, filteredFiles.length - visible), m: filteredFiles.length })}
|
|
</button>
|
|
{/if}
|
|
{:else if step === 'result' && result}
|
|
<div class="wz-summary">
|
|
<span class="wz-chip ok">{t('wiz.imported', { n: result.imported })}</span>
|
|
<span class="wz-chip">{t('wiz.skipped', { n: result.skipped })}</span>
|
|
{#if result.files.some((f) => f.result === 'failed')}
|
|
<span class="wz-chip fail">{t('wiz.fail', { n: result.files.filter((f) => f.result === 'failed').length })}</span>
|
|
{/if}
|
|
</div>
|
|
<p class="wz-note">{t('wiz.resultNote')}</p>
|
|
{#if usageApplied > 0}
|
|
<p class="wz-note ok">{t('wiz.usageApplied', { n: usageApplied })}</p>
|
|
{/if}
|
|
<div class="wz-list">
|
|
{#each result.files as f (rk(f))}
|
|
<div class="wz-row">
|
|
<span class="wz-dot {f.result === 'imported' ? 'ok' : f.result === 'failed' ? 'fail' : 'warn'}"></span>
|
|
<div class="wz-main">
|
|
<div class="wz-line">
|
|
<span class="wz-name">{f.name}</span>
|
|
{#if f.result === 'imported'}
|
|
<span class="tag tag-ok">
|
|
<Icon name="check" size={12} />
|
|
{t('wiz.importedTag', { id: f.id ?? '?' })}
|
|
</span>
|
|
{:else if f.skip_reason === 'conflict' || f.result === 'skipped'}
|
|
<span class="tag tag-usage">{skipText(f.skip_reason)}</span>
|
|
{:else}
|
|
<span class="tag tag-error">{skipText(f.skip_reason)}</span>
|
|
{/if}
|
|
</div>
|
|
{#if f.source_path}
|
|
<div class="wz-path mono">{f.source_path}</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
{/each}
|
|
</div>
|
|
{/if}
|
|
|
|
{#snippet footer()}
|
|
{#if step === 'source'}
|
|
<Button variant="secondary" onclick={() => (open = false)}>{t('common.cancel')}</Button>
|
|
<Button variant="primary" loading={running} disabled={reading} onclick={() => void runDryRun()}>
|
|
{running ? t('wiz.running') : t('wiz.runDry')}
|
|
</Button>
|
|
{:else if step === 'report'}
|
|
<span class="wz-footer-note">
|
|
{t('wiz.selectedN', { n: selectedCount })}
|
|
{#if blockedCount}· {t('wiz.excludedM', { m: blockedCount })}{/if}
|
|
</span>
|
|
<Button variant="secondary" disabled={importing} onclick={() => (step = 'source')}>{t('wiz.back')}</Button>
|
|
<Button variant="primary" loading={importing} disabled={selectedCount === 0} onclick={() => void runImport()}>
|
|
{importing ? t('wiz.importing') : t('wiz.import')}
|
|
</Button>
|
|
{:else}
|
|
<Button variant="secondary" onclick={() => { reset(); step = 'source'; }}>{t('wiz.again')}</Button>
|
|
<Button variant="primary" onclick={() => (open = false)}>{t('wiz.done')}</Button>
|
|
{/if}
|
|
{/snippet}
|
|
</Drawer>
|
|
|
|
<style>
|
|
.wz-steps {
|
|
display: flex;
|
|
gap: 6px;
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0 0 14px;
|
|
}
|
|
.wz-steps li {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
padding: 8px 10px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border);
|
|
background: var(--surface-2);
|
|
color: var(--text-3);
|
|
font-size: 12px;
|
|
}
|
|
.wz-steps li.active {
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
background: var(--accent-dim);
|
|
font-weight: 600;
|
|
}
|
|
.wz-steps li.done {
|
|
color: var(--text-2);
|
|
}
|
|
.wz-step-n {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 18px;
|
|
height: 18px;
|
|
border-radius: 50%;
|
|
border: 1px solid currentColor;
|
|
font-size: 10.5px;
|
|
flex-shrink: 0;
|
|
}
|
|
.wz-error {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
margin-bottom: 12px;
|
|
padding: 9px 12px;
|
|
border-radius: 7px;
|
|
background: var(--error-dim);
|
|
color: var(--text-2);
|
|
font-size: 12px;
|
|
}
|
|
.wz-error :global(.icon) {
|
|
color: var(--error);
|
|
flex-shrink: 0;
|
|
margin-top: 1px;
|
|
}
|
|
.wz-mode {
|
|
margin-bottom: 14px;
|
|
}
|
|
.seg {
|
|
display: flex;
|
|
gap: 6px;
|
|
}
|
|
.seg-item {
|
|
flex: 1;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
text-align: center;
|
|
padding: 8px 6px;
|
|
border-radius: 7px;
|
|
border: 1px solid var(--border);
|
|
background: var(--surface-2);
|
|
font-size: 12.5px;
|
|
color: var(--text-2);
|
|
cursor: pointer;
|
|
font-family: inherit;
|
|
}
|
|
.seg-item.selected {
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
background: var(--accent-dim);
|
|
font-weight: 600;
|
|
}
|
|
.wz-field {
|
|
display: block;
|
|
margin-bottom: 14px;
|
|
}
|
|
.wz-label {
|
|
display: block;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: var(--text-2);
|
|
margin-bottom: 6px;
|
|
}
|
|
.wz-root,
|
|
.wz-preflight,
|
|
.wz-search {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
.wz-hint {
|
|
display: block;
|
|
margin-top: 5px;
|
|
font-size: 11px;
|
|
color: var(--text-3);
|
|
line-height: 1.6;
|
|
}
|
|
.wz-file-hidden {
|
|
display: none;
|
|
}
|
|
.wz-read {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
margin: 8px 0 0;
|
|
font-size: 12px;
|
|
color: var(--text-2);
|
|
}
|
|
.wz-read.ok {
|
|
color: var(--success);
|
|
}
|
|
.wz-read.bad {
|
|
color: var(--warn);
|
|
}
|
|
.wz-summary {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.wz-chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 3px 10px;
|
|
border-radius: 999px;
|
|
font-size: 11.5px;
|
|
font-weight: 600;
|
|
color: var(--text-2);
|
|
background: var(--bg-4);
|
|
}
|
|
.wz-chip.ok,
|
|
.wz-chip.importable {
|
|
color: var(--success);
|
|
background: var(--success-dim);
|
|
}
|
|
.wz-chip.warn {
|
|
color: var(--warn);
|
|
background: var(--warn-dim, var(--bg-4));
|
|
}
|
|
.wz-chip.fail,
|
|
.wz-chip.confirm {
|
|
color: var(--error);
|
|
background: var(--error-dim);
|
|
}
|
|
.wz-note {
|
|
margin: 0 0 12px;
|
|
font-size: 11.5px;
|
|
line-height: 1.6;
|
|
color: var(--text-3);
|
|
}
|
|
.wz-note.ok {
|
|
color: var(--success);
|
|
}
|
|
.wz-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-bottom: 10px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.wz-toolbar .filters {
|
|
display: flex;
|
|
gap: 6px;
|
|
}
|
|
.wz-search {
|
|
flex: 1;
|
|
min-width: 160px;
|
|
}
|
|
.wz-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
.wz-row {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
padding: 8px 10px;
|
|
border-radius: 8px;
|
|
}
|
|
.wz-row:hover {
|
|
background: var(--surface-2);
|
|
}
|
|
.wz-row.blocked .wz-name {
|
|
color: var(--text-3);
|
|
}
|
|
.wz-check {
|
|
margin-top: 3px;
|
|
accent-color: var(--accent);
|
|
flex-shrink: 0;
|
|
}
|
|
.wz-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
margin-top: 6px;
|
|
flex-shrink: 0;
|
|
}
|
|
.wz-dot.ok {
|
|
background: var(--success);
|
|
}
|
|
.wz-dot.warn {
|
|
background: var(--warn);
|
|
}
|
|
.wz-dot.fail {
|
|
background: var(--error);
|
|
}
|
|
.wz-main {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
.wz-line {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.wz-name {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--text);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
max-width: 100%;
|
|
}
|
|
.tag {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 2px 9px;
|
|
border-radius: 999px;
|
|
font-size: 10.5px;
|
|
font-weight: 600;
|
|
}
|
|
.tag-usage {
|
|
color: var(--text-2);
|
|
background: var(--bg-4);
|
|
}
|
|
.tag-warn {
|
|
color: var(--warn);
|
|
background: var(--warn-dim, var(--bg-4));
|
|
}
|
|
.tag-error {
|
|
color: var(--error);
|
|
background: var(--error-dim);
|
|
}
|
|
.tag-ok {
|
|
color: var(--success);
|
|
background: var(--success-dim);
|
|
}
|
|
.wz-media {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 3px;
|
|
color: var(--text-3);
|
|
}
|
|
.wz-m {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
.wz-arrow {
|
|
font-size: 10px;
|
|
}
|
|
.wz-path {
|
|
margin-top: 2px;
|
|
font-size: 10.5px;
|
|
color: var(--text-3);
|
|
word-break: break-all;
|
|
}
|
|
.wz-skip {
|
|
margin-top: 4px;
|
|
font-size: 11.5px;
|
|
color: var(--error);
|
|
line-height: 1.5;
|
|
}
|
|
.wz-usage {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-top: 6px;
|
|
font-size: 11.5px;
|
|
color: var(--text-2);
|
|
}
|
|
.wz-usage-select {
|
|
width: 180px;
|
|
}
|
|
.wz-issues-toggle {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
margin-top: 5px;
|
|
padding: 0;
|
|
border: none;
|
|
background: none;
|
|
font-family: inherit;
|
|
font-size: 11.5px;
|
|
color: var(--warn);
|
|
cursor: pointer;
|
|
}
|
|
.wz-issues-toggle:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
border-radius: 4px;
|
|
}
|
|
.wz-issues {
|
|
margin: 6px 0 0;
|
|
padding: 8px 10px;
|
|
list-style: none;
|
|
border-radius: 7px;
|
|
background: var(--surface-2);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
.wz-issues li {
|
|
font-size: 11px;
|
|
color: var(--text-2);
|
|
line-height: 1.5;
|
|
}
|
|
.wz-issues li .mono {
|
|
color: var(--text-3);
|
|
margin-right: 6px;
|
|
}
|
|
.wz-issues li.lvl-error {
|
|
color: var(--error);
|
|
}
|
|
.wz-more {
|
|
margin-top: 10px;
|
|
width: 100%;
|
|
}
|
|
.wz-footer-note {
|
|
margin-right: auto;
|
|
font-size: 11.5px;
|
|
color: var(--text-3);
|
|
}
|
|
</style>
|