feat: 标题输入改用TextArea多行+标题库自动补全,标题预览增大字号加描边阴影
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (push) Successful in 4s
CI/CD Pipeline / Build Staging API Image (push) Successful in 17s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 19s
CI/CD Pipeline / Integration Tests (push) Successful in 1m17s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 1m43s
CI/CD Pipeline / Validate - Style (push) Successful in 1m50s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 2m50s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 4m13s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1m35s
CI/CD Pipeline / Unit Tests (push) Successful in 5m59s
CI/CD Pipeline / Validate - Security (push) Successful in 7m16s
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Failing after 165h0m3s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 165h0m7s
CI/CD Pipeline / Deploy Production (push) Failing after 165h0m3s
CI/CD Pipeline / Build Production Web Image (push) Failing after 165h0m7s
CI/CD Pipeline / ACR Image Cleanup (push) Failing after 165h2m51s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 165h2m51s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 165h2m52s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 165h7m25s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Failing after 165h4m31s
CI/CD Pipeline / PR Build Web Image (push) Failing after 165h7m26s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Failing after 165h4m31s
CI/CD Pipeline / Frontend Lint (push) Failing after 165h7m26s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 165h7m29s
CI/CD Pipeline / CI Gate (push) Failing after 165h34m53s
CI/CD Pipeline / Build Production API Image (push) Failing after 165h34m54s
CI/CD Pipeline / Retag skipped Staging API Image (push) Failing after 165h39m17s
CI/CD Pipeline / PR Build API Image (push) Failing after 165h42m12s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (push) Successful in 4s
CI/CD Pipeline / Build Staging API Image (push) Successful in 17s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 19s
CI/CD Pipeline / Integration Tests (push) Successful in 1m17s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 1m43s
CI/CD Pipeline / Validate - Style (push) Successful in 1m50s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 2m50s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 4m13s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1m35s
CI/CD Pipeline / Unit Tests (push) Successful in 5m59s
CI/CD Pipeline / Validate - Security (push) Successful in 7m16s
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Failing after 165h0m3s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 165h0m7s
CI/CD Pipeline / Deploy Production (push) Failing after 165h0m3s
CI/CD Pipeline / Build Production Web Image (push) Failing after 165h0m7s
CI/CD Pipeline / ACR Image Cleanup (push) Failing after 165h2m51s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 165h2m51s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 165h2m52s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 165h7m25s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Failing after 165h4m31s
CI/CD Pipeline / PR Build Web Image (push) Failing after 165h7m26s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Failing after 165h4m31s
CI/CD Pipeline / Frontend Lint (push) Failing after 165h7m26s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 165h7m29s
CI/CD Pipeline / CI Gate (push) Failing after 165h34m53s
CI/CD Pipeline / Build Production API Image (push) Failing after 165h34m54s
CI/CD Pipeline / Retag skipped Staging API Image (push) Failing after 165h39m17s
CI/CD Pipeline / PR Build API Image (push) Failing after 165h42m12s
This commit is contained in:
@@ -7,8 +7,11 @@
|
||||
* - AiAvatarTitleConfig ↔ TitleSettings 的双向适配
|
||||
* - 自动生成字幕开关
|
||||
*/
|
||||
import React, { useMemo, useState } from "react"
|
||||
import React, { useMemo, useState, useEffect } from "react"
|
||||
import { Input } from "antd"
|
||||
import TitleStylePanel from "@/pages/generate/components/title/TitleStylePanel"
|
||||
import TitleLibraryAutoComplete from "@/pages/generate/components/title/TitleLibraryAutoComplete"
|
||||
import type { TitleOption } from "@/pages/generate/components/title/TitleLibraryAutoComplete"
|
||||
import type { TitleSettings } from "@/pages/generate/types"
|
||||
import {
|
||||
POSITION_OPTIONS,
|
||||
@@ -17,7 +20,9 @@ import {
|
||||
getFontFamily,
|
||||
} from "@/pages/generate/constants"
|
||||
import type { AiAvatarTitleConfig } from "../types"
|
||||
import TitleLibraryModal from "./TitleLibraryModal"
|
||||
import { getTitles } from "@/api/titles"
|
||||
|
||||
const { TextArea } = Input
|
||||
|
||||
interface PanelTitleConfigProps {
|
||||
titleConfig: AiAvatarTitleConfig
|
||||
@@ -138,12 +143,7 @@ const PanelTitleConfig: React.FC<PanelTitleConfigProps> = ({ titleConfig, onUpda
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{/* 标题库选择弹窗 */}
|
||||
<TitleLibraryModal
|
||||
open={showTitleLibrary}
|
||||
onClose={() => setShowTitleLibrary(false)}
|
||||
onSelect={(title) => onUpdate({ title })}
|
||||
/>
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -70,18 +70,24 @@ export function PanelVideoSelector({
|
||||
position: "absolute",
|
||||
left: "50%",
|
||||
transform: "translateX(-50%)",
|
||||
...(titleConfig.position === "top" ? { top: "10%" } : titleConfig.position === "bottom" ? { bottom: "10%" } : { top: "50%", transform: "translate(-50%, -50%)" }),
|
||||
fontSize: titleConfig.size,
|
||||
...(titleConfig.position === "top"
|
||||
? { top: "10%" }
|
||||
: titleConfig.position === "bottom"
|
||||
? { bottom: "10%" }
|
||||
: { top: "50%", transform: "translate(-50%, -50%)" }),
|
||||
fontSize: Math.max(titleConfig.size, 32),
|
||||
fontFamily: getFontFamily(titleConfig.font),
|
||||
color: titleConfig.color,
|
||||
fontWeight: titleConfig.bold ? 700 : 400,
|
||||
fontStyle: titleConfig.italic ? "italic" : "normal",
|
||||
textShadow: titleConfig.shadow ? "2px 2px 4px rgba(0,0,0,0.7)" : undefined,
|
||||
WebkitTextStroke: titleConfig.stroke ? "1px rgba(0,0,0,0.5)" : undefined,
|
||||
textShadow: "0 2px 4px rgba(0,0,0,0.5)",
|
||||
WebkitTextStroke: "2px #000",
|
||||
pointerEvents: "none",
|
||||
zIndex: 10,
|
||||
maxWidth: "90%",
|
||||
textAlign: "center",
|
||||
whiteSpace: "pre-wrap",
|
||||
lineHeight: 1.3,
|
||||
}}
|
||||
>
|
||||
{titleConfig.title}
|
||||
|
||||
Reference in New Issue
Block a user