숏폼생성 기능 추가
This commit is contained in:
1 parent
cb68b2da97
commit
530416026d
45 files changed
+5398
-960
No files matched your search
@@ -24,6 +24,7 @@ interface SearchInputFormProps {
|
||||
onManualInput?: (businessName: string, address: string) => void;
|
||||
/** 직접입력 버튼 클릭 시 기본 동작(모달 열기)을 대체합니다. 제공 시 모달을 직접 관리해야 합니다. */
|
||||
onManualButtonClick?: () => void;
|
||||
onShortform?: () => void;
|
||||
error?: string | null;
|
||||
}
|
||||
|
||||
@@ -32,6 +33,7 @@ const SearchInputForm: React.FC<SearchInputFormProps> = ({
|
||||
onAutocomplete,
|
||||
onManualInput,
|
||||
onManualButtonClick,
|
||||
onShortform,
|
||||
error: externalError,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
@@ -68,6 +70,7 @@ const SearchInputForm: React.FC<SearchInputFormProps> = ({
|
||||
const searchTypeOptions = [
|
||||
{ value: 'url' as SearchType, label: 'URL' },
|
||||
{ value: 'name' as SearchType, label: t('landing.hero.searchTypeBusinessName') },
|
||||
{ value: 'manual' as SearchType, label: t('landing.hero.searchTypeManual') },
|
||||
];
|
||||
|
||||
const getPlaceholder = () =>
|
||||
@@ -196,8 +199,12 @@ const SearchInputForm: React.FC<SearchInputFormProps> = ({
|
||||
type="button"
|
||||
className={`hero-dropdown-item ${searchType === option.value ? 'active' : ''}`}
|
||||
onClick={() => {
|
||||
setSearchType(option.value);
|
||||
setIsDropdownOpen(false);
|
||||
if (option.value === 'manual') {
|
||||
handleManualButtonClick();
|
||||
} else {
|
||||
setSearchType(option.value);
|
||||
}
|
||||
}}
|
||||
>
|
||||
{option.label}
|
||||
@@ -321,9 +328,19 @@ const SearchInputForm: React.FC<SearchInputFormProps> = ({
|
||||
{t('landing.hero.analyzeButton')}
|
||||
</button>
|
||||
|
||||
<button type="button" className="hero-manual-button" onClick={handleManualButtonClick}>
|
||||
{t('landing.hero.searchTypeManual')}
|
||||
</button>
|
||||
{onShortform && (
|
||||
<button
|
||||
type="button"
|
||||
className="url-input-shortform-btn"
|
||||
onClick={onShortform}
|
||||
>
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polygon points="23 7 16 12 23 17 23 7" />
|
||||
<rect x="1" y="5" width="15" height="14" rx="2" ry="2" />
|
||||
</svg>
|
||||
숏폼 영상 만들기
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* onManualButtonClick 미제공 시 모달을 내부에서 관리 */}
|
||||
{!onManualButtonClick && isManualModalOpen && (
|
||||
|
||||
@@ -157,6 +157,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
const [uploadVideoTitle, setUploadVideoTitle] = useState<string>('');
|
||||
const [uploadChannelName, setUploadChannelName] = useState<string>('');
|
||||
const [uploadIsScheduled, setUploadIsScheduled] = useState(false);
|
||||
const [uploadScheduledAt, setUploadScheduledAt] = useState<string | null>(null);
|
||||
|
||||
// 드롭다운 외부 클릭 시 닫기
|
||||
useEffect(() => {
|
||||
@@ -373,6 +374,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
// 예약 업로드: 폴링 없이 바로 완료 처리
|
||||
setUploadStatus('completed');
|
||||
setUploadProgress(100);
|
||||
setUploadScheduledAt(uploadResponse.scheduled_at ?? null);
|
||||
onClose();
|
||||
resetForm();
|
||||
} else {
|
||||
@@ -432,6 +434,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
setUploadVideoTitle('');
|
||||
setUploadChannelName('');
|
||||
setUploadIsScheduled(false);
|
||||
setUploadScheduledAt(null);
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
@@ -461,6 +464,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
youtubeUrl={uploadYoutubeUrl}
|
||||
errorMessage={uploadErrorMessage}
|
||||
isScheduled={uploadIsScheduled}
|
||||
scheduledAt={uploadScheduledAt}
|
||||
onGoToCalendar={onGoToCalendar}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -45,44 +45,7 @@ export const TUTORIAL_PAGE_GROUPS: string[][] = [
|
||||
export const tutorialSteps: TutorialStepDef[] = [
|
||||
{
|
||||
key: TUTORIAL_KEYS.LANDING,
|
||||
hints: [
|
||||
{
|
||||
targetSelector: '.hero-dropdown-trigger',
|
||||
titleKey: 'tutorial.landing.dropdown.title',
|
||||
descriptionKey: 'tutorial.landing.dropdown.desc',
|
||||
position: 'top',
|
||||
clickToAdvance: false,
|
||||
noSpotlight: true,
|
||||
variant: 'bubble',
|
||||
},
|
||||
{
|
||||
targetSelector: '.hero-input-wrapper',
|
||||
titleKey: 'tutorial.landing.field.title',
|
||||
descriptionKey: 'tutorial.landing.field.desc',
|
||||
position: 'top',
|
||||
clickToAdvance: false,
|
||||
noSpotlight: true,
|
||||
variant: 'bubble',
|
||||
},
|
||||
{
|
||||
targetSelector: '.hero-manual-button',
|
||||
titleKey: 'tutorial.landing.manual.title',
|
||||
descriptionKey: 'tutorial.landing.manual.desc',
|
||||
position: 'bottom',
|
||||
clickToAdvance: false,
|
||||
noSpotlight: true,
|
||||
variant: 'bubble',
|
||||
},
|
||||
{
|
||||
targetSelector: '.hero-button',
|
||||
titleKey: 'tutorial.landing.button.title',
|
||||
descriptionKey: 'tutorial.landing.button.desc',
|
||||
position: 'bottom',
|
||||
clickToAdvance: true,
|
||||
noSpotlight: true,
|
||||
variant: 'bubble',
|
||||
},
|
||||
],
|
||||
hints: [],
|
||||
},
|
||||
{
|
||||
key: TUTORIAL_KEYS.ASSET,
|
||||
|
||||
@@ -14,6 +14,7 @@ interface UploadProgressModalProps {
|
||||
youtubeUrl?: string;
|
||||
errorMessage?: string;
|
||||
isScheduled?: boolean;
|
||||
scheduledAt?: string | null;
|
||||
onGoToCalendar?: () => void;
|
||||
}
|
||||
|
||||
@@ -27,6 +28,7 @@ const UploadProgressModal: React.FC<UploadProgressModalProps> = ({
|
||||
youtubeUrl,
|
||||
errorMessage,
|
||||
isScheduled = false,
|
||||
scheduledAt,
|
||||
onGoToCalendar,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
@@ -148,6 +150,28 @@ const UploadProgressModal: React.FC<UploadProgressModalProps> = ({
|
||||
{t('upload.viewOnYoutube')}
|
||||
</a>
|
||||
)}
|
||||
|
||||
{/* Scheduled conflict notice */}
|
||||
{status === 'completed' && isScheduled && scheduledAt && (
|
||||
<div className="upload-progress-schedule-notice">
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<circle cx="12" cy="12" r="10" />
|
||||
<line x1="12" y1="8" x2="12" y2="12" />
|
||||
<line x1="12" y1="16" x2="12.01" y2="16" />
|
||||
</svg>
|
||||
<span>
|
||||
{t('upload.scheduleConflict', {
|
||||
time: new Date(scheduledAt).toLocaleString('ko-KR', {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
}),
|
||||
})}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Footer */}
|
||||
|
||||
Reference in new issue
Block a user