feat(P2): 画中画改名为混剪 #554

Merged
auto-approve-bot merged 1 commits from feat/rename-pip-to-hunjian into develop 2026-07-19 07:06:33 +08:00
9 changed files with 26 additions and 26 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ export type TemplateMode = "pip" | "voice_over" | "one_take" | "voice_pip"
/** 模式显示名称映射 */
export const MODE_LABELS: Record<TemplateMode, string> = {
pip: "画中画",
pip: "混剪",
voice_over: "人物口播",
one_take: "一镜到底",
voice_pip: "口播+混剪",
@@ -85,7 +85,7 @@ export interface EditingTemplate {
watermark_config?: WatermarkConfig
/** 片头片尾配置(后端就绪后启用) */
intro_outro_config?: IntroOutroConfig
/** 画中画配置 */
/** 混剪配置 */
pip_config?: PipConfig
/** 滤镜调色配置 */
filter_config?: FilterConfig
@@ -122,7 +122,7 @@ export interface SaveTemplatePayload {
watermark_config?: WatermarkConfig
/** 片头片尾配置(后端就绪后启用) */
intro_outro_config?: IntroOutroConfig
/** 画中画配置 */
/** 混剪配置 */
pip_config?: PipConfig
/** 滤镜调色配置 */
filter_config?: FilterConfig
@@ -4257,7 +4257,7 @@
}
/* ═══════════════════════════════════════════════
画中画配置面板 (PiP Configuration Panel)
混剪配置面板 (PiP Configuration Panel)
═══════════════════════════════════════════════ */
.pip-config-panel-drawer .ant-drawer-body {
@@ -105,10 +105,10 @@ import "./EditingPlanner.css"
/* ──────────── 常量 ──────────── */
const MODE_LIST: { key: TemplateMode; label: string; icon: string }[] = [
{ key: "pip", label: "画中画", icon: "🖼️" },
{ key: "pip", label: "混剪", icon: "🖼️" },
{ key: "voice_over", label: "人物口播", icon: "🎙️" },
{ key: "one_take", label: "一镜到底", icon: "🎥" },
{ key: "voice_pip", label: "口播+画中画", icon: "🎭" },
{ key: "voice_pip", label: "口播+混剪", icon: "🎭" },
]
const COVER_SCHEMES = [
@@ -203,7 +203,7 @@ const EditingPlanner: React.FC = () => {
const [watermarkDrawerOpen, setWatermarkDrawerOpen] = useState(false)
const [introOutroDrawerOpen, setIntroOutroDrawerOpen] = useState(false)
/* ── 画中画 ── */
/* ── 混剪 ── */
const [pipSettings, setPipSettings] = useState<PipConfig>({
...DEFAULT_PIP_CONFIG,
})
@@ -774,7 +774,7 @@ const EditingPlanner: React.FC = () => {
setIntroOutroSettings(config)
}, [])
/* ── 画中画配置变更 ── */
/* ── 混剪配置变更 ── */
const handlePipChange = useCallback((config: PipConfig) => {
setPipSettings(config)
}, [])
@@ -1723,7 +1723,7 @@ const EditingPlanner: React.FC = () => {
onChange={handleIntroOutroChange}
/>
{/* ═══ 画中画配置面板 ═══ */}
{/* ═══ 混剪配置面板 ═══ */}
<PipConfigPanel
open={pipDrawerOpen}
onClose={() => setPipDrawerOpen(false)}
+7 -7
View File
@@ -65,7 +65,7 @@ interface ClipPropertiesPanelProps {
onOpenWatermarkDrawer?: () => void
/** 打开片头片尾设置面板 Drawer */
onOpenIntroOutroDrawer?: () => void
/** 打开画中画设置面板 Drawer */
/** 打开混剪设置面板 Drawer */
onOpenPipDrawer?: () => void
/** 打开滤镜调色面板 Drawer */
onOpenFilterDrawer?: () => void
@@ -264,7 +264,7 @@ function getActivePreset(settings: TitleSettings): string | null {
const CLIP_TYPE_ICONS: Record<ClipType, string> = { voice: "🎙️", pip: "🖼️" }
const CLIP_TYPE_LABELS: Record<ClipType, string> = {
voice: "口播",
pip: "画中画",
pip: "混剪",
}
const ClipPropertiesPanel: React.FC<ClipPropertiesPanelProps> = ({
@@ -622,16 +622,16 @@ const ClipPropertiesPanel: React.FC<ClipPropertiesPanelProps> = ({
)}
</div>
{/* ═══ 画中画 ═══ */}
{/* ═══ 混剪 ═══ */}
<div className="ep-settings-section">
<div className="ep-section-title">
<span className="ep-section-icon">🖼</span>
</div>
{onOpenPipDrawer && (
<button className="ep-advanced-btn" onClick={onOpenPipDrawer}>
<span className="ep-advanced-btn-icon">🖼</span>
<span className="ep-advanced-btn-label"></span>
<span className="ep-advanced-btn-label"></span>
<span className="ep-advanced-btn-arrow"></span>
</button>
)}
@@ -941,12 +941,12 @@ const ClipPropertiesPanel: React.FC<ClipPropertiesPanelProps> = ({
<div className="ep-clip-detail-label"></div>
<div className="ep-clip-detail-value">
{currentMode === "pip"
? "画中画"
? "混剪"
: currentMode === "voice_over"
? "人物口播"
: currentMode === "one_take"
? "一镜到底"
: "口播+画中画"}
: "口播+混剪"}
</div>
</div>
</div>
@@ -37,7 +37,7 @@ const clipTypeLabel: Record<ClipType | string, string> = {
video: "视频",
image: "图片",
voice: "配音",
pip: "画中画",
pip: "混剪",
}
const formatDuration = (sec: number) => {
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* 画中画配置面板 — Drawer 形式
* 混剪配置面板 — Drawer 形式
* 左侧图层列表 + 右侧单图层配置 + 迷你预览区
*/
import React, { useCallback, useMemo } from "react"
@@ -187,7 +187,7 @@ const PipConfigPanel: React.FC<PipConfigPanelProps> = ({
return (
<Drawer
title="🖼️ 画中画设置"
title="🖼️ 混剪设置"
placement="right"
width={520}
open={open}
+1 -1
View File
@@ -41,7 +41,7 @@ const CLIP_TYPE_ICONS: Record<ClipType, string> = {
const CLIP_TYPE_LABELS: Record<ClipType, string> = {
voice: "口播",
pip: "画中画",
pip: "混剪",
}
const PreviewPlayer: React.FC<PreviewPlayerProps> = ({
@@ -47,7 +47,7 @@ const CLIP_TYPE_ICONS: Record<ClipType, string> = {
/** 片段类型标签 */
const CLIP_TYPE_LABELS: Record<ClipType, string> = {
voice: "口播",
pip: "画中画",
pip: "混剪",
}
/** 裁剪拖拽方向 */
+5 -5
View File
@@ -176,7 +176,7 @@ export const DEFAULT_INTRO_OUTRO: IntroOutroConfig = {
outro: { kind: "none", duration: 3 },
}
/* ──────── 画中画配置 ──────── */
/* ──────── 混剪配置 ──────── */
/** 九宫格位置 */
export type PipGridPosition =
@@ -196,7 +196,7 @@ export type PipAnimType = "none" | "fade_in" | "slide_in"
/** 入场方向 */
export type PipSlideDirection = "left" | "right" | "up" | "down"
/** 画中画图层 */
/** 混剪图层 */
export interface PipLayer {
id: string
/** 图层名称(用户可编辑) */
@@ -235,9 +235,9 @@ export interface PipLayer {
z_index: number
}
/** 画中画配置 */
/** 混剪配置 */
export interface PipConfig {
/** 是否启用画中画 */
/** 是否启用混剪 */
enabled: boolean
/** 图层列表 */
layers: PipLayer[]
@@ -507,7 +507,7 @@ export const DEFAULT_COVER_CONFIG: CoverConfig = {
export interface ClipData {
id: string
type: ClipType // 片段类型:voice(口播)或 pip(画中画
type: ClipType // 片段类型:voice(口播)或 pip(混剪
duration: number // 时长(秒)
startOffset: number // 仅 voice 类型:在口播素材中的起始时间(秒)
/** 素材库素材 IDmain/pip 类型片段使用) */