HEL-665: prioritize media inputs and keep short-window result actions visible

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
leefer
2026-10-14 00:20:48 +08:00
co-authored by multica-agent
parent 16933b1dfc
commit ae9e34f6ab
6 changed files with 48 additions and 34 deletions
@@ -136,6 +136,9 @@
margin: 4px 0;
}
@media (max-height: 650px) {
.rail-items {
display: none;
}
.thumb,
img {
height: 32px;
@@ -947,10 +947,25 @@
></button
>
{#if currentMeta?.usage}<p class="tool-purpose">
{usageLabel(currentMeta.usage)} · <InputRequirementBadge io={currentMeta.media_io} />
</p>{/if}
{#if currentWorkflow?.description}<p class="tool-description">
{currentWorkflow.description}
{usageLabel(currentMeta.usage)} · <InputRequirementBadge
io={currentWorkflow
? {
in: [
...new Set([
...ds.slots.map((s) => s.mediaKind),
...ds.lists.map((l) =>
l.kind === 'video_list'
? 'video'
: l.kind === 'audio_list'
? 'audio'
: 'image',
),
]),
],
out: [kind],
}
: currentMeta.media_io}
/>
</p>{/if}
{#if !deskMetas.length && !$metaQuery.isLoading}<p>
还没有可用工具。<a href="/workflows?manage=1" target="_blank" rel="noreferrer"
@@ -1295,8 +1310,7 @@
font-size: 12px;
color: var(--accent);
}
.tool-purpose,
.tool-description {
.tool-purpose {
font-size: 12px;
line-height: 1.6;
color: var(--text-3);
@@ -120,6 +120,18 @@
{#if current}
<section class="input-section">
<h3>2 · 准备这次创作</h3>
{#if hasSlots}<div class="slots">
<SlotTray
bind:this={tray}
bind:busy={slotBusy}
{ds}
{values}
{showErrors}
{errors}
{onSet}
{onFromResults}
/>
</div>{/if}
{#if ds.prompt}<label for="desk-prompt"
>画面描述 {#if ds.prompt.required}<span>必填</span>{/if}</label
>
@@ -137,18 +149,6 @@
></textarea>
{#if promptErr}<p class="error" role="alert">{promptErr}</p>{/if}
{:else}<p class="note">这个工具不需要填写画面描述,请准备下面的素材。</p>{/if}
{#if hasSlots}<div class="slots">
<SlotTray
bind:this={tray}
bind:busy={slotBusy}
{ds}
{values}
{showErrors}
{errors}
{onSet}
{onFromResults}
/>
</div>{/if}
</section>
{#if commonInputs.length}<section class="input-section">
<h3>画面与生成设置</h3>
@@ -277,7 +277,7 @@
outline-offset: 1px;
}
.slots {
margin-top: 16px;
margin-bottom: 16px;
}
.slots :global(.tray) {
padding: 0;
@@ -142,19 +142,6 @@
else videoEl.pause();
}
function reduced(): boolean {
return (
document.documentElement.dataset.reduce === '1' ||
window.matchMedia('(prefers-reduced-motion: reduce)').matches
);
}
/** 150ms 交叉淡变 on pointer picks; keyboard switches stay instant. */
function xfade(_node: Element) {
const ms = crossfade ? (reduced() ? 120 : 150) : 0;
return { duration: ms, css: (t: number) => `opacity: ${t}` };
}
const mediaKey = $derived(`${job?.id ?? 'none'}:${output ?? st?.tone ?? ''}`);
let frameBusy = $state(false);