Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d2df11919 |
@@ -0,0 +1,542 @@
|
||||
/* HEL-646 流水台原型 · 设计 Token 统一在 :root,组件只引用变量 */
|
||||
:root {
|
||||
--bg: #121211;
|
||||
--bg-2: #191917;
|
||||
--bg-3: #22221f;
|
||||
--bg-4: #2b2b27;
|
||||
--line: #2c2c28;
|
||||
--line-2: #3b3b35;
|
||||
--text: #f2f1ec;
|
||||
--text-2: #b6b4ab;
|
||||
--text-3: #7f7d75;
|
||||
--accent: #c9f36b;
|
||||
--accent-ink: #182200;
|
||||
--accent-soft: rgba(201, 243, 107, 0.12);
|
||||
--run: #86adff;
|
||||
--run-soft: rgba(134, 173, 255, 0.14);
|
||||
--err: #ff8070;
|
||||
--err-soft: rgba(255, 128, 112, 0.12);
|
||||
--warn: #f3c55a;
|
||||
--warn-soft: rgba(243, 197, 90, 0.12);
|
||||
|
||||
--r-sm: 6px;
|
||||
--r-md: 10px;
|
||||
--r-lg: 14px;
|
||||
--shadow-float: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--line-2);
|
||||
|
||||
--font: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
|
||||
--mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
|
||||
|
||||
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
|
||||
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
|
||||
--ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
|
||||
--d-press: 120ms;
|
||||
--d-state: 150ms;
|
||||
--d-pop: 180ms;
|
||||
--d-enter: 220ms;
|
||||
--d-drawer: 280ms;
|
||||
}
|
||||
|
||||
:root[data-reduce="1"] {
|
||||
--d-press: 0ms;
|
||||
--d-pop: 120ms;
|
||||
--d-enter: 120ms;
|
||||
--d-drawer: 120ms;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
html, body { height: 100%; margin: 0; }
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font: 13px/1.55 var(--font);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
overflow: hidden;
|
||||
}
|
||||
button, input, textarea, select { font: inherit; color: inherit; }
|
||||
button { cursor: pointer; background: none; border: 0; padding: 0; }
|
||||
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
|
||||
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
|
||||
.muted { color: var(--text-3); }
|
||||
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
|
||||
|
||||
/* ---------- 壳层 ---------- */
|
||||
.app { display: grid; grid-template-columns: 60px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; }
|
||||
.rail {
|
||||
display: flex; flex-direction: column; align-items: center; gap: 4px;
|
||||
padding: 12px 0; border-right: 1px solid var(--line); background: var(--bg);
|
||||
}
|
||||
.rail .logo {
|
||||
width: 34px; height: 34px; border-radius: 9px; margin-bottom: 14px;
|
||||
display: grid; place-items: center; font-weight: 700; font-size: 16px;
|
||||
background: var(--accent); color: var(--accent-ink);
|
||||
}
|
||||
.rail .spacer { flex: 1; }
|
||||
.rail-btn {
|
||||
position: relative; width: 44px; height: 44px; border-radius: var(--r-md);
|
||||
display: grid; place-items: center; color: var(--text-3);
|
||||
transition: color var(--d-state) ease, background-color var(--d-state) ease;
|
||||
}
|
||||
.rail-btn svg { width: 20px; height: 20px; }
|
||||
.rail-btn[aria-current="page"] { color: var(--text); background: var(--bg-3); }
|
||||
.rail-btn[aria-current="page"]::before {
|
||||
content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 3px;
|
||||
border-radius: 0 3px 3px 0; background: var(--accent);
|
||||
}
|
||||
.rail-btn .tip {
|
||||
position: absolute; left: 52px; white-space: nowrap; pointer-events: none;
|
||||
background: var(--bg-4); color: var(--text); padding: 4px 8px; border-radius: var(--r-sm);
|
||||
font-size: 12px; opacity: 0; transform: translateX(-4px);
|
||||
transition: opacity var(--d-pop) var(--ease-out), transform var(--d-pop) var(--ease-out);
|
||||
z-index: 30;
|
||||
}
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
.rail-btn:hover { color: var(--text); background: var(--bg-2); }
|
||||
.rail-btn:hover .tip { opacity: 1; transform: none; transition-delay: 350ms; }
|
||||
}
|
||||
|
||||
.main { display: grid; grid-template-rows: 52px minmax(0, 1fr); min-width: 0; }
|
||||
.topbar {
|
||||
display: flex; align-items: center; gap: 10px; padding: 0 16px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
.crumb { display: flex; align-items: center; gap: 6px; min-width: 0; }
|
||||
.crumb h1 { font-size: 15px; font-weight: 600; margin: 0; white-space: nowrap; }
|
||||
.capsule {
|
||||
display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
|
||||
border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); white-space: nowrap;
|
||||
transition: border-color var(--d-state) ease, color var(--d-state) ease;
|
||||
}
|
||||
.capsule .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
|
||||
.capsule .dot.run { background: var(--run); }
|
||||
.capsule .dot.err { background: var(--err); }
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
.capsule:hover { border-color: var(--text-3); color: var(--text); }
|
||||
}
|
||||
.topbar .grow { flex: 1; }
|
||||
.kbd {
|
||||
font: 11px var(--mono); color: var(--text-3); border: 1px solid var(--line-2);
|
||||
border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; line-height: 16px;
|
||||
}
|
||||
.search-btn { min-width: 240px; justify-content: space-between; }
|
||||
|
||||
/* 通用按钮 */
|
||||
.btn {
|
||||
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
||||
height: 32px; padding: 0 12px; border-radius: var(--r-md);
|
||||
border: 1px solid var(--line-2); color: var(--text); background: var(--bg-2);
|
||||
transition: transform var(--d-press) var(--ease-out), background-color var(--d-state) ease, border-color var(--d-state) ease, opacity var(--d-state) ease;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.btn svg { width: 15px; height: 15px; }
|
||||
.btn:active:not(:disabled) { transform: scale(0.97); }
|
||||
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
|
||||
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
|
||||
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
|
||||
.btn.danger { color: var(--err); }
|
||||
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; border-radius: var(--r-sm); }
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
.btn:hover:not(:disabled) { border-color: var(--text-3); }
|
||||
.btn.primary:hover:not(:disabled) { background: #d6f88a; }
|
||||
.btn.ghost:hover:not(:disabled) { background: var(--bg-3); color: var(--text); }
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
|
||||
border-radius: 999px; font-size: 11px; color: var(--text-2); background: var(--bg-3);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tag.accent { color: var(--accent); background: var(--accent-soft); }
|
||||
.tag.run { color: var(--run); background: var(--run-soft); }
|
||||
.tag.err { color: var(--err); background: var(--err-soft); }
|
||||
.tag.warn { color: var(--warn); background: var(--warn-soft); }
|
||||
|
||||
/* ---------- 视图切换 ---------- */
|
||||
.view { display: none; min-height: 0; }
|
||||
.view.on { display: grid; }
|
||||
|
||||
/* ---------- 生成台 ---------- */
|
||||
.desk { grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: minmax(0, 1fr); min-height: 0; }
|
||||
.desk-center { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
|
||||
.context-bar {
|
||||
display: none; align-items: center; gap: 10px; margin: 10px 20px 0; padding: 8px 12px;
|
||||
border-radius: var(--r-md); background: var(--run-soft); color: var(--text); font-size: 12px;
|
||||
}
|
||||
.context-bar.on { display: flex; }
|
||||
.context-bar b { color: var(--run); font-weight: 600; }
|
||||
.filters { display: flex; align-items: center; gap: 6px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
|
||||
.seg { display: inline-flex; padding: 2px; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
|
||||
.seg button {
|
||||
height: 26px; padding: 0 10px; border-radius: 8px; color: var(--text-3);
|
||||
transition: background-color var(--d-state) ease, color var(--d-state) ease;
|
||||
}
|
||||
.seg button[aria-pressed="true"] { background: var(--bg-4); color: var(--text); }
|
||||
.filters .count { margin-left: auto; color: var(--text-3); font-size: 12px; }
|
||||
|
||||
.feed { flex: 1; overflow-y: auto; padding: 16px 20px 8px; scroll-behavior: smooth; }
|
||||
:root[data-reduce="1"] .feed { scroll-behavior: auto; }
|
||||
.feed-day { color: var(--text-3); font-size: 12px; margin: 10px 0 8px; display: flex; align-items: center; gap: 8px; }
|
||||
.feed-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
|
||||
|
||||
.take {
|
||||
position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px;
|
||||
padding: 12px 14px; margin-bottom: 8px; border-radius: var(--r-lg);
|
||||
border: 1px solid transparent; background: var(--bg-2); cursor: pointer;
|
||||
transition: border-color var(--d-state) ease, background-color var(--d-state) ease, opacity var(--d-enter) var(--ease-out), transform var(--d-enter) var(--ease-out);
|
||||
}
|
||||
@starting-style { .take.new { opacity: 0; transform: translateY(8px); } }
|
||||
:root[data-reduce="1"] .take.new { transform: none; }
|
||||
.take.selected { border-color: var(--accent); background: var(--bg-3); }
|
||||
.take.leaving { opacity: 0; transform: translateX(-12px); pointer-events: none; }
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
.take:hover:not(.selected) { border-color: var(--line-2); }
|
||||
}
|
||||
.take-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
||||
.take-head .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.take-head .meta { color: var(--text-3); font-size: 12px; white-space: nowrap; }
|
||||
.take-prompt {
|
||||
grid-column: 1; color: var(--text-2); font-size: 12.5px;
|
||||
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
|
||||
}
|
||||
.take-inputs { display: flex; gap: 4px; align-items: center; }
|
||||
.take-inputs .mini { width: 26px; height: 26px; border-radius: 5px; background-size: cover; background-position: center; border: 1px solid var(--line-2); }
|
||||
.take-inputs .more { font-size: 11px; color: var(--text-3); padding-left: 2px; }
|
||||
.take-out { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
|
||||
.thumb {
|
||||
position: relative; width: 150px; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden;
|
||||
background: var(--bg-4) center / cover no-repeat;
|
||||
}
|
||||
.thumb.portrait { width: 96px; aspect-ratio: 3 / 4; }
|
||||
.thumb.fresh { transition: opacity var(--d-state) ease; }
|
||||
@starting-style { .thumb.fresh { opacity: 0; } }
|
||||
.thumb .badge {
|
||||
position: absolute; right: 6px; bottom: 6px; font: 11px var(--mono); padding: 1px 5px; border-radius: 4px;
|
||||
background: rgba(0, 0, 0, 0.6); color: #fff;
|
||||
}
|
||||
.thumb .play {
|
||||
position: absolute; left: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%;
|
||||
display: grid; place-items: center; background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
.thumb .play svg { width: 10px; height: 10px; fill: #fff; }
|
||||
.thumb.missing, .thumb.pending {
|
||||
display: grid; place-items: center; text-align: center; font-size: 11px; color: var(--text-3);
|
||||
border: 1px dashed var(--line-2); background: var(--bg-2); padding: 6px;
|
||||
}
|
||||
.thumb.pending { border-style: solid; overflow: hidden; }
|
||||
.thumb.pending::after {
|
||||
content: ""; position: absolute; inset: 0;
|
||||
background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
|
||||
animation: sheen 1.4s linear infinite;
|
||||
}
|
||||
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
|
||||
:root[data-reduce="1"] .thumb.pending::after { animation: none; }
|
||||
|
||||
.take-state { grid-column: 1; display: flex; align-items: center; gap: 8px; font-size: 12px; min-height: 22px; }
|
||||
.take-state .txt { color: var(--text-2); }
|
||||
.take-state .err-txt { color: var(--err); }
|
||||
.bar { position: relative; flex: 0 0 140px; height: 4px; border-radius: 4px; background: var(--bg-4); overflow: hidden; }
|
||||
.bar i {
|
||||
position: absolute; inset: 0; background: var(--run); transform-origin: left;
|
||||
transform: scaleX(var(--p, 0)); transition: transform 400ms linear;
|
||||
}
|
||||
.take-actions { display: flex; gap: 4px; margin-left: auto; opacity: 0; transition: opacity var(--d-state) ease; }
|
||||
.take:focus-within .take-actions, .take.selected .take-actions { opacity: 1; }
|
||||
@media (hover: hover) and (pointer: fine) { .take:hover .take-actions { opacity: 1; } }
|
||||
@media (hover: none) { .take-actions { opacity: 1; } }
|
||||
.err-detail { grid-column: 1 / -1; display: none; margin: 0; padding: 8px 10px 8px 26px; border-radius: var(--r-md); background: var(--err-soft); color: var(--text-2); font-size: 12px; }
|
||||
.take.open .err-detail { display: block; }
|
||||
.err-detail li { margin: 2px 0; }
|
||||
|
||||
/* ---------- 输入台 ---------- */
|
||||
.composer-wrap { padding: 8px 20px 16px; }
|
||||
.composer {
|
||||
border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg-2);
|
||||
transition: border-color var(--d-state) ease;
|
||||
}
|
||||
.composer:focus-within { border-color: var(--text-3); }
|
||||
.slots { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; }
|
||||
.slots:empty { display: none; }
|
||||
.slot-group { display: flex; flex-direction: column; gap: 6px; }
|
||||
.slot-label { font-size: 11.5px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
|
||||
.slot-label .req { color: var(--warn); }
|
||||
.slot-row { display: flex; gap: 6px; flex-wrap: wrap; }
|
||||
.tile {
|
||||
position: relative; width: 58px; height: 58px; border-radius: var(--r-md);
|
||||
background: var(--bg-3) center / cover no-repeat; border: 1px solid var(--line-2);
|
||||
display: grid; place-items: center; color: var(--text-3);
|
||||
transition: border-color var(--d-state) ease, transform var(--d-press) var(--ease-out), opacity var(--d-enter) var(--ease-out);
|
||||
}
|
||||
@starting-style { .tile.filled { opacity: 0; transform: scale(0.94); } }
|
||||
.tile.add { border-style: dashed; }
|
||||
.tile.add svg { width: 18px; height: 18px; }
|
||||
.tile.add:active { transform: scale(0.97); }
|
||||
.tile.drag { border-color: var(--accent); background-color: var(--accent-soft); color: var(--accent); }
|
||||
.tile.bad { border-color: var(--err); }
|
||||
.tile.need { border-color: var(--warn); }
|
||||
.tile .x {
|
||||
position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
|
||||
background: var(--bg-4); border: 1px solid var(--line-2); display: grid; place-items: center; opacity: 0;
|
||||
transition: opacity var(--d-state) ease;
|
||||
}
|
||||
.tile .x svg { width: 9px; height: 9px; }
|
||||
.tile:focus-within .x { opacity: 1; }
|
||||
@media (hover: hover) and (pointer: fine) { .tile:hover .x { opacity: 1; } .tile.add:hover { border-color: var(--text-3); color: var(--text); } }
|
||||
@media (hover: none) { .tile .x { opacity: 1; } }
|
||||
.tile .ring { position: absolute; inset: 0; border-radius: inherit; background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; font-size: 11px; color: #fff; }
|
||||
.tile .idx { position: absolute; left: 3px; top: 2px; font: 10px var(--mono); color: #fff; text-shadow: 0 1px 2px #000; }
|
||||
.slot-hint { font-size: 11px; color: var(--text-3); }
|
||||
.slot-hint.err { color: var(--err); }
|
||||
|
||||
.prompt {
|
||||
display: block; width: 100%; resize: none; border: 0; outline: 0; background: transparent;
|
||||
padding: 12px 14px 6px; min-height: 52px; max-height: 180px; line-height: 1.6;
|
||||
}
|
||||
.prompt::placeholder { color: var(--text-3); }
|
||||
.composer-foot { display: flex; align-items: center; gap: 6px; padding: 6px 8px 8px 8px; flex-wrap: wrap; }
|
||||
.chip {
|
||||
display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
|
||||
background: var(--bg-3); color: var(--text-2); font-size: 12px; white-space: nowrap; max-width: 280px;
|
||||
transition: background-color var(--d-state) ease, color var(--d-state) ease, transform var(--d-press) var(--ease-out);
|
||||
}
|
||||
.chip:active { transform: scale(0.97); }
|
||||
.chip .lbl { overflow: hidden; text-overflow: ellipsis; }
|
||||
.chip svg { width: 14px; height: 14px; flex: none; }
|
||||
.chip.wf { color: var(--text); background: var(--bg-4); font-weight: 500; }
|
||||
.chip.warn { color: var(--warn); }
|
||||
.chip.err { color: var(--err); }
|
||||
.chip.changed { color: var(--accent); }
|
||||
@media (hover: hover) and (pointer: fine) { .chip:hover { background: var(--bg-4); color: var(--text); } }
|
||||
.submit-group { margin-left: auto; display: flex; align-items: center; gap: 10px; }
|
||||
.why { font-size: 12px; color: var(--warn); white-space: nowrap; text-decoration: underline dotted; text-underline-offset: 3px; }
|
||||
.why.err { color: var(--err); }
|
||||
.gen-btn { height: 34px; padding: 0 16px; border-radius: 999px; }
|
||||
|
||||
/* ---------- 右侧检视区 ---------- */
|
||||
.inspector { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
|
||||
.insp-tabs { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: center; }
|
||||
.insp-body { flex: 1; overflow-y: auto; padding: 14px; }
|
||||
.stage { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
|
||||
.stage.portrait { aspect-ratio: 3 / 4; max-height: 480px; margin: 0 auto; }
|
||||
.stage > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity var(--d-state) ease; }
|
||||
.stage .fade-out { opacity: 0; }
|
||||
.stage-empty { display: grid; place-items: center; color: var(--text-3); font-size: 12px; background: var(--bg-2); }
|
||||
.stage-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 12px 0; font-size: 12px; color: var(--text-3); }
|
||||
.stage-meta b { color: var(--text-2); font-weight: 500; }
|
||||
.stage-actions { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.section-title { font-size: 12px; color: var(--text-3); margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
|
||||
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; font-size: 12px; }
|
||||
.kv dt { color: var(--text-3); }
|
||||
.kv dd { margin: 0; color: var(--text-2); word-break: break-all; }
|
||||
|
||||
/* 参数表单(按工作流 JSON 生成) */
|
||||
.field { display: grid; gap: 6px; margin-bottom: 12px; }
|
||||
.field label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
|
||||
.field label .orig { color: var(--text-3); font-family: var(--mono); font-size: 11px; }
|
||||
.input {
|
||||
height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-2);
|
||||
padding: 0 10px; outline: 0; width: 100%;
|
||||
transition: border-color var(--d-state) ease;
|
||||
}
|
||||
.input:focus { border-color: var(--text-3); }
|
||||
.input.changed { border-color: rgba(201, 243, 107, 0.5); }
|
||||
textarea.input { height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; }
|
||||
.fold { border-top: 1px solid var(--line); margin-top: 6px; }
|
||||
.fold > summary {
|
||||
list-style: none; cursor: pointer; padding: 10px 0; display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px;
|
||||
}
|
||||
.fold > summary::-webkit-details-marker { display: none; }
|
||||
.fold > summary svg { width: 12px; height: 12px; transition: transform var(--d-pop) var(--ease-out); }
|
||||
.fold[open] > summary svg { transform: rotate(90deg); }
|
||||
.note { font-size: 12px; color: var(--text-3); padding: 8px 10px; border-radius: var(--r-md); background: var(--bg-2); margin-bottom: 12px; }
|
||||
.note.warn { color: var(--warn); background: var(--warn-soft); }
|
||||
.note.err { color: var(--err); background: var(--err-soft); }
|
||||
.note ul { margin: 6px 0 0; padding-left: 18px; }
|
||||
|
||||
/* ---------- 浮层:工作流面板 ---------- */
|
||||
.pop {
|
||||
position: fixed; z-index: 50; width: 520px; max-height: min(560px, 70vh); display: flex; flex-direction: column;
|
||||
border-radius: var(--r-lg); background: var(--bg-2); box-shadow: var(--shadow-float);
|
||||
opacity: 0; transform: scale(0.96); pointer-events: none; transform-origin: var(--origin, bottom left);
|
||||
transition: opacity var(--d-pop) var(--ease-out), transform var(--d-pop) var(--ease-out);
|
||||
}
|
||||
.pop.on { opacity: 1; transform: none; pointer-events: auto; }
|
||||
.pop.instant { transition: none; }
|
||||
:root[data-reduce="1"] .pop { transform: none; }
|
||||
.pop-search { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
|
||||
.pop-search input { flex: 1; background: transparent; border: 0; outline: 0; font-size: 14px; }
|
||||
.pop-list { overflow-y: auto; padding: 6px; }
|
||||
.pop-group { font-size: 11px; color: var(--text-3); padding: 10px 10px 4px; display: flex; gap: 6px; }
|
||||
.wf-row {
|
||||
display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: left;
|
||||
padding: 8px 10px; border-radius: var(--r-md);
|
||||
}
|
||||
.wf-row[aria-selected="true"] { background: var(--bg-4); }
|
||||
.wf-row .n { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.wf-row .s { grid-column: 1; display: flex; gap: 4px; flex-wrap: wrap; }
|
||||
.wf-row .r { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 11px; text-align: right; }
|
||||
.wf-row.off .n { color: var(--text-3); }
|
||||
.pop-foot { border-top: 1px solid var(--line); padding: 8px; display: flex; gap: 6px; align-items: center; }
|
||||
.pop-foot .hint { margin-left: auto; font-size: 11px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
|
||||
|
||||
.menu { width: 260px; }
|
||||
.menu .pop-list button { display: flex; width: 100%; padding: 8px 10px; border-radius: var(--r-sm); gap: 8px; align-items: center; }
|
||||
.menu .pop-list button:hover, .menu .pop-list button[aria-selected="true"] { background: var(--bg-4); }
|
||||
|
||||
/* ---------- 抽屉:导入工作流 ---------- */
|
||||
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); opacity: 0; pointer-events: none; transition: opacity var(--d-drawer) ease; z-index: 60; }
|
||||
.scrim.on { opacity: 1; pointer-events: auto; }
|
||||
.drawer {
|
||||
position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100vw; z-index: 61;
|
||||
background: var(--bg-2); border-left: 1px solid var(--line-2); display: flex; flex-direction: column;
|
||||
transform: translateX(100%); transition: transform var(--d-drawer) var(--ease-drawer);
|
||||
}
|
||||
.drawer.on { transform: none; }
|
||||
:root[data-reduce="1"] .drawer { transform: none; opacity: 0; pointer-events: none; transition: opacity var(--d-drawer) ease; }
|
||||
:root[data-reduce="1"] .drawer.on { opacity: 1; pointer-events: auto; }
|
||||
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
|
||||
.drawer-head h2 { font-size: 15px; margin: 0; flex: 1; }
|
||||
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
|
||||
.drawer-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }
|
||||
.drop {
|
||||
border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 14px; display: grid; gap: 10px;
|
||||
transition: border-color var(--d-state) ease, background-color var(--d-state) ease;
|
||||
}
|
||||
.drop.drag { border-color: var(--accent); background: var(--accent-soft); }
|
||||
.drop textarea { width: 100%; min-height: 110px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; font: 12px/1.5 var(--mono); color: var(--text-2); resize: vertical; outline: 0; }
|
||||
.checks { display: grid; gap: 8px; margin-top: 14px; }
|
||||
.check { display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--line); }
|
||||
.check .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-4); color: var(--text-3); font-size: 11px; transition: background-color var(--d-state) ease, color var(--d-state) ease; }
|
||||
.check.ok .ic { background: var(--accent-soft); color: var(--accent); }
|
||||
.check.bad .ic { background: var(--err-soft); color: var(--err); }
|
||||
.check.run .ic { background: var(--run-soft); color: var(--run); }
|
||||
.check .t { font-weight: 500; }
|
||||
.check .d { grid-column: 2; color: var(--text-3); font-size: 12px; }
|
||||
.check .d ul { margin: 4px 0 0; padding-left: 16px; }
|
||||
.slot-map { display: grid; gap: 6px; margin-top: 8px; }
|
||||
.slot-map div { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--bg-3); }
|
||||
.usage-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
|
||||
.usage-pick button { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); font-size: 12px; }
|
||||
.usage-pick button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
||||
|
||||
/* ---------- Toast ---------- */
|
||||
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: grid; gap: 8px; pointer-events: none; max-width: 400px; }
|
||||
.toast {
|
||||
display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: var(--r-md);
|
||||
background: var(--bg-4); box-shadow: var(--shadow-float); pointer-events: auto; min-width: 280px;
|
||||
transition: opacity var(--d-enter) var(--ease-out), transform var(--d-enter) var(--ease-out);
|
||||
}
|
||||
@starting-style { .toast { opacity: 0; transform: translateY(100%); } }
|
||||
.toast.out { opacity: 0; transform: translateY(100%); }
|
||||
:root[data-reduce="1"] .toast, :root[data-reduce="1"] .toast.out { transform: none; }
|
||||
.toast .grow { flex: 1; }
|
||||
.toast button { color: var(--accent); font-weight: 600; }
|
||||
|
||||
/* ---------- 任务托盘 ---------- */
|
||||
.tray { width: 340px; }
|
||||
.tray-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-md); width: 100%; text-align: left; }
|
||||
.tray-row:hover { background: var(--bg-3); }
|
||||
.tray-row .t { width: 36px; height: 36px; border-radius: 6px; background: var(--bg-4) center / cover; }
|
||||
.tray-row .n { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.tray-row .m { font-size: 11px; color: var(--text-3); }
|
||||
|
||||
/* ---------- 项目 / 创作流程 ---------- */
|
||||
.page { overflow-y: auto; padding: 24px 28px 40px; align-content: start; gap: 18px; }
|
||||
.hero {
|
||||
display: grid; grid-template-columns: 300px 1fr; gap: 20px; padding: 16px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line);
|
||||
}
|
||||
.hero .cover { aspect-ratio: 16 / 9; border-radius: var(--r-md); background: var(--bg-4) center / cover; }
|
||||
.hero h2 { margin: 2px 0 6px; font-size: 20px; }
|
||||
.hero p { margin: 0 0 12px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
||||
.track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 10px 0 14px; }
|
||||
.track button { text-align: left; padding: 8px 10px; border-radius: var(--r-md); background: var(--bg-3); font-size: 12px; color: var(--text-2); transition: background-color var(--d-state) ease; }
|
||||
.track button .k { display: block; font-size: 11px; color: var(--text-3); }
|
||||
.track button.done .k { color: var(--accent); }
|
||||
.track button.cur { background: var(--bg-4); color: var(--text); box-shadow: inset 0 -2px 0 var(--warn); }
|
||||
.track button.cur .k { color: var(--warn); }
|
||||
.track button[aria-current="step"] { outline: 1px solid var(--text-3); }
|
||||
.proj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
|
||||
.proj { display: grid; gap: 6px; padding: 12px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); text-align: left; transition: border-color var(--d-state) ease; }
|
||||
@media (hover: hover) and (pointer: fine) { .proj:hover { border-color: var(--line-2); } }
|
||||
.proj .pips { display: flex; gap: 3px; }
|
||||
.proj .pips i { flex: 1; height: 3px; border-radius: 3px; background: var(--bg-4); }
|
||||
.proj .pips i.d { background: var(--accent); }
|
||||
.proj .pips i.c { background: var(--warn); }
|
||||
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
.shot { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--bg-2); border: 1px solid var(--line); align-items: start; }
|
||||
.shot .no { font: 600 13px var(--mono); color: var(--warn); }
|
||||
.shot .p { color: var(--text-2); font-size: 12.5px; }
|
||||
.shot .en { margin-top: 6px; font: 11.5px/1.5 var(--mono); color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
||||
.placeholder { place-items: center; text-align: center; color: var(--text-3); padding: 40px; }
|
||||
.placeholder h2 { color: var(--text); font-size: 16px; }
|
||||
|
||||
/* 原型标记 */
|
||||
.proto-flag { font-size: 11px; color: var(--text-3); border: 1px dashed var(--line-2); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
|
||||
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
|
||||
.switch input { accent-color: var(--accent); }
|
||||
|
||||
/* 底部标签栏(窄屏) */
|
||||
.tabbar { display: none; }
|
||||
.mobile-only { display: none; }
|
||||
|
||||
/* ---------- 中屏:检视区改为右侧浮层 ---------- */
|
||||
@media (max-width: 1180px) {
|
||||
.desk { grid-template-columns: minmax(0, 1fr); }
|
||||
.inspector {
|
||||
position: fixed; top: 52px; right: 0; bottom: 0; width: 400px; z-index: 40; box-shadow: var(--shadow-float);
|
||||
transform: translateX(100%); transition: transform var(--d-drawer) var(--ease-drawer);
|
||||
}
|
||||
.inspector.on { transform: none; }
|
||||
:root[data-reduce="1"] .inspector { transform: none; opacity: 0; pointer-events: none; transition: opacity var(--d-drawer) ease; }
|
||||
:root[data-reduce="1"] .inspector.on { opacity: 1; pointer-events: auto; }
|
||||
.insp-close { display: inline-flex !important; }
|
||||
.search-btn { min-width: 0; }
|
||||
.search-btn .lbl { display: none; }
|
||||
}
|
||||
|
||||
/* ---------- 窄屏:底部标签栏 + 输入台底部抽屉 ---------- */
|
||||
@media (max-width: 760px) {
|
||||
.app { grid-template-columns: 1fr; }
|
||||
.rail { display: none; }
|
||||
.main { grid-template-rows: 48px minmax(0, 1fr) 56px; }
|
||||
.topbar { padding: 0 12px; gap: 8px; }
|
||||
.topbar .hide-sm { display: none; }
|
||||
.mobile-only { display: inline-flex; }
|
||||
.tabbar {
|
||||
display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: var(--bg);
|
||||
}
|
||||
.tabbar button { display: grid; place-items: center; gap: 2px; font-size: 11px; color: var(--text-3); padding-top: 6px; }
|
||||
.tabbar button svg { width: 20px; height: 20px; }
|
||||
.tabbar button[aria-current="page"] { color: var(--accent); }
|
||||
.filters { padding: 8px 12px; overflow-x: auto; }
|
||||
.filters .count { display: none; }
|
||||
.feed { padding: 12px 12px 4px; }
|
||||
.take { grid-template-columns: minmax(0, 1fr) auto; padding: 10px; }
|
||||
.take-head { flex-wrap: wrap; row-gap: 2px; }
|
||||
.take-out { grid-row: 1 / span 2; }
|
||||
.take-state { grid-column: 1 / -1; flex-wrap: wrap; }
|
||||
.take-state .txt, .take-state .err-txt { white-space: nowrap; }
|
||||
.take-actions { margin-left: auto; }
|
||||
.toasts { left: 12px; right: 12px; bottom: 124px; max-width: none; }
|
||||
.thumb { width: 108px; }
|
||||
.thumb.portrait { width: 72px; }
|
||||
.bar { flex-basis: 80px; }
|
||||
.composer-wrap { padding: 6px 10px 10px; }
|
||||
.composer:not(.expanded) .slots, .composer:not(.expanded) .opt-chip { display: none; }
|
||||
.composer:not(.expanded) .prompt { min-height: 40px; max-height: 40px; padding: 10px 12px 2px; white-space: nowrap; overflow: hidden; }
|
||||
.composer.expanded { position: fixed; left: 0; right: 0; bottom: 56px; z-index: 45; border-radius: 16px 16px 0 0; border-bottom: 0; box-shadow: var(--shadow-float); }
|
||||
.chip { max-width: 170px; }
|
||||
.inspector { top: 0; width: 100vw; bottom: 0; z-index: 70; }
|
||||
.pop { left: 0 !important; right: 0; top: auto !important; bottom: 0 !important; width: 100vw; border-radius: 16px 16px 0 0; max-height: 78vh; --origin: bottom center; }
|
||||
.drawer { width: 100vw; }
|
||||
.page { padding: 16px 12px 24px; }
|
||||
.hero { grid-template-columns: 1fr; }
|
||||
.track { grid-template-columns: repeat(5, minmax(64px, 1fr)); overflow-x: auto; }
|
||||
.shot { grid-template-columns: 30px 1fr; }
|
||||
.shot .btn { grid-column: 2; justify-self: start; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
:root { --d-press: 0ms; --d-pop: 120ms; --d-enter: 120ms; --d-drawer: 120ms; }
|
||||
.take.new, .tile.filled { transform: none !important; }
|
||||
.thumb.pending::after { animation: none; }
|
||||
}
|
||||
|
After Width: | Height: | Size: 199 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 46 KiB |
@@ -0,0 +1,156 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>影工坊 · 流水台交互原型(HEL-646,隔离原型)</title>
|
||||
<link rel="stylesheet" href="app.css">
|
||||
</head>
|
||||
<body>
|
||||
<svg width="0" height="0" style="position:absolute">
|
||||
<defs>
|
||||
<symbol id="i-home" viewBox="0 0 24 24"><path d="M3 11l9-7 9 7v9a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/></symbol>
|
||||
<symbol id="i-flow" viewBox="0 0 24 24"><path d="M4 6h5v5H4zM15 13h5v5h-5zM9 8.5h3.5a2 2 0 0 1 2 2V13" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/></symbol>
|
||||
<symbol id="i-spark" viewBox="0 0 24 24"><path d="M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8zM18.5 16l.8 2.2 2.2.8-2.2.8-.8 2.2-.8-2.2-2.2-.8 2.2-.8z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/></symbol>
|
||||
<symbol id="i-list" viewBox="0 0 24 24"><path d="M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></symbol>
|
||||
<symbol id="i-agent" viewBox="0 0 24 24"><circle cx="12" cy="8" r="4" fill="none" stroke="currentColor" stroke-width="1.7"/><path d="M4 20c1.5-4 4.5-6 8-6s6.5 2 8 6" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></symbol>
|
||||
<symbol id="i-link" viewBox="0 0 24 24"><path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></symbol>
|
||||
<symbol id="i-gear" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-width="1.7"/><path d="M12 2.5v3M12 18.5v3M21.5 12h-3M5.5 12h-3M18.7 5.3l-2.1 2.1M7.4 16.6l-2.1 2.1M18.7 18.7l-2.1-2.1M7.4 7.4L5.3 5.3" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></symbol>
|
||||
<symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></symbol>
|
||||
<symbol id="i-x" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6L6 18" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"/></symbol>
|
||||
<symbol id="i-play" viewBox="0 0 24 24"><path d="M7 4l13 8-13 8z"/></symbol>
|
||||
<symbol id="i-down" viewBox="0 0 24 24"><path d="M6 9l6 6 6-6" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"/></symbol>
|
||||
<symbol id="i-right" viewBox="0 0 24 24"><path d="M9 6l6 6-6 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol>
|
||||
<symbol id="i-sliders" viewBox="0 0 24 24"><path d="M4 7h10M18 7h2M4 17h4M12 17h8" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="16" cy="7" r="2" fill="none" stroke="currentColor" stroke-width="1.8"/><circle cx="10" cy="17" r="2" fill="none" stroke="currentColor" stroke-width="1.8"/></symbol>
|
||||
<symbol id="i-search" viewBox="0 0 24 24"><circle cx="11" cy="11" r="6.5" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M16 16l4 4" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></symbol>
|
||||
<symbol id="i-upload" viewBox="0 0 24 24"><path d="M12 15V4M7 9l5-5 5 5M5 19h14" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></symbol>
|
||||
<symbol id="i-dice" viewBox="0 0 24 24"><rect x="4" y="4" width="16" height="16" rx="3" fill="none" stroke="currentColor" stroke-width="1.7"/><circle cx="9" cy="9" r="1.2"/><circle cx="15" cy="15" r="1.2"/><circle cx="15" cy="9" r="1.2"/><circle cx="9" cy="15" r="1.2"/></symbol>
|
||||
<symbol id="i-back" viewBox="0 0 24 24"><path d="M15 6l-6 6 6 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></symbol>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
<div class="app">
|
||||
<nav class="rail" aria-label="主导航">
|
||||
<div class="logo" aria-hidden="true">影</div>
|
||||
<button class="rail-btn" data-nav="projects"><svg><use href="#i-home"/></svg><span class="tip">项目</span><span class="sr">项目</span></button>
|
||||
<button class="rail-btn" data-nav="flow"><svg><use href="#i-flow"/></svg><span class="tip">创作流程</span><span class="sr">创作流程</span></button>
|
||||
<button class="rail-btn" data-nav="desk" aria-current="page"><svg><use href="#i-spark"/></svg><span class="tip">生成台(生图 + 生视频)</span><span class="sr">生成台</span></button>
|
||||
<button class="rail-btn" data-nav="tasks"><svg><use href="#i-list"/></svg><span class="tip">全部任务</span><span class="sr">全部任务</span></button>
|
||||
<button class="rail-btn" data-nav="agents"><svg><use href="#i-agent"/></svg><span class="tip">智能体</span><span class="sr">智能体</span></button>
|
||||
<div class="spacer"></div>
|
||||
<button class="rail-btn" data-nav="connections"><svg><use href="#i-link"/></svg><span class="tip">ComfyUI 连接与工作流库</span><span class="sr">连接</span></button>
|
||||
<button class="rail-btn" data-nav="settings"><svg><use href="#i-gear"/></svg><span class="tip">模型与设置</span><span class="sr">设置</span></button>
|
||||
</nav>
|
||||
|
||||
<div class="main">
|
||||
<header class="topbar">
|
||||
<div class="crumb">
|
||||
<h1 id="page-title">生成台</h1>
|
||||
<button class="capsule" id="scope-btn" aria-haspopup="menu"><span id="scope-label">全部来源</span><svg width="12" height="12"><use href="#i-down"/></svg></button>
|
||||
</div>
|
||||
<div class="grow"></div>
|
||||
<span class="proto-flag hide-sm">隔离原型 · 不连后端</span>
|
||||
<label class="switch hide-sm"><input type="checkbox" id="reduce-toggle">减少动态</label>
|
||||
<button class="capsule search-btn" id="cmd-btn" title="Ctrl/⌘ + K"><svg width="14" height="14"><use href="#i-search"/></svg><span class="lbl">搜索工作流、项目、任务</span><span class="kbd">Ctrl K</span></button>
|
||||
<button class="capsule" id="tray-btn" aria-haspopup="dialog"><span class="dot" id="tray-dot"></span><span id="tray-label">队列空闲</span></button>
|
||||
<button class="capsule hide-sm" id="conn-btn" title="生成请求由工作台服务器发往该 ComfyUI"><span class="dot"></span>本机 ComfyUI-4080 · 22 ms</button>
|
||||
</header>
|
||||
|
||||
<!-- 生成台 -->
|
||||
<section class="view desk on" id="view-desk" aria-label="生成台">
|
||||
<div class="desk-center">
|
||||
<div class="context-bar" id="context-bar">
|
||||
<button class="btn sm ghost" id="ctx-back"><svg><use href="#i-back"/></svg>返回镜头脚本</button>
|
||||
<span>来自 <b>《雨夜便利店》· 镜头 S1</b>,生成结果会回填到该镜头</span>
|
||||
</div>
|
||||
<div class="filters">
|
||||
<div class="seg" role="group" aria-label="按类型筛选">
|
||||
<button data-filter="all" aria-pressed="true">全部</button>
|
||||
<button data-filter="image" aria-pressed="false">图片</button>
|
||||
<button data-filter="video" aria-pressed="false">视频</button>
|
||||
<button data-filter="failed" aria-pressed="false">失败</button>
|
||||
</div>
|
||||
<span class="count" id="feed-count"></span>
|
||||
</div>
|
||||
<div class="feed" id="feed" role="listbox" aria-label="生成记录(↑↓ 切换)" tabindex="0"></div>
|
||||
<div class="composer-wrap">
|
||||
<div class="composer" id="composer">
|
||||
<div class="slots" id="slots"></div>
|
||||
<textarea class="prompt" id="prompt" rows="2" placeholder="描述想要的画面…(Ctrl/⌘ + Enter 生成,/ 快速聚焦)"></textarea>
|
||||
<div class="composer-foot">
|
||||
<button class="chip wf" id="wf-chip" aria-haspopup="listbox"><svg><use href="#i-flow"/></svg><span class="lbl" id="wf-chip-label"></span><svg><use href="#i-down"/></svg></button>
|
||||
<span id="common-chips" style="display:contents"></span>
|
||||
<button class="chip opt-chip" id="params-chip"><svg><use href="#i-sliders"/></svg><span id="params-chip-label">全部参数</span></button>
|
||||
<div class="submit-group">
|
||||
<button class="why" id="why" hidden></button>
|
||||
<button class="btn primary gen-btn" id="gen-btn">生成</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aside class="inspector" id="inspector" aria-label="检视区">
|
||||
<div class="insp-tabs">
|
||||
<div class="seg" role="tablist">
|
||||
<button data-tab="preview" aria-pressed="true">结果</button>
|
||||
<button data-tab="params" aria-pressed="false">参数</button>
|
||||
</div>
|
||||
<div class="grow" style="flex:1"></div>
|
||||
<span class="muted" style="font-size:11px" id="insp-hint">↑ ↓ 切换 · 空格播放</span>
|
||||
<button class="btn sm ghost insp-close" id="insp-close" style="display:none" aria-label="关闭"><svg><use href="#i-x"/></svg></button>
|
||||
</div>
|
||||
<div class="insp-body" id="insp-preview"></div>
|
||||
<div class="insp-body" id="insp-params" hidden></div>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
<!-- 项目 -->
|
||||
<section class="view page" id="view-projects" aria-label="项目"></section>
|
||||
<!-- 创作流程 -->
|
||||
<section class="view page" id="view-flow" aria-label="创作流程"></section>
|
||||
<!-- 其他页占位 -->
|
||||
<section class="view page placeholder" id="view-other"></section>
|
||||
|
||||
<nav class="tabbar" aria-label="主导航(窄屏)">
|
||||
<button data-nav="projects"><svg><use href="#i-home"/></svg>项目</button>
|
||||
<button data-nav="flow"><svg><use href="#i-flow"/></svg>创作</button>
|
||||
<button data-nav="desk" aria-current="page"><svg><use href="#i-spark"/></svg>生成</button>
|
||||
<button data-nav="more"><svg><use href="#i-list"/></svg>更多</button>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 工作流面板 -->
|
||||
<div class="pop" id="wf-pop" role="dialog" aria-label="选择工作流">
|
||||
<div class="pop-search"><svg width="16" height="16"><use href="#i-search"/></svg><input id="wf-search" placeholder="搜索工作流,或输入用途:图生视频、参考图…" autocomplete="off"></div>
|
||||
<div class="pop-list" id="wf-list" role="listbox"></div>
|
||||
<div class="pop-foot">
|
||||
<button class="btn sm" id="import-open"><svg><use href="#i-upload"/></svg>导入 ComfyUI 工作流 JSON…</button>
|
||||
<span class="hint"><span class="kbd">↑↓</span>选择 <span class="kbd">Enter</span>使用 <span class="kbd">Esc</span>关闭</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 通用小菜单 -->
|
||||
<div class="pop menu" id="menu-pop" role="menu"><div class="pop-list" id="menu-list"></div></div>
|
||||
<!-- 任务托盘 -->
|
||||
<div class="pop tray" id="tray-pop" role="dialog" aria-label="任务托盘"><div class="pop-list" id="tray-list"></div></div>
|
||||
|
||||
<!-- 导入抽屉 -->
|
||||
<div class="scrim" id="scrim"></div>
|
||||
<aside class="drawer" id="drawer" role="dialog" aria-modal="true" aria-labelledby="drawer-title">
|
||||
<div class="drawer-head">
|
||||
<h2 id="drawer-title">导入 ComfyUI 工作流</h2>
|
||||
<button class="btn sm ghost" id="drawer-close" aria-label="关闭"><svg><use href="#i-x"/></svg></button>
|
||||
</div>
|
||||
<div class="drawer-body" id="drawer-body"></div>
|
||||
<div class="drawer-foot" id="drawer-foot"></div>
|
||||
</aside>
|
||||
|
||||
<input type="file" id="file-input" accept="image/png,image/jpeg,image/webp" multiple hidden>
|
||||
<input type="file" id="json-input" accept=".json,application/json" hidden>
|
||||
<div class="toasts" id="toasts" aria-live="polite"></div>
|
||||
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 865 KiB |
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 213 KiB |
|
After Width: | Height: | Size: 224 KiB |
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 264 KiB |
|
After Width: | Height: | Size: 263 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 228 KiB |
@@ -0,0 +1,93 @@
|
||||
# 影工坊整站方案 · 施工员版「流水台」
|
||||
|
||||
> 一张桌面走完「选工作流 → 放素材写提示词 → 生成 → 挑结果」,不跳页、不重复找历史。
|
||||
> 隔离原型:本目录 `index.html`(双击即可在 Chrome / Edge 打开,不连后端,数据取自测试站真实工作流与任务记录)。
|
||||
|
||||
## 一、和已有方案的区别
|
||||
|
||||
| 方案 | 布局 | 交互方式 |
|
||||
|---|---|---|
|
||||
| 旧「纸上制片厂」「信号控制台」 | 同一副骨架:左侧文字导航 + 卡片网格 + 三栏表单 | 只换配色 |
|
||||
| 美术师「放映厅」 | 作品全幅居中的剧场播放器,控件退到边缘 | 以看片挑片为主 |
|
||||
| **施工员「流水台」** | **60px 图标轨 + 中间记录流 + 底部常驻输入台 + 右侧检视区** | **像对话一样一条条往下生成;工作流决定输入槽;结果就地出现、就地切换** |
|
||||
|
||||
「流水台」主要改的是结构和手感,配色 Token 可以单独替换。白栖知如果更喜欢「放映厅」的色调,可以把「放映厅」的颜色套到「流水台」的结构上。原型当前用的是暖石墨底色,只有主按钮、选中项和「完成」三处用青柠色。
|
||||
|
||||
## 二、现状走查(测试站 192.168.200.15:8080,1.5.8)
|
||||
|
||||
| # | 现状 | 建议 | 理由 |
|
||||
|---|---|---|---|
|
||||
| 1 | 390 宽整站只显示「手机端暂不适配」 | 窄屏改为底部标签栏;输入台收起时只占一行,点开后升成底部抽屉;点结果进入全屏检视 | 主卡验收要求覆盖窄屏 |
|
||||
| 2 | 「项目 / 创作工作台」两个入口,还要多经一个选择页;生图、生视频、生成任务是三个页面,各有一份历史 | 合并成一个「生成台」,页面形态由所选工作流的用途决定;任务页就是生成台的「全部来源」视图,右上角托盘随时看进度;`/image` `/video` 保留为预选入口 | 少跳页,历史只保留一份 |
|
||||
| 3 | 生图页左栏被 8 行红色错误占满,输入图和提示词被挤到首屏以下;1024 宽时「开始生成」压住上传区 | 错误收进工作流选择器的状态标签和检视区「参数」页,输入台只留一行「工作流不可用 · 查看原因」 | 高频操作区不让异常信息占满 |
|
||||
| 4 | 中栏「最近结果」和右栏「历史」是两套列表;视频历史只有缩略图,看不到提示词和状态 | 只保留一条记录流,每条带输入缩略图、提示词、状态和产物 | 一眼能看出哪组参数出了哪个结果 |
|
||||
| 5 | 「没有进行中的任务」横幅和具体任务分在两处,提交后反馈的位置不固定 | 点「生成」后,记录流底部立即出现「排队」记录;同一位置依次显示进度条和阶段(如「采样 2/4」),完成后换成产物 | 反馈出现在视线所在的位置 |
|
||||
| 6 | 上传区是一个大虚线框,9 张参考图会占满左栏;没有「上传中」状态,非法文件的报错位置不明确 | 改成 58px 小槽位,显示「已选 n / 9」和序号,上传中加遮罩,错误提示放在槽位下方;整个输入台都能拖入 | 放满素材后仍看得到提示词和按钮 |
|
||||
| 7 | 点选历史后播放器直接替换,不能用键盘切换 | 点选时 150ms 淡入;↑ ↓ / J K 即时切换,不加动画;空格播放 | 高频操作不加动画(Emil 规范) |
|
||||
| 8 | 每次删除都弹确认框 | 单条记录删除后立即隐藏,并提供 5 秒撤销,窗口结束后才真正调用删除接口;删项目、删工作流等大操作仍然弹确认 | 撤销比确认更快,也更不容易误删 |
|
||||
| 9 | `Qwen_image_2.1_00003.png` 在服务器上已不存在,结果区和任务页显示浏览器裂图 | 显示明确的「文件缺失」状态,并提供「用相同参数重做 / 移除记录」 | 裂图会让人以为系统坏了 |
|
||||
| 10 | 侧栏常驻红色「恒源云 连接失败」,但生图实际走的是已连通的「本机 ComfyUI-4080」;默认连接恰好是连不上的那台 | 顶栏和输入台只显示「本次生成要用的连接」,可以切换;连接不通时,生成按钮旁直接写原因 | 避免让人误以为不能生成 |
|
||||
| 11 | 「minimaxh3-文生图加速版」实际被判定为文生视频 | 选择器按用途分组,并显示输入槽摘要(仅提示词 / 首帧 ×1 / 参考图 1–9 张) | 名称是用户起的,用途以 JSON 为准 |
|
||||
| 12 | 8 个参数全部平铺 | 比例、时长、种子做成输入台上的芯片,其余参数折叠到检视区;每项标注「原值」,改过的高亮并计数 | 多数时候只改提示词和素材 |
|
||||
| 13 | 失败记录把整段英文 HTTP 400 原文铺开 | 先给一行中文结论(如「连接上缺 3 个模型文件」),详情可展开;重试前先提示仍缺模型 | 可读,也不丢失信息 |
|
||||
| 14 | 创作流程里的生成和独立生视频是两套界面 | 「生成本镜视频」打开生成台,并带上下文条(「来自《雨夜便利店》· 镜头 S1,结果回填」)和一键返回 | 同一套输入台,只需学一次 |
|
||||
| 15 | 150px 文字侧栏共 9 项 | 60px 图标轨(悬停显示名称)加 Ctrl K 全局搜索 | 把宽度让给作品。代价是新用户第一次需要悬停识别图标 |
|
||||
|
||||
## 三、结构与操作方式
|
||||
|
||||
- **桌面 ≥1180**:左边 60px 图标轨;顶栏放标题、范围胶囊(全部来源 / 独立创作 / 某项目)、Ctrl K、任务托盘和本次连接;中间记录流按时间从上到下,最新一条在底部,紧贴输入台;右侧 420px 检视区分「结果 / 参数」两个页签。
|
||||
- **中屏 761–1179**:检视区改为右侧浮层,点结果时滑入;其余结构不变。
|
||||
- **窄屏 ≤760**:底部标签栏(项目 / 创作 / 生成 / 更多);输入台收起时只有一行,聚焦后升成底部抽屉;工作流面板改为底部弹层;检视区全屏显示,可关闭返回。
|
||||
- **工作流选择**:点输入台上的工作流芯片,面板从芯片处弹出,按五类用途分组,每行显示输入槽摘要、绑定连接和状态(可用 / 未试运行 / 上次失败 / 不可用)。支持输入过滤、↑↓ 选择、Enter 使用,底部是「导入 ComfyUI 工作流 JSON…」。
|
||||
- **导入**:右侧抽屉。粘贴、拖入或选择文件后自动检查,依次是:1 文件结构 → 2 用途与输入槽(不确定时让用户选)→ 3 对照连接上的节点与模型 → 4 可选试运行(只有拿到可下载、类型正确的产物才算通过)。保存后自动选中,输入台立刻按这份 JSON 显示输入槽。
|
||||
- **输入槽只随 JSON 出现**:文生图 / 文生视频没有图片槽;图生图显示「输入图 ×1」;图生视频显示「首帧图 ×1」;参考生视频显示「参考图 1–9 张」。原型不画参考视频 / 音频入口,因为当前三份真实 JSON 没有这类连线。切换工作流时已放入的图片会保留,按新槽位的上限截断。
|
||||
- **结果切换**:点记录会在检视区淡入;键盘 ↑ ↓ 即时切换;「复用」把工作流、素材和参数放回输入台;图片结果可以「送入当前图片槽」。
|
||||
|
||||
## 四、动效(按 emil-skills `animate` 与 `review-animations/STANDARDS` 核对)
|
||||
|
||||
| 场景 | 频率 | 做法 | 参数 |
|
||||
|---|---|---|---|
|
||||
| 按钮 / 芯片按下 | 高 | `scale(0.97)` | 120ms · `cubic-bezier(0.23,1,0.32,1)` |
|
||||
| 点芯片打开工作流面板 | 中 | 从芯片方向 `scale(0.96)`→1,同时淡入 | 180ms · 同上 |
|
||||
| Ctrl K 打开面板 / ↑↓ 切换结果 | 高·键盘 | **不做动画** | 0 |
|
||||
| 导入抽屉 / 中屏检视区 | 偶尔 | `translateX(100%)`→0,用 transition,中途可反向 | 280ms · `cubic-bezier(0.32,0.72,0,1)` |
|
||||
| 提交后新记录出现 | 每次 | 淡入 + 上移 8px(`@starting-style`) | 220ms · ease-out |
|
||||
| 进度条 | 持续 | `transform: scaleX()` | 400ms · linear |
|
||||
| 完成后缩略图替换 / 点选切换结果 | 每次 | 透明度交叉淡入 | 150ms · ease |
|
||||
| 删除记录 | 偶尔 | 左移 12px 并淡出,Toast 提供撤销 | 200ms / 5 秒撤销窗口 |
|
||||
| Toast | 偶尔 | 从下方进出,用 transition 不用 keyframes,可被打断 | 220ms |
|
||||
| 导入检查结果 | 偶尔 | 逐条出现,间隔 60ms,不阻塞操作 | 200ms |
|
||||
|
||||
- 只动 `transform` 和 `opacity`;悬停效果只在 `(hover: hover) and (pointer: fine)` 下生效。
|
||||
- 减少动态效果:系统开启 `prefers-reduced-motion` 时自动生效,原型顶栏也有手动开关。开启后去掉所有位移,只保留不超过 120ms 的透明度变化。
|
||||
- 全部动效用 CSS transition 实现,**不引入新依赖**。
|
||||
|
||||
**性能风险与代价**:① 记录流可能有上百条视频。缩略图用封面图,检视区只挂一个 `<video preload="metadata">`;超过约 200 条时要做分页或虚拟列表(中等工作量)。② SSE 进度只更新对应那一条记录,不重渲染整个列表。③ `@starting-style` 需要 Chrome 117+ / Safari 17.5+,更旧的浏览器没有入场动画,功能不受影响。④ 撤销删除需要延迟 5 秒才发送删除请求,页面关闭时用 `pagehide` + `keepalive` 补发;后端不用改。代价是多个标签页之间会短暂不一致。⑤ 不做大面积 `backdrop-filter` 模糊。
|
||||
|
||||
## 五、能力边界
|
||||
|
||||
原型只画测试站已有的能力:ComfyUI 工作流(本机 / 局域网 / 可达云端地址)、五类用途识别、导入检查与试运行、参考图最多 9 张、删除、点选播放、失败重试。原型里**没有** gpt-image2、nano-banana、即梦、可灵等云端媒体入口。「Qwen Image 2.1 图片编辑(用户提供)」按测试站真实状态标为不可用,列出了 3 个真实报错。原型中新提交任务的结果是「演示产物」(取自测试站历史结果,页面上有标注),进度和耗时都是演示加速,不代表真实生成速度。
|
||||
|
||||
## 六、改造清单(calliope-web)
|
||||
|
||||
| 文件 / 组件 | 改动 |
|
||||
|---|---|
|
||||
| `src/routes/app.css`、`tailwind.config.js` | 设计 Token 统一来源:颜色、圆角、动效曲线与时长的 CSS 变量;清理组件内硬编码色值 |
|
||||
| `shell/AppShell.svelte`、`NavRail.svelte`、`AppHeader.svelte` | 图标轨 + 顶栏(范围胶囊、Ctrl K、任务托盘、本次连接);窄屏底部标签栏;去掉「手机端暂不适配」拦截 |
|
||||
| `studio/StudioGenerate.svelte`(2763 行) | 拆成 `Composer`、`WorkflowPicker`、`SlotTray`(复用 `MediaSlot` / `RefImageGrid`)、`TakeFeed` / `TakeCard`、`Inspector`;表单逻辑复用 `ComfyDynamicForm.svelte`,只改展示方式(常用芯片 + 高级折叠) |
|
||||
| `routes/image`、`routes/video`、`routes/tasks` | 三页合并为生成台的预设入口或视图;托盘复用 `JobRow.svelte` / `ActivityPanel.svelte` |
|
||||
| `routes/connections`、`WorkflowTestDialog.svelte` | 导入改为右侧抽屉,四步检查逐条显示;沿用现有 `/api/workflows/analyze`、`check`、`test` 接口,不改后端 |
|
||||
| `ToastHost.svelte`、`toast.ts` | Toast 支持操作按钮(撤销);`ConfirmDialog.svelte` 只留给不可逆的大操作 |
|
||||
| `routes/+page.svelte`、`workbench/[id]`、`StageStepper.svelte` | 「继续上次」主卡 + 五段轨道;「生成本镜视频」带上下文跳到生成台,结果回填 |
|
||||
| `SafeMedia.svelte`、`ImageLightbox.svelte` | 统一「文件缺失」状态 |
|
||||
| i18n 七个语种 | 补齐新增 key |
|
||||
|
||||
## 七、粗略施工顺序(约 8–9 人日,拍板后再细化)
|
||||
|
||||
1. Token 与动效变量(0.5 天)
|
||||
2. 壳层:图标轨、顶栏、托盘、窄屏底栏(1 天)
|
||||
3. 生成台:输入台、工作流选择器、输入槽(2 天)
|
||||
4. 记录流、检视区、撤销删除、文件缺失状态(1.5 天)
|
||||
5. 导入抽屉四步检查(1 天)
|
||||
6. 项目和创作流程接入生成台上下文(1 天)
|
||||
7. 其余页换成统一组件,窄屏走查,i18n,交总工审核(1.5 天)
|
||||