37d0694b68
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m45s
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Validate - Code Quality (push) Failing after 1m28s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 1m3s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 1m6s
CI/CD Pipeline / Unit Tests (push) Failing after 6m46s
CI/CD Pipeline / Integration Tests (push) Successful in 2m9s
CI/CD Pipeline / Frontend Lint (push) Failing after 39s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 2m20s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 6m35s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m55s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 2m54s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (push) Failing after 14s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 1m9s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m21s
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import React from "react"
|
|
import { formatTrimTime } from "../../utils/timeline"
|
|
|
|
interface TrimPreviewProps {
|
|
startTime: number
|
|
endTime: number
|
|
duration: number
|
|
x: number
|
|
y: number
|
|
}
|
|
|
|
export const TrimPreview: React.FC<TrimPreviewProps> = ({ startTime, endTime, duration, x, y }) => {
|
|
return (
|
|
<div
|
|
className="ep-trim-preview"
|
|
style={{
|
|
position: "fixed",
|
|
left: x + 12,
|
|
top: y - 40,
|
|
}}
|
|
>
|
|
<div className="ep-trim-preview-row">
|
|
<span className="ep-trim-preview-label">入点</span>
|
|
<span className="ep-trim-preview-value">{formatTrimTime(startTime)}</span>
|
|
</div>
|
|
<div className="ep-trim-preview-row">
|
|
<span className="ep-trim-preview-label">出点</span>
|
|
<span className="ep-trim-preview-value">{formatTrimTime(endTime)}</span>
|
|
</div>
|
|
<div className="ep-trim-preview-row ep-trim-preview-duration">
|
|
<span className="ep-trim-preview-label">时长</span>
|
|
<span className="ep-trim-preview-value">{formatTrimTime(duration)}</span>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|