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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user