{
if (compact && e.key === 'Escape' && !e.defaultPrevented) {
collapse();
}
}}
>
{compact ? (
) : null}
{showInputsRow ? (
{modeChip}
{imageSlots.length ? (
{imageSlots.map((entry) => {
const slot = entry.slot;
const value = slot
? {
previewUrl: slot.previewUrl,
status: entry.active
? slot.status || 'ready'
: 'unused',
error: slot.error,
}
: null;
const isMissing = !slot && entry.key === missingFrame;
const isFlagged = Boolean(
slot &&
flaggedInput &&
entry.key === flaggedInput.key &&
(flaggedInput.index === undefined ||
entry.index === flaggedInput.index),
);
const movable =
entry.key === 'reference_images' && slot && entry.index > 0;
return (
pickImage(entry.key, entry.index, file)
}
onRemove={() => handleRemove(entry)}
onRetry={() => retryImage(entry.key, entry.index, slot)}
/>
{movable ? (
) : null}
);
})}
) : null}
{kind === 'video' &&
imageSlots.some((s) => s.key === 'first_frame' && s.active) ? (
{
if (portraitRef) removeImage('first_frame');
}}
/>
) : null}
{modelAcceptsImages && !modeHasImages ? (
<>
{
handleFiles(e.target.files);
e.target.value = '';
}}
/>
>
) : null}
{pendingBox}
{missingFrame ? (
{missingFrame === 'last_frame' ? t('缺少尾帧') : t('缺少首帧')}
{canBackToI2V ? (
) : null}
) : null}
{hasUnused ? (
{t('置灰的图片当前不会提交,切回支持的模型或模式后自动恢复')}
) : null}
) : null}
{refMode && refs.length ? (
{t('在提示词中引用:')}
{refs.map((r, i) => (
))}
) : null}
{modelPicker}
{dockParams.map((p) => (
))}
{hasAdvanced ? (
setAdvancedOpen(false)}
title={t('高级设置')}
isMobile={isMobile}
sheetHeight={sheetHeight(70)}
className='cs-advanced-pop'
trigger={
}
>
) : null}
{promptHistory.length ? (
({
key: item,
label: (
{item}
),
onClick: () => {
setPrompt(item);
requestAnimationFrame(focusPrompt);
},
})),
},
],
}}
>
) : null}
{notify.supported ? (
) : (
)
}
onClick={() => {
const next = !notify.enabled;
setNotifyEnabled(next);
if (next && notify.permission === 'denied') {
showInfo(
t('浏览器已禁止本站通知,请在浏览器设置中允许后再试'),
);
} else if (next) {
showSuccess(
t(
'已开启:生成完成后发送浏览器通知(需保持标签页打开)',
),
);
}
}}
>
{notify.enabled ? t('关闭完成通知') : t('完成后浏览器通知')}
}
>
) : null}
{allLocked ? (
{t('当前等级暂无可用模型,升级后即可使用')}
) : null}
{orgShortfall ? (
{t('{{budget}},提交可能失败,请联系企业管理员', {
budget: t(orgShortfall.labelKey),
})}
) : null}
{adjustments?.length ? (
{t('已按当前模型调整:{{list}}', {
list: adjustments.join(';'),
})}
) : null}
{lastError ? (
{lastError.title}
{lastError.detail ? {lastError.detail} : null}
{lastError.actionLabel ? (
) : null}
) : null}
{blockText ? (
{blockText}
) : (
priceText
)}
{generateButton(false)}
{compareSummary}
>
);
};
export default CreationDock;