style: prettier格式化修复
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 45s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 53s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m25s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m32s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m42s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m19s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m35s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m23s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m38s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 5m13s
CI/CD Pipeline / CI Gate (pull_request) Successful in 6s
AI Code Review / AI Code Review (pull_request) Failing after 6m21s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 981h54m43s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 981h54m44s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 981h54m45s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 981h54m45s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 981h54m45s
CI/CD Pipeline / PR Build Worker Image (pull_request) Failing after 981h59m11s
CI/CD Pipeline / PR Build API Image (pull_request) Failing after 981h59m13s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 981h59m55s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 981h59m55s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 981h59m59s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 981h59m55s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 981h59m59s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 981h59m59s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 982h28m2s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 982h28m3s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 982h32m31s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 982h33m14s

This commit is contained in:
2026-08-06 17:27:17 +08:00
parent 0d3c3e81ac
commit 0ba007f326
@@ -23,42 +23,32 @@ const ManualMaterialList: React.FC<ManualMaterialListProps> = ({
// 追踪当前正在播放的视频元素,确保同时只有一个视频播放
const activeVideoRef = useRef<HTMLVideoElement | null>(null)
const handleVideoMouseEnter = useCallback(
(e: React.MouseEvent<HTMLVideoElement>) => {
const video = e.currentTarget
// 暂停之前正在播放的视频
if (activeVideoRef.current && activeVideoRef.current !== video) {
activeVideoRef.current.pause()
activeVideoRef.current.currentTime = 0
}
activeVideoRef.current = video
video.play().catch(() => {})
},
[],
)
const handleVideoMouseEnter = useCallback((e: React.MouseEvent<HTMLVideoElement>) => {
const video = e.currentTarget
// 暂停之前正在播放的视频
if (activeVideoRef.current && activeVideoRef.current !== video) {
activeVideoRef.current.pause()
activeVideoRef.current.currentTime = 0
}
activeVideoRef.current = video
video.play().catch(() => {})
}, [])
const handleVideoMouseLeave = useCallback(
(e: React.MouseEvent<HTMLVideoElement>) => {
const video = e.currentTarget
video.pause()
video.currentTime = 0
if (activeVideoRef.current === video) {
activeVideoRef.current = null
}
},
[],
)
const handleVideoMouseLeave = useCallback((e: React.MouseEvent<HTMLVideoElement>) => {
const video = e.currentTarget
video.pause()
video.currentTime = 0
if (activeVideoRef.current === video) {
activeVideoRef.current = null
}
}, [])
return (
<div style={{ marginTop: 14 }}>
{materialsLoading ? (
<Text style={{ color: "var(--text-secondary)", padding: "16px 0" }}>
加载素材中…
</Text>
<Text style={{ color: "var(--text-secondary)", padding: "16px 0" }}>加载素材中…</Text>
) : materials.items.length === 0 ? (
<Text
style={{ color: "var(--text-secondary)", padding: "16px 0" }}
>
<Text style={{ color: "var(--text-secondary)", padding: "16px 0" }}>
暂无素材,请先在视频库中上传
</Text>
) : (
@@ -75,9 +65,7 @@ const ManualMaterialList: React.FC<ManualMaterialListProps> = ({
alignItems: "center",
gap: 10,
padding: "8px 12px",
background: checked
? "var(--primary-soft, #eef2ff)"
: "#f8fafc",
background: checked ? "var(--primary-soft, #eef2ff)" : "#f8fafc",
borderRadius: 10,
cursor: "pointer",
border: checked
@@ -138,8 +126,7 @@ const ManualMaterialList: React.FC<ManualMaterialListProps> = ({
onError={(e) => {
const target = e.target as HTMLImageElement
target.style.display = "none"
const fallback =
target.nextElementSibling as HTMLElement | null
const fallback = target.nextElementSibling as HTMLElement | null
if (fallback) fallback.style.display = "flex"
}}
/>