auto-save 2026-05-14 00:20 (+4, ~4)

This commit is contained in:
2026-05-14 00:20:30 +08:00
parent 6cd0713230
commit 540107d505
8 changed files with 989 additions and 13 deletions

View File

@@ -104,16 +104,12 @@ export function InputNode({ data, selected }: NodeProps<{ data: NodeData }> | an
return (
<div className="relative" style={{ width: "100%" }}>
{/* 多视频缩略图浮条 — 「+」在最左job 按时间倒序(最新靠左高亮),统一高度 64宽度按视频原比例一行横滚 */}
{/* 多视频缩略图浮条 — 「+」在最左job 按时间倒序(最新靠左高亮),统一高度 64宽度按视频原比例一行横滚
浮条宽度 = 节点宽度(节点拖宽后浮条同步变宽,可见更多缩略图,少滚动)。 */}
{!videoExpanded && d.jobs.length > 0 && (
<div
className="absolute flex items-end gap-1.5 overflow-x-auto pb-1.5"
style={{
bottom: "calc(100% + 12px)",
left: "50%",
transform: "translateX(-50%)",
width: "min(720px, 88vw)",
}}
className="absolute left-0 right-0 flex items-end gap-1.5 overflow-x-auto pb-1.5"
style={{ bottom: "calc(100% + 12px)" }}
>
{/* + 再上传一个(放在最前面) */}
<button

View File

@@ -7,13 +7,11 @@ export function ResizeRight({ minWidth = 240, maxWidth = 1200 }: { minWidth?: nu
const { setNodes, getZoom } = useReactFlow()
const onPointerDown = (e: PointerEvent<HTMLDivElement>) => {
console.log("[ResizeRight] pointerDown", e.clientX, e.clientY)
e.preventDefault()
e.stopPropagation()
const target = e.currentTarget
const nodeEl = target.closest(".react-flow__node") as HTMLElement | null
const nodeId = nodeEl?.getAttribute("data-id")
console.log("[ResizeRight] nodeId", nodeId)
if (!nodeId || !nodeEl) return
target.setPointerCapture(e.pointerId)
@@ -24,11 +22,9 @@ export function ResizeRight({ minWidth = 240, maxWidth = 1200 }: { minWidth?: nu
const onMove = (ev: globalThis.PointerEvent) => {
const dx = (ev.clientX - startX) / zoom
const next = Math.max(minWidth, Math.min(maxWidth, startWidth + dx))
console.log("[ResizeRight] move", dx, next)
setNodes((nodes) => nodes.map((n) => (n.id === nodeId ? { ...n, width: next, style: { ...n.style, width: next } } : n)))
}
const onUp = () => {
console.log("[ResizeRight] up")
window.removeEventListener("pointermove", onMove)
window.removeEventListener("pointerup", onUp)
try { target.releasePointerCapture(e.pointerId) } catch {}