fix: preserve continuous drawer and heart exit animations
Build and deploy Docker / deploy (push) Failing after 6m29s

This commit is contained in:
2026-10-08 16:12:33 +08:00
parent c0b752da3a
commit 2c7b81981c
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ export function VideoCard({ item, position, active, muted, playing, reaction, co
}} />
<div className="scene-copy" aria-hidden="true"><span>{item.label}</span><strong>{item.subtitle}</strong><i>THE LITTLE THINGS. THE BIG FEELINGS.</i></div>
{active && !playing && !failed && <span className="paused"><Play size={58} fill="currentColor" /></span>}
{hearts.map(heart => <span key={heart.id} className="heart-burst" style={{ left: heart.x, top: heart.y }} onAnimationEnd={() => setHearts(previous => previous.filter(h => h.id !== heart.id))}><Heart size={112} fill="currentColor" /><i /><i /><i /><i /></span>)}
{hearts.map(heart => <span key={heart.id} className="heart-burst" style={{ left: heart.x, top: heart.y }} onAnimationEnd={event => { if (event.target === event.currentTarget) setHearts(previous => previous.filter(h => h.id !== heart.id)); }}><Heart size={112} fill="currentColor" /><i /><i /><i /><i /></span>)}
{failed && <div className="video-error">视频暂时无法加载<button onClick={() => { setFailed(false); video.current?.load(); setPlaying(true); }}>重新加载</button></div>}
<div className="video-info"><span className="location"><MapPin size={13} />{item.location}<span>·</span>精选风景</span>
<h2>@{item.author}<span className="verified"><Check size={11} /></span></h2>
+3 -2
View File
@@ -139,9 +139,10 @@ export default function Feed() {
</div>
{panel && <div className={`modal-backdrop ${closing ? 'closing' : ''}`} onClick={closePanel}>
<section ref={drawer} className="panel" role="dialog" aria-modal="true" aria-labelledby="panel-title" onClick={event => event.stopPropagation()}>
<div className="sheet-grip" onPointerDown={event => { sheetGesture.current = { startY: event.clientY, dy: 0 }; event.currentTarget.setPointerCapture(event.pointerId); }}
<div className="sheet-grip" onPointerDown={event => { sheetGesture.current = { startY: event.clientY, dy: 0 }; if (drawer.current) drawer.current.style.transition = 'none'; event.currentTarget.setPointerCapture(event.pointerId); }}
onPointerMove={event => { if (!sheetGesture.current || !drawer.current) return; const dy = Math.max(0, event.clientY - sheetGesture.current.startY); sheetGesture.current.dy = dy; drawer.current.style.transform = `translateY(${dy}px)`; }}
onPointerUp={() => { if (!sheetGesture.current || !drawer.current) return; if (sheetGesture.current.dy > 90) closePanel(); drawer.current.style.transform = ''; sheetGesture.current = null; }}><span /></div>
onPointerUp={() => { if (!sheetGesture.current || !drawer.current) return; drawer.current.style.transition = ''; if (sheetGesture.current.dy > 90) closePanel(); else drawer.current.style.transform = ''; sheetGesture.current = null; }}
onPointerCancel={() => { if (drawer.current) { drawer.current.style.transition = ''; drawer.current.style.transform = ''; } sheetGesture.current = null; }}><span /></div>
<header><h2 id="panel-title">{panel === 'comments' ? `评论 · ${item.comments + (comments[item.id]?.length || 0)}` : panel === 'search' ? '发现好瞬间' : '分享这一刻'}</h2><button aria-label="关闭" onClick={closePanel}><X /></button></header>
{panel === 'comments' ? <>
<p className="panel-note">演示评论 · 新评论仅在本次浏览中保留</p>