de769a4f08
AI Code Review / AI Code Review (pull_request) Failing after 0s
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 21s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 55s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 49s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 1262h46m5s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 1262h13m30s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 30s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 5m5s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m46s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m47s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1262h13m26s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 1m47s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 34s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 2m47s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 2m46s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 34s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 1262h14m39s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 1262h14m41s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 1262h11m9s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 1262h47m14s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 1262h10m40s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 1262h13m22s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1262h13m23s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1262h13m24s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1262h13m24s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1262h13m26s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 1262h13m28s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 1262h13m59s
151 lines
4.7 KiB
TypeScript
151 lines
4.7 KiB
TypeScript
import React from "react"
|
|
import ClipPropertiesPanel from "./ClipPropertiesPanel"
|
|
import EditorClipList from "./EditorClipList"
|
|
import type { ClipData, SubtitleStyleConfig, TransitionConfig, SpeedConfig, TtsConfig } from "../types"
|
|
import type { BgmMixConfig } from "@/api/bgm"
|
|
import type { TemplateMode } from "@/api/editing-planner"
|
|
import type { VoiceMaterial } from "@/api/voice"
|
|
|
|
interface RightPanelProps {
|
|
rightTab: "properties" | "clips"
|
|
onTabChange: (tab: "properties" | "clips") => void
|
|
// 属性 tab
|
|
selectedClip: ClipData | null
|
|
subtitleSettings: SubtitleStyleConfig
|
|
bgmSettings: BgmMixConfig
|
|
clipsCount: number
|
|
totalDuration: number
|
|
currentMode: TemplateMode
|
|
onSubtitleSettingsChange: (partial: Partial<SubtitleStyleConfig>) => void
|
|
onBgmSettingsChange: (partial: Partial<BgmMixConfig>) => void
|
|
onClipUpdate: (clipId: string, updates: Partial<ClipData>) => void
|
|
onOpenBgmDrawer: () => void
|
|
onOpenSubtitleDrawer: () => void
|
|
voiceMaterials: VoiceMaterial[]
|
|
voiceMaterialsLoading: boolean
|
|
onRefreshVoiceMaterials: () => void
|
|
onClipVoiceSelect: (clipId: string, voiceId: string) => void
|
|
onOpenTransitionDrawer: (clipId: string | null) => void
|
|
onOpenSpeedDrawer: (clipId: string | null) => void
|
|
onOpenTtsDrawer: (clipId: string | null) => void
|
|
onOpenWatermarkDrawer: () => void
|
|
onOpenIntroOutroDrawer: () => void
|
|
onOpenPipDrawer: () => void
|
|
onOpenFilterDrawer: () => void
|
|
onOpenGreenScreenDrawer: () => void
|
|
onOpenStickerDrawer: () => void
|
|
// 片段 tab
|
|
clips: ClipData[]
|
|
selectedClipId: string | null
|
|
onClipSelect: (clipId: string) => void
|
|
onClipMoveUp: (clipId: string) => void
|
|
onClipMoveDown: (clipId: string) => void
|
|
onClipRemove: (clipId: string) => void
|
|
onClipAdd: () => void
|
|
}
|
|
|
|
const RightPanel: React.FC<RightPanelProps> = ({
|
|
rightTab,
|
|
onTabChange,
|
|
selectedClip,
|
|
subtitleSettings,
|
|
bgmSettings,
|
|
clipsCount,
|
|
totalDuration,
|
|
currentMode,
|
|
onSubtitleSettingsChange,
|
|
onBgmSettingsChange,
|
|
onClipUpdate,
|
|
onOpenBgmDrawer,
|
|
onOpenSubtitleDrawer,
|
|
voiceMaterials,
|
|
voiceMaterialsLoading,
|
|
onRefreshVoiceMaterials,
|
|
onClipVoiceSelect,
|
|
onOpenTransitionDrawer,
|
|
onOpenSpeedDrawer,
|
|
onOpenTtsDrawer,
|
|
onOpenWatermarkDrawer,
|
|
onOpenIntroOutroDrawer,
|
|
onOpenPipDrawer,
|
|
onOpenFilterDrawer,
|
|
onOpenGreenScreenDrawer,
|
|
onOpenStickerDrawer,
|
|
clips,
|
|
selectedClipId,
|
|
onClipSelect,
|
|
onClipMoveUp,
|
|
onClipMoveDown,
|
|
onClipRemove,
|
|
onClipAdd,
|
|
}) => {
|
|
return (
|
|
<div className="ep-right-panel">
|
|
{/* Tab 切换 */}
|
|
<div className="ep-right-tabs">
|
|
<button
|
|
className={`ep-right-tab${rightTab === "properties" ? " active" : ""}`}
|
|
onClick={() => onTabChange("properties")}
|
|
>
|
|
属性
|
|
</button>
|
|
<button
|
|
className={`ep-right-tab${rightTab === "clips" ? " active" : ""}`}
|
|
onClick={() => onTabChange("clips")}
|
|
>
|
|
片段
|
|
</button>
|
|
</div>
|
|
|
|
{/* 属性 Tab */}
|
|
{rightTab === "properties" && (
|
|
<div className="ep-right-tab-content">
|
|
<ClipPropertiesPanel
|
|
selectedClip={selectedClip}
|
|
subtitleSettings={subtitleSettings}
|
|
bgmSettings={bgmSettings}
|
|
clipsCount={clipsCount}
|
|
totalDuration={totalDuration}
|
|
currentMode={currentMode}
|
|
onSubtitleSettingsChange={onSubtitleSettingsChange}
|
|
onBgmSettingsChange={onBgmSettingsChange}
|
|
onClipUpdate={onClipUpdate}
|
|
onOpenBgmDrawer={onOpenBgmDrawer}
|
|
onOpenSubtitleDrawer={onOpenSubtitleDrawer}
|
|
voiceMaterials={voiceMaterials}
|
|
voiceMaterialsLoading={voiceMaterialsLoading}
|
|
onRefreshVoiceMaterials={onRefreshVoiceMaterials}
|
|
onClipVoiceSelect={onClipVoiceSelect}
|
|
onOpenTransitionDrawer={onOpenTransitionDrawer}
|
|
onOpenSpeedDrawer={onOpenSpeedDrawer}
|
|
onOpenTtsDrawer={onOpenTtsDrawer}
|
|
onOpenWatermarkDrawer={onOpenWatermarkDrawer}
|
|
onOpenIntroOutroDrawer={onOpenIntroOutroDrawer}
|
|
onOpenPipDrawer={onOpenPipDrawer}
|
|
onOpenFilterDrawer={onOpenFilterDrawer}
|
|
onOpenGreenScreenDrawer={onOpenGreenScreenDrawer}
|
|
onOpenStickerDrawer={onOpenStickerDrawer}
|
|
/>
|
|
</div>
|
|
)}
|
|
|
|
{/* 片段 Tab */}
|
|
{rightTab === "clips" && (
|
|
<div className="ep-right-tab-content">
|
|
<EditorClipList
|
|
clips={clips}
|
|
selectedClipId={selectedClipId}
|
|
onSelect={onClipSelect}
|
|
onMoveUp={onClipMoveUp}
|
|
onMoveDown={onClipMoveDown}
|
|
onRemove={onClipRemove}
|
|
onAdd={onClipAdd}
|
|
/>
|
|
</div>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default RightPanel
|