Files
xiaoxia-saas/apps/web/src/pages/assets/components/PlayModal.tsx
T
xiaoxia 32a95d09f0
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m49s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 2m10s
CI/CD Pipeline / Frontend Lint (push) Successful in 2m40s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m48s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 1m17s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 5m1s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m10s
CI/CD Pipeline / Unit Tests (push) Failing after 5m58s
CI/CD Pipeline / Integration Tests (push) Successful in 2m33s
CI/CD Pipeline / Build Staging API Image (push) Successful in 17m18s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Failing after 1266h21m15s
CI/CD Pipeline / Deploy Production (push) Failing after 1266h29m2s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1266h32m49s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 1266h35m3s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1266h32m51s
CI/CD Pipeline / PR Build Web Image (push) Failing after 1266h35m4s
CI/CD Pipeline / PR Build API Image (push) Failing after 1266h35m5s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 1266h35m6s
CI/CD Pipeline / Build Production API Image (push) Failing after 1267h5m29s
refactor(assets): Phase 2 - extract UI components (#897)
2026-07-25 20:53:22 +08:00

35 lines
972 B
TypeScript

import React from "react"
import { Modal as AntModal } from "antd"
import type { AssetItem } from "@/pages/assets/types"
/* ============================================================
* PlayModal — 视频/音频播放弹窗
* ============================================================ */
export interface PlayModalProps {
open: boolean
asset: AssetItem | null
onClose: () => void
}
const PlayModal: React.FC<PlayModalProps> = ({ open, asset, onClose }) => (
<AntModal
title={asset?.name ?? "播放"}
open={open}
onCancel={onClose}
footer={null}
width={640}
destroyOnClose
>
{asset?.fileUrl ? (
<video src={asset.fileUrl} controls autoPlay className="xx-asset-video-player" />
) : (
<div className="xx-asset-empty-fallback">
<p>暂无可播放的文件地址</p>
<p className="xx-asset-empty-fallback-id">素材 ID: {asset?.id}</p>
</div>
)}
</AntModal>
)
export default PlayModal