fix(out): 生成中改为「存在任一 out 运行」判定,不再依赖具体节点 id
This commit is contained in:
1 parent
ae41246f5a
commit
d3ef0f3940
2 files changed
+10
-4
No files matched your search
@@ -889,9 +889,15 @@
|
||||
}
|
||||
// 生成中(2026-12-02,用户裁定「方案 1」):某一轮还在跑时,旧图压暗 + 角标「生成中」,
|
||||
// 但不改 data.result —— 失败时旧图原样保留,不会出现「图没了」。
|
||||
// 生成中(2026-12-02,确定版):宿主在 runNode 开始时写 busy[outNodeId + '::out'] = true、
|
||||
// 结束时置 false(app.js 7233/7260),这里直接读它 —— 不再推导 progress 的 key 形状。
|
||||
const genBusy = !!(busy && busy[node.id + '::out'])
|
||||
// 生成中(2026-12-02,第三版):不再按具体 id 对 key —— 出图时宿主总会写一个 "…::out" 的忙标记,
|
||||
// 这里只问「当前有没有任何 out 运行在跑」,避免 out/gen 节点 id 取错(前两版就是这么不亮的)。
|
||||
const outBusyAny = !!(busy && Object.keys(busy).some((k) => k.slice(-5) === '::out' && busy[k]))
|
||||
const outProgAny = !!(progress && Object.keys(progress).some((k) => {
|
||||
if (k.slice(-5) !== '::out') return false
|
||||
const pg = progress[k]
|
||||
return !!(pg && (Number(pg.total) || 0) > (Number(pg.done) || 0))
|
||||
}))
|
||||
const genBusy = outBusyAny || outProgAny
|
||||
const ingSt = (global.IWBImageIngestView && global.IWBImageIngestView.get(r.url)) || null
|
||||
const imgEl = el('img', { key: 'out-img-' + cur + '-' + String(r.url || '').slice(-48), className: 'iwb-out-cell-img', decoding: 'async', fetchPriority: 'low', referrerPolicy: 'no-referrer', src: (ingSt && ingSt.localUrl) || wPreviewUrlOf((typeof wImgSrcForNode === 'function' ? wImgSrcForNode : wDisplayThumbOf)(thumbOf(r), Math.max(120, Math.min(360, (node && node.w ? node.w - 40 : 240))))), draggable: true, style: { aspectRatio: (r.width && r.height) ? String(r.width) + ' / ' + String(r.height) : undefined }, title: r.idb && r.data ? '单击选中 · 双击查看原图 · 拖到画布作参考图' : '单击选中 · 双击放大(可左右切换)· 拖到画布作参考图', onError: (e) => { if (e.currentTarget && e.currentTarget.src !== r.url) e.currentTarget.src = r.url }, onPointerDown: (e) => { e.stopPropagation(); props.onSelect && props.onSelect(node.id) }, onDragStart: (e) => { try { const u = r.url || ''; e.dataTransfer.setData('application/x-iwb-output-ref', u); e.dataTransfer.setData('text/plain', u); e.dataTransfer.effectAllowed = 'copy' } catch (err) { /* 浏览器拒写自定义 MIME 时仍保留 text/plain */ } }, onDoubleClick: (e) => { e.stopPropagation(); openPreviewAt(cur) } })
|
||||
// 下载浮层:与图库共用同一组 hover token;组件缺失时退回旧的双小按钮(单文件/旧加载顺序)
|
||||
|
||||
Reference in new issue
Block a user