ui 디자인 수정 .
This commit is contained in:
1 parent
24d61f925a
commit
07ba65cca6
27 files changed
+2738
-725
No files matched your search
@@ -14,6 +14,8 @@ interface SoundStudioContentProps {
|
||||
onNext: (songTaskId: string) => void;
|
||||
businessInfo?: BusinessInfo;
|
||||
imageTaskId: string | null;
|
||||
videoGenerationStatus?: 'idle' | 'generating' | 'complete' | 'error';
|
||||
videoGenerationProgress?: number;
|
||||
}
|
||||
|
||||
type GenerationStatus = 'idle' | 'generating_lyric' | 'generating_song' | 'polling' | 'complete' | 'error';
|
||||
@@ -30,10 +32,26 @@ const STORAGE_KEY = 'castad_song_generation';
|
||||
const STORAGE_EXPIRY = 30 * 60 * 1000;
|
||||
const MAX_RETRY_COUNT = 3;
|
||||
|
||||
const SoundStudioContent: React.FC<SoundStudioContentProps> = ({ onBack, onNext, businessInfo, imageTaskId }) => {
|
||||
const LANGUAGE_FLAGS: Record<string, string> = {
|
||||
'한국어': '🇰🇷',
|
||||
'English': '🇺🇸',
|
||||
'中文': '🇨🇳',
|
||||
'日本語': '🇯🇵',
|
||||
'ไทย': '🇹🇭',
|
||||
'Tiếng Việt': '🇻🇳',
|
||||
};
|
||||
|
||||
const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
||||
onBack,
|
||||
onNext,
|
||||
businessInfo,
|
||||
imageTaskId,
|
||||
videoGenerationStatus = 'idle',
|
||||
videoGenerationProgress = 0
|
||||
}) => {
|
||||
const [selectedType, setSelectedType] = useState('보컬');
|
||||
const [selectedLang, setSelectedLang] = useState('한국어');
|
||||
const [selectedGenre, setSelectedGenre] = useState('AI 추천');
|
||||
const [selectedGenre, setSelectedGenre] = useState('자동 선택');
|
||||
const [progress, setProgress] = useState(0);
|
||||
const [isDragging, setIsDragging] = useState(false);
|
||||
const [status, setStatus] = useState<GenerationStatus>('idle');
|
||||
@@ -47,9 +65,11 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({ onBack, onNext,
|
||||
const [statusMessage, setStatusMessage] = useState('');
|
||||
const [retryCount, setRetryCount] = useState(0);
|
||||
const [songTaskId, setSongTaskId] = useState<string | null>(null);
|
||||
const [isLanguageDropdownOpen, setIsLanguageDropdownOpen] = useState(false);
|
||||
|
||||
const progressBarRef = useRef<HTMLDivElement>(null);
|
||||
const audioRef = useRef<HTMLAudioElement>(null);
|
||||
const languageDropdownRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const saveToStorage = (taskId: string, sunoTaskId: string, currentLyrics: string, currentStatus: GenerationStatus) => {
|
||||
const data: SavedGenerationState = {
|
||||
@@ -98,6 +118,23 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({ onBack, onNext,
|
||||
}
|
||||
}, []);
|
||||
|
||||
// Close language dropdown when clicking outside
|
||||
useEffect(() => {
|
||||
const handleClickOutside = (event: MouseEvent) => {
|
||||
if (languageDropdownRef.current && !languageDropdownRef.current.contains(event.target as Node)) {
|
||||
setIsLanguageDropdownOpen(false);
|
||||
}
|
||||
};
|
||||
|
||||
if (isLanguageDropdownOpen) {
|
||||
document.addEventListener('mousedown', handleClickOutside);
|
||||
}
|
||||
|
||||
return () => {
|
||||
document.removeEventListener('mousedown', handleClickOutside);
|
||||
};
|
||||
}, [isLanguageDropdownOpen]);
|
||||
|
||||
const resumePolling = async (taskId: string, sunoTaskId: string, currentLyrics: string, currentRetryCount: number = 0) => {
|
||||
try {
|
||||
const downloadResponse = await waitForSongComplete(
|
||||
@@ -153,10 +190,14 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({ onBack, onNext,
|
||||
try {
|
||||
const language = LANGUAGE_MAP[selectedLang] || 'Korean';
|
||||
const genreMap: Record<string, string> = {
|
||||
'AI 추천': 'pop',
|
||||
'로파이': 'lofi',
|
||||
'힙합': 'hip-hop',
|
||||
'어쿠스틱': 'acoustic',
|
||||
'자동 선택': 'pop',
|
||||
'K-POP': 'kpop',
|
||||
'발라드': 'ballad',
|
||||
'Hip-Hop': 'hip-hop',
|
||||
'R&B': 'rnb',
|
||||
'EDM': 'edm',
|
||||
'JAZZ': 'jazz',
|
||||
'ROCK': 'rock',
|
||||
};
|
||||
|
||||
const songResponse = await generateSong(imageTaskId, {
|
||||
@@ -322,10 +363,14 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({ onBack, onNext,
|
||||
setStatusMessage('음악을 생성하고 있습니다...');
|
||||
|
||||
const genreMap: Record<string, string> = {
|
||||
'AI 추천': 'pop',
|
||||
'로파이': 'lofi',
|
||||
'힙합': 'hip-hop',
|
||||
'어쿠스틱': 'acoustic',
|
||||
'자동 선택': 'pop',
|
||||
'K-POP': 'kpop',
|
||||
'발라드': 'ballad',
|
||||
'Hip-Hop': 'hip-hop',
|
||||
'R&B': 'rnb',
|
||||
'EDM': 'edm',
|
||||
'JAZZ': 'jazz',
|
||||
'ROCK': 'rock',
|
||||
};
|
||||
|
||||
const songResponse = await generateSong(imageTaskId, {
|
||||
@@ -369,217 +414,270 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({ onBack, onNext,
|
||||
const isGenerating = status === 'generating_lyric' || status === 'generating_song' || status === 'polling';
|
||||
|
||||
return (
|
||||
<div className="flex-col h-full overflow-hidden" style={{ display: 'flex' }}>
|
||||
<main className="page-container">
|
||||
{audioUrl && (
|
||||
<audio ref={audioRef} src={audioUrl} preload="metadata" />
|
||||
)}
|
||||
|
||||
{/* Header Section */}
|
||||
<div className="shrink-0 p-6 md:p-8 pb-0">
|
||||
<div className="back-button-container">
|
||||
<button onClick={onBack} className="btn-back">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<path d="M15 18l-6-6 6-6" />
|
||||
</svg>
|
||||
뒤로가기
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="page-header">
|
||||
<h1 className="page-title">사운드 스튜디오</h1>
|
||||
<p className="page-subtitle">
|
||||
쉽고 빠르게, 브랜드 소셜 미디어 캠페인을 만드세요.
|
||||
</p>
|
||||
{/* Header with Progress */}
|
||||
<div className="sound-studio-header">
|
||||
<button onClick={onBack} className="btn-back-new">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<path d="M15 18l-6-6 6-6" />
|
||||
</svg>
|
||||
뒤로가기
|
||||
</button>
|
||||
<div className="progress-indicator">
|
||||
<div className="progress-label">
|
||||
<span className="progress-text">단계</span>
|
||||
<div className="progress-numbers">
|
||||
<span className="progress-current">2</span>
|
||||
<span className="progress-divider">/</span>
|
||||
<span className="progress-total">2</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="progress-bar-wrapper">
|
||||
<div className="progress-bar-track"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex-1 px-6 md:px-8 min-h-0 overflow-hidden">
|
||||
<div className="main-content h-full justify-center">
|
||||
{/* Audio Style Card */}
|
||||
<div
|
||||
className={`card card-flex card-overflow-hidden transition-all duration-700 ease-out ${
|
||||
showLyrics ? 'lg:flex-[1.5]' : 'flex-1 lg:max-w-2xl'
|
||||
}`}
|
||||
>
|
||||
<h3 className="section-title">오디오 스타일</h3>
|
||||
{/* Page Title */}
|
||||
<h1 className="sound-studio-title">사운드 스튜디오</h1>
|
||||
|
||||
<div className="space-y-5 flex-1 min-h-0 overflow-y-auto custom-scrollbar">
|
||||
<div>
|
||||
<p className="text-sm text-gray-400 mb-3 font-medium">AI 사운드 유형 선택</p>
|
||||
<div className="grid-cols-3 gap-3" style={{ display: 'grid' }}>
|
||||
{['보컬', '성우 내레이션', '배경음악'].map(type => (
|
||||
<button
|
||||
key={type}
|
||||
onClick={() => setSelectedType(type)}
|
||||
disabled={isGenerating}
|
||||
className={`btn-select ${selectedType === type ? 'active' : ''}`}
|
||||
>
|
||||
{type}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
{/* Main Content - Two Column Layout */}
|
||||
<div className="sound-studio-container">
|
||||
<div className="sound-studio-columns">
|
||||
{/* Left Column - Sound Settings */}
|
||||
<div className="sound-column">
|
||||
<h3 className="column-title">사운드</h3>
|
||||
|
||||
<div>
|
||||
<p className="text-sm text-gray-400 mb-3 font-medium">언어 선택</p>
|
||||
<div className="grid-cols-3 gap-3" style={{ display: 'grid' }}>
|
||||
{[
|
||||
{ label: '한국어', flag: '🇰🇷' },
|
||||
{ label: 'English', flag: '🇺🇸' },
|
||||
{ label: '中文', flag: '🇨🇳' },
|
||||
{ label: '日本語', flag: '🇯🇵' },
|
||||
{ label: 'ไทย', flag: '🇹🇭' },
|
||||
{ label: 'Tiếng Việt', flag: '🇻🇳' }
|
||||
].map(lang => (
|
||||
<button
|
||||
key={lang.label}
|
||||
onClick={() => setSelectedLang(lang.label)}
|
||||
disabled={isGenerating}
|
||||
className={`btn-select flex-col gap-1 ${selectedLang === lang.label ? 'active' : ''}`}
|
||||
style={{ display: 'flex', alignItems: 'center' }}
|
||||
>
|
||||
<span className="text-lg">{lang.flag}</span>
|
||||
<span>{lang.label}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p className="text-sm text-gray-400 mb-3 font-medium">음악 장르 선택</p>
|
||||
<select
|
||||
value={selectedGenre}
|
||||
onChange={(e) => setSelectedGenre(e.target.value)}
|
||||
disabled={isGenerating}
|
||||
className="select-input"
|
||||
>
|
||||
<option>AI 추천</option>
|
||||
<option>로파이</option>
|
||||
<option>힙합</option>
|
||||
<option>어쿠스틱</option>
|
||||
</select>
|
||||
{/* Sound Type Selection */}
|
||||
<div className="sound-studio-section">
|
||||
<label className="input-label">AI 사운드 유형 선택</label>
|
||||
<div className="sound-type-grid">
|
||||
{['보컬', '성우 내레이션', '배경음악'].map(type => (
|
||||
<button
|
||||
key={type}
|
||||
onClick={() => setSelectedType(type)}
|
||||
disabled={isGenerating}
|
||||
className={`sound-type-btn ${selectedType === type ? 'active' : ''}`}
|
||||
>
|
||||
{type}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{errorMessage && (
|
||||
<div className="error-message">
|
||||
{errorMessage}
|
||||
{/* Genre Selection */}
|
||||
<div className="sound-studio-section">
|
||||
<label className="input-label">장르 선택</label>
|
||||
<div className="genre-grid">
|
||||
<div className="genre-row">
|
||||
{['자동 선택', 'K-POP', '발라드'].map(genre => (
|
||||
<button
|
||||
key={genre}
|
||||
onClick={() => setSelectedGenre(genre)}
|
||||
disabled={isGenerating}
|
||||
className={`genre-btn ${selectedGenre === genre ? 'active' : ''}`}
|
||||
>
|
||||
{genre}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<div className="genre-row">
|
||||
{['Hip-Hop', 'R&B', 'EDM'].map(genre => (
|
||||
<button
|
||||
key={genre}
|
||||
onClick={() => setSelectedGenre(genre)}
|
||||
disabled={isGenerating}
|
||||
className={`genre-btn ${selectedGenre === genre ? 'active' : ''}`}
|
||||
>
|
||||
{genre}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<div className="genre-row">
|
||||
{['JAZZ', 'ROCK'].map(genre => (
|
||||
<button
|
||||
key={genre}
|
||||
onClick={() => setSelectedGenre(genre)}
|
||||
disabled={isGenerating}
|
||||
className={`genre-btn ${selectedGenre === genre ? 'active' : ''}`}
|
||||
>
|
||||
{genre}
|
||||
</button>
|
||||
))}
|
||||
<div className="genre-btn-placeholder"></div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{isGenerating && statusMessage && (
|
||||
<div className="status-message">
|
||||
<svg className="animate-spin h-4 w-4" viewBox="0 0 24 24">
|
||||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none"/>
|
||||
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"/>
|
||||
</svg>
|
||||
{statusMessage}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="mt-4 shrink-0">
|
||||
<button
|
||||
onClick={handleGenerateMusic}
|
||||
disabled={isGenerating}
|
||||
className={`btn-secondary ${isGenerating ? 'disabled' : ''}`}
|
||||
>
|
||||
{isGenerating ? (
|
||||
<>
|
||||
<svg className="animate-spin h-4 w-4" viewBox="0 0 24 24">
|
||||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none"/>
|
||||
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"/>
|
||||
</svg>
|
||||
생성 중...
|
||||
</>
|
||||
) : (
|
||||
'음악 생성'
|
||||
{/* Language Selection */}
|
||||
<div className="sound-studio-section">
|
||||
<label className="input-label">언어</label>
|
||||
<div className="language-selector-wrapper" ref={languageDropdownRef}>
|
||||
<button
|
||||
onClick={() => setIsLanguageDropdownOpen(!isLanguageDropdownOpen)}
|
||||
disabled={isGenerating}
|
||||
className="language-selector"
|
||||
>
|
||||
<div className="language-display">
|
||||
<span className="language-flag">{LANGUAGE_FLAGS[selectedLang]}</span>
|
||||
<span className="language-name">{selectedLang}</span>
|
||||
</div>
|
||||
<img
|
||||
src="/assets/images/icon-dropdown.svg"
|
||||
alt=""
|
||||
className={`language-dropdown-icon ${isLanguageDropdownOpen ? 'open' : ''}`}
|
||||
/>
|
||||
</button>
|
||||
{isLanguageDropdownOpen && (
|
||||
<div className="language-dropdown-menu">
|
||||
{Object.keys(LANGUAGE_MAP).map((lang) => (
|
||||
<button
|
||||
key={lang}
|
||||
onClick={() => {
|
||||
setSelectedLang(lang);
|
||||
setIsLanguageDropdownOpen(false);
|
||||
}}
|
||||
className={`language-dropdown-item ${selectedLang === lang ? 'active' : ''}`}
|
||||
>
|
||||
<span className="language-flag">{LANGUAGE_FLAGS[lang]}</span>
|
||||
<span className="language-name">{lang}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Lyrics Card */}
|
||||
{showLyrics && (
|
||||
<div
|
||||
className="card card-flex flex-1 animate-slide-in card-overflow-hidden min-w-280"
|
||||
>
|
||||
<h3 className="section-title mb-1">가사</h3>
|
||||
<p className="text-gray-500 text-sm mb-4 shrink-0">가사 영역을 선택해서 수정 가능해요</p>
|
||||
{/* Right Column - Lyrics */}
|
||||
<div className="lyrics-column">
|
||||
<div className="lyrics-header">
|
||||
<h3 className="column-title">가사</h3>
|
||||
<p className="lyrics-subtitle">가사 영역을 선택해서 수정 가능해요</p>
|
||||
</div>
|
||||
|
||||
<div className="card-inner flex-col gap-3 min-h-0 overflow-hidden" style={{ display: 'flex', flex: 1 }}>
|
||||
{/* Player Bar */}
|
||||
<div className="player-bar">
|
||||
<button
|
||||
onClick={togglePlayPause}
|
||||
disabled={!audioUrl}
|
||||
className={`play-btn ${!audioUrl ? 'disabled' : ''}`}
|
||||
>
|
||||
{isPlaying ? (
|
||||
<svg className="w-6 h-6" viewBox="0 0 24 24" fill="currentColor">
|
||||
<rect x="6" y="4" width="4" height="16" rx="1" />
|
||||
<rect x="14" y="4" width="4" height="16" rx="1" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg className="w-6 h-6" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg>
|
||||
)}
|
||||
</button>
|
||||
{/* Audio Player */}
|
||||
<div className="audio-player">
|
||||
<button
|
||||
onClick={togglePlayPause}
|
||||
disabled={!audioUrl}
|
||||
className={`play-btn-new ${!audioUrl ? 'disabled' : ''}`}
|
||||
>
|
||||
{isPlaying ? (
|
||||
<svg className="w-6 h-6" viewBox="0 0 24 24" fill="currentColor">
|
||||
<rect x="6" y="4" width="4" height="16" rx="1" />
|
||||
<rect x="14" y="4" width="4" height="16" rx="1" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg className="w-6 h-6" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M8 5v14l11-7z"/>
|
||||
</svg>
|
||||
)}
|
||||
</button>
|
||||
|
||||
<div
|
||||
ref={progressBarRef}
|
||||
onMouseDown={onMouseDown}
|
||||
className={`progress-bar-container ${!audioUrl ? 'disabled' : ''}`}
|
||||
>
|
||||
<div
|
||||
className="progress-bar-fill"
|
||||
style={{ width: `${progress}%` }}
|
||||
></div>
|
||||
<div
|
||||
ref={progressBarRef}
|
||||
onMouseDown={onMouseDown}
|
||||
className={`audio-progress-container ${!audioUrl ? 'disabled' : ''}`}
|
||||
>
|
||||
<div
|
||||
className="audio-progress-fill"
|
||||
style={{ width: `${progress}%` }}
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="progress-bar-thumb"
|
||||
style={{ left: `${progress}%` }}
|
||||
>
|
||||
<div className="progress-bar-thumb-glow"></div>
|
||||
<div className="progress-bar-thumb-dot"></div>
|
||||
</div>
|
||||
</div>
|
||||
<span className="audio-time">
|
||||
{formatTime(Math.max(0, duration - currentTime))}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span className="time-display">
|
||||
{formatTime(Math.max(0, duration - currentTime))}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Lyrics Textarea */}
|
||||
{/* Lyrics Display */}
|
||||
<div className="lyrics-display">
|
||||
{lyrics ? (
|
||||
<textarea
|
||||
value={lyrics}
|
||||
onChange={(e) => setLyrics(e.target.value)}
|
||||
className="textarea-lyrics custom-scrollbar"
|
||||
placeholder="가사가 여기에 표시됩니다..."
|
||||
className="lyrics-textarea"
|
||||
placeholder="사운드 생성 시 가사 표시됩니다."
|
||||
/>
|
||||
</div>
|
||||
|
||||
<button
|
||||
onClick={handleRegenerate}
|
||||
disabled={isGenerating}
|
||||
className="btn-regenerate"
|
||||
>
|
||||
재생성
|
||||
</button>
|
||||
) : (
|
||||
<div className="lyrics-placeholder">
|
||||
사운드 생성 시 가사 표시됩니다.
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Generate Button */}
|
||||
<button
|
||||
onClick={handleGenerateMusic}
|
||||
disabled={isGenerating}
|
||||
className={`btn-generate-sound ${isGenerating ? 'disabled' : ''}`}
|
||||
>
|
||||
{isGenerating ? (
|
||||
<>
|
||||
<svg className="animate-spin h-4 w-4" viewBox="0 0 24 24">
|
||||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none"/>
|
||||
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"/>
|
||||
</svg>
|
||||
생성 중...
|
||||
</>
|
||||
) : (
|
||||
'사운드 생성'
|
||||
)}
|
||||
</button>
|
||||
|
||||
{errorMessage && (
|
||||
<div className="error-message-new">
|
||||
{errorMessage}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{isGenerating && statusMessage && (
|
||||
<div className="status-message-new">
|
||||
<svg className="animate-spin h-4 w-4" viewBox="0 0 24 24">
|
||||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none"/>
|
||||
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"/>
|
||||
</svg>
|
||||
{statusMessage}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Bottom Button */}
|
||||
<div className="bottom-button-container">
|
||||
<button
|
||||
onClick={() => songTaskId && onNext(songTaskId)}
|
||||
disabled={status !== 'complete' || !songTaskId}
|
||||
className={`btn-primary ${status !== 'complete' || !songTaskId ? 'disabled' : ''}`}
|
||||
disabled={status !== 'complete' || !songTaskId || videoGenerationStatus === 'generating'}
|
||||
className={`btn-video-generate ${
|
||||
videoGenerationStatus === 'generating'
|
||||
? 'generating'
|
||||
: status !== 'complete' || !songTaskId
|
||||
? 'disabled'
|
||||
: ''
|
||||
}`}
|
||||
>
|
||||
영상 생성하기
|
||||
{videoGenerationStatus === 'generating' ? (
|
||||
<>
|
||||
<span className="video-gen-text">영상 생성 중</span>
|
||||
<div className="video-gen-progress-bar">
|
||||
<div
|
||||
className="video-gen-progress-fill"
|
||||
style={{ width: `${videoGenerationProgress}%` }}
|
||||
></div>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
'영상 생성하기'
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user