Compare commits

...
Author SHA1 Message Date
skkim dd1f873a6e 번역 수정 2026-04-16 16:40:07 +09:00
skkim 1daf6b0eb2 UI 및 튜토리얼 수정 2026-04-16 16:17:49 +09:00
skkim 8734d3388d 튜토리얼 수정 2026-04-13 16:17:27 +09:00
skkim f0d9106860 Merge branch 'main' of https://gitea.o2o.kr/castad/o2o-castad-frontend into feature-tutorial 2026-04-07 17:03:43 +09:00
skkim faaca0f4fb 랜딩화면 문구변경 2026-04-07 13:26:06 +09:00
15 changed files with 893 additions and 278 deletions

No files matched your search

+195 -35
View File
@@ -7721,6 +7721,10 @@
border-color: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.1);
} }
.genre-btn.active:hover:not(:disabled) {
border-color: var(--color-mint);
}
.genre-btn.active { .genre-btn.active {
border-color: var(--color-mint); border-color: var(--color-mint);
} }
@@ -7798,7 +7802,7 @@
top: calc(100% + 0.5rem); top: calc(100% + 0.5rem);
left: 0; left: 0;
right: 0; right: 0;
max-height: 240px; max-height: 220px;
background-color: #002224; background-color: #002224;
border: 1px solid #046266; border: 1px solid #046266;
border-radius: 8px; border-radius: 8px;
@@ -8080,6 +8084,7 @@
color: var(--color-mint); color: var(--color-mint);
font-size: var(--text-sm); font-size: var(--text-sm);
text-align: center; text-align: center;
white-space: pre-line;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -9759,6 +9764,47 @@
color: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.3);
} }
/* SEO 자동 생성 shimmer 효과 */
@keyframes seo-shimmer {
0% { background-position: 200% center; }
100% { background-position: -200% center; }
}
.seo-input-wrapper {
position: relative;
}
.seo-input-wrapper .social-posting-input,
.seo-input-wrapper .social-posting-textarea {
width: 100%;
}
.seo-shimmer-text {
position: absolute;
top: 50%;
left: 12px;
transform: translateY(-50%);
pointer-events: none;
font-size: 14px;
font-family: 'Pretendard', sans-serif;
background: linear-gradient(
90deg,
rgba(166, 255, 234, 0.25) 0%,
#a6ffea 40%,
rgba(166, 255, 234, 0.25) 80%
);
background-size: 200% 100%;
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
animation: seo-shimmer 3s linear infinite;
}
.seo-input-wrapper:has(.social-posting-textarea) .seo-shimmer-text {
top: 14px;
transform: none;
}
.social-posting-input:focus, .social-posting-input:focus,
.social-posting-select:focus, .social-posting-select:focus,
.social-posting-textarea:focus { .social-posting-textarea:focus {
@@ -10568,34 +10614,80 @@
inset: 0; inset: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
pointer-events: all; pointer-events: none;
cursor: default; cursor: default;
} }
.tutorial-overlay-blocker {
position: fixed;
background: rgba(0, 0, 0, 0.72);
pointer-events: all;
}
.tutorial-spotlight-ring {
position: fixed;
border: 2px solid rgba(166, 255, 234, 0.85);
border-radius: 12px;
box-shadow: 0 0 0 1px rgba(166, 255, 234, 0.2);
pointer-events: none;
z-index: 10001;
}
.tutorial-tooltip { .tutorial-tooltip {
position: fixed; position: fixed;
width: 300px;
background: #1a2630;
border: 1px solid rgba(166, 255, 234, 0.25);
border-radius: 12px;
padding: 16px;
pointer-events: all; pointer-events: all;
z-index: 10002; z-index: 10002;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); display: flex;
width: 370px;
padding: 20px;
flex-direction: column;
gap: 8px;
border-radius: 12px;
border: 1px solid var(--Color-teal-600, #046266);
background: var(--Color-teal-800, #002224);
} }
.tutorial-tooltip-title { .tutorial-tooltip-title {
font-size: 15px; align-self: stretch;
font-weight: 700; color: rgba(255, 255, 255, 0.70);
color: #a6ffea; /* 14 */
margin: 0 0 8px; font-family: Pretendard;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 18px; /* 128.571% */
} }
.tutorial-tooltip-desc { .tutorial-tooltip-desc {
font-size: 13px; display: flex;
color: rgba(255, 255, 255, 0.75); padding-bottom: 16px;
margin: 0 0 14px; flex-direction: column;
align-items: flex-start;
gap: 4px;
align-self: stretch;
line-height: 1.5; line-height: 1.5;
white-space: pre-line;
align-self: stretch;
color: var(--Color-white, #FFF);
font-family: Pretendard;
font-size: 18px;
font-style: normal;
font-weight: 600;
line-height: 24px; /* 133.333% */
letter-spacing: -0.108px;
}
.tutorial-tooltip-note {
align-self: stretch;
color: rgba(255, 255, 255, 0.60);
font-family: Pretendard;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: 100%;
letter-spacing: -0.072px;
margin: -8px 0 14px;
white-space: pre-line;
} }
.tutorial-tooltip-footer { .tutorial-tooltip-footer {
@@ -10604,23 +10696,35 @@
justify-content: space-between; justify-content: space-between;
} }
.tutorial-tooltip-footer-left {
display: flex;
align-items: center;
gap: 8px;
}
.tutorial-tooltip-counter { .tutorial-tooltip-counter {
color: rgba(255, 255, 255, 0.60);
font-family: Pretendard;
font-size: 12px; font-size: 12px;
color: rgba(255, 255, 255, 0.4); font-style: normal;
font-weight: 400;
line-height: 100%; /* 12px */
letter-spacing: -0.072px;
} }
.tutorial-tooltip-actions { .tutorial-tooltip-actions {
display: flex; display: flex;
gap: 6px; gap: 10px;
} }
.tutorial-btn-skip { .tutorial-btn-skip {
color: rgba(255, 255, 255, 0.60);
font-family: Pretendard;
font-size: 12px; font-size: 12px;
color: rgba(255, 255, 255, 0.4); font-style: normal;
background: none; font-weight: 400;
border: none; line-height: 100%; /* 12px */
cursor: pointer; letter-spacing: -0.072px;
padding: 4px 8px;
} }
.tutorial-btn-skip:hover { .tutorial-btn-skip:hover {
@@ -10628,13 +10732,20 @@
} }
.tutorial-btn-prev { .tutorial-btn-prev {
display: flex;
padding: 8px 12px;
justify-content: center;
align-items: center;
gap: 10px;
border-radius: 4px;
background: var(--Color-teal-200, #9BCACC);
color: var(--Color-teal-800, #002224);
font-family: Pretendard;
font-size: 13px; font-size: 13px;
color: rgba(255, 255, 255, 0.7); font-style: normal;
background: rgba(255, 255, 255, 0.08); font-weight: 400;
border: none; line-height: 100%; /* 13px */
border-radius: 6px; letter-spacing: -0.078px;
cursor: pointer;
padding: 5px 12px;
} }
.tutorial-btn-prev:hover { .tutorial-btn-prev:hover {
@@ -10642,17 +10753,66 @@
} }
.tutorial-btn-next { .tutorial-btn-next {
display: flex;
padding: 8px 12px;
justify-content: center;
align-items: center;
gap: 10px;
border-radius: 4px;
background: var(--Color-teal-200, #9BCACC);
color: var(--Color-teal-800, #002224);
font-family: Pretendard;
font-size: 13px; font-size: 13px;
color: #fff; font-style: normal;
background: #6366f1; font-weight: 400;
border: none; line-height: 100%; /* 13px */
border-radius: 6px; letter-spacing: -0.078px;
cursor: pointer;
padding: 5px 12px;
} }
.tutorial-btn-next:hover { .tutorial-btn-next:hover {
background: #4f46e5; background: rgba(255, 255, 255, 0.14);
}
/* 말풍선 variant — 색상은 기본 tooltip과 동일, 꼬리만 추가 */
.tutorial-tooltip-bubble {
border-radius: 12px;
}
/* 꼬리 (화살표) */
.tutorial-tooltip-bubble::before {
content: '';
position: absolute;
width: 0;
height: 0;
border: 10px solid transparent;
}
.tutorial-tooltip-bubble--bottom::before {
bottom: 100%;
left: 50%;
transform: translateX(-50%);
border-bottom-color: #1a2630;
}
.tutorial-tooltip-bubble--top::before {
top: 100%;
left: 50%;
transform: translateX(-50%);
border-top-color: #1a2630;
}
.tutorial-tooltip-bubble--right::before {
right: 100%;
top: 50%;
transform: translateY(-50%);
border-right-color: #1a2630;
}
.tutorial-tooltip-bubble--left::before {
left: 100%;
top: 50%;
transform: translateY(-50%);
border-left-color: #1a2630;
} }
.tutorial-tooltip-action-hint { .tutorial-tooltip-action-hint {
+7 -1
View File
@@ -140,7 +140,13 @@ const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, onHome, userI
{menuItems.map(item => ( {menuItems.map(item => (
<SidebarItem <SidebarItem
key={item.id} key={item.id}
id={item.id === '내 정보' ? 'sidebar-my-info' : undefined} id={
item.id === '내 정보'
? 'sidebar-my-info'
: item.id === 'ADO2 콘텐츠'
? 'sidebar-ado2-contents'
: undefined
}
icon={item.icon} icon={item.icon}
label={item.label} label={item.label}
isCollapsed={isCollapsed} isCollapsed={isCollapsed}
+53 -10
View File
@@ -139,6 +139,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
const [videoMeta, setVideoMeta] = useState<{ width: number; height: number; duration: number } | null>(null); const [videoMeta, setVideoMeta] = useState<{ width: number; height: number; duration: number } | null>(null);
const channelDropdownRef = useRef<HTMLDivElement>(null); const channelDropdownRef = useRef<HTMLDivElement>(null);
const privacyDropdownRef = useRef<HTMLDivElement>(null); const privacyDropdownRef = useRef<HTMLDivElement>(null);
const hasBeenOpenedRef = useRef(false);
// Upload progress modal state // Upload progress modal state
const [showUploadProgress, setShowUploadProgress] = useState(false); const [showUploadProgress, setShowUploadProgress] = useState(false);
@@ -175,16 +176,32 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
return () => { document.body.style.overflow = ''; }; return () => { document.body.style.overflow = ''; };
}, [isOpen]); }, [isOpen]);
// 모달 최초 오픈 시 튜토리얼 트리거 // 모달 오픈/닫힘 시 튜토리얼 트리거
useEffect(() => { useEffect(() => {
if (isOpen && !tutorial.hasSeen(TUTORIAL_KEYS.UPLOAD_MODAL)) { if (isOpen) {
hasBeenOpenedRef.current = true;
if (!tutorial.hasSeen(TUTORIAL_KEYS.UPLOAD_MODAL)) {
const timer = setTimeout(() => { const timer = setTimeout(() => {
tutorial.startTutorial(TUTORIAL_KEYS.UPLOAD_MODAL); tutorial.startTutorial(TUTORIAL_KEYS.UPLOAD_MODAL);
}, 400); }, 400);
return () => clearTimeout(timer); return () => clearTimeout(timer);
} }
} else if (hasBeenOpenedRef.current && !tutorial.hasSeen(TUTORIAL_KEYS.FEEDBACK)) {
hasBeenOpenedRef.current = false;
tutorial.startTutorial(TUTORIAL_KEYS.FEEDBACK);
}
}, [isOpen]); }, [isOpen]);
// SEO 생성 완료 시 UPLOAD_FORM 튜토리얼 트리거
useEffect(() => {
if (!isLoadingAutoDescription && isOpen && !tutorial.hasSeen(TUTORIAL_KEYS.UPLOAD_FORM)) {
const timer = setTimeout(() => {
tutorial.startTutorial(TUTORIAL_KEYS.UPLOAD_FORM);
}, 400);
return () => clearTimeout(timer);
}
}, [isLoadingAutoDescription]);
// 소셜 계정 로드 // 소셜 계정 로드
useEffect(() => { useEffect(() => {
if (isOpen) { if (isOpen) {
@@ -413,8 +430,21 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
); );
if (!isOpen || !video) { if (!isOpen || !video) {
// Still render upload progress modal even when main modal is closed return (
return showUploadProgress ? uploadProgressModalElement : null; <>
{showUploadProgress && uploadProgressModalElement}
{tutorial.isActive && (
<TutorialOverlay
hints={tutorial.hints}
currentIndex={tutorial.currentHintIndex}
onNext={tutorial.nextHint}
onPrev={tutorial.prevHint}
onSkip={tutorial.skipTutorial}
groupProgress={tutorial.groupProgress}
/>
)}
</>
);
} }
return ( return (
@@ -536,48 +566,60 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
<label className="social-posting-label"> <label className="social-posting-label">
{t('social.postTitleLabel')} <span className="required">*</span> {t('social.postTitleLabel')} <span className="required">*</span>
</label> </label>
<div className="seo-input-wrapper">
<input <input
type="text" type="text"
value={title} value={title}
onChange={(e) => setTitle(e.target.value)} onChange={(e) => setTitle(e.target.value)}
placeholder={isLoadingAutoDescription ? t('social.autoSeoTitle') : t('social.postTitlePlaceholder')} placeholder={isLoadingAutoDescription ? '' : t('social.postTitlePlaceholder')}
// placeholder={t('social.postTitlePlaceholder')}
className="social-posting-input" className="social-posting-input"
maxLength={100} maxLength={100}
disabled={isLoadingAutoDescription} disabled={isLoadingAutoDescription}
/> />
{isLoadingAutoDescription && (
<span className="seo-shimmer-text">{t('social.autoSeoTitle')}</span>
)}
</div>
<span className="social-posting-char-count">{title.length}/100</span> <span className="social-posting-char-count">{title.length}/100</span>
</div> </div>
{/* Description */} {/* Description */}
<div className="social-posting-field"> <div className="social-posting-field">
<label className="social-posting-label">{t('social.postContentLabel')}</label> <label className="social-posting-label">{t('social.postContentLabel')}</label>
<div className="seo-input-wrapper">
<textarea <textarea
value={description} value={description}
onChange={(e) => setDescription(e.target.value)} onChange={(e) => setDescription(e.target.value)}
placeholder={t(isLoadingAutoDescription ? t('social.autoSeoDescription') : t('social.postContentPlaceholder'))} placeholder={isLoadingAutoDescription ? '' : t('social.postContentPlaceholder')}
// placeholder={t('social.postContentPlaceholder')}
className="social-posting-textarea" className="social-posting-textarea"
maxLength={5000} maxLength={5000}
rows={4} rows={4}
disabled={isLoadingAutoDescription} disabled={isLoadingAutoDescription}
/> />
{isLoadingAutoDescription && (
<span className="seo-shimmer-text">{t('social.autoSeoDescription')}</span>
)}
</div>
<span className="social-posting-char-count">{description.length}/5,000</span> <span className="social-posting-char-count">{description.length}/5,000</span>
</div> </div>
{/* Tags */} {/* Tags */}
<div className="social-posting-field"> <div className="social-posting-field">
<label className="social-posting-label">{t('social.tagsLabel')}</label> <label className="social-posting-label">{t('social.tagsLabel')}</label>
<div className="seo-input-wrapper">
<input <input
type="text" type="text"
value={tags} value={tags}
onChange={(e) => setTags(e.target.value)} onChange={(e) => setTags(e.target.value)}
placeholder={t(isLoadingAutoDescription ? t('social.autoSeoTags') : t('social.tagsPlaceholder'))} placeholder={isLoadingAutoDescription ? '' : t('social.tagsPlaceholder')}
// placeholder={t('social.tagsPlaceholder')}
className="social-posting-input" className="social-posting-input"
maxLength={500} maxLength={500}
disabled={isLoadingAutoDescription} disabled={isLoadingAutoDescription}
/> />
{isLoadingAutoDescription && (
<span className="seo-shimmer-text">{t('social.autoSeoTags')}</span>
)}
</div>
<span className="social-posting-char-count">{tags.length}/500</span> <span className="social-posting-char-count">{tags.length}/500</span>
</div> </div>
@@ -782,6 +824,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
onNext={tutorial.nextHint} onNext={tutorial.nextHint}
onPrev={tutorial.prevHint} onPrev={tutorial.prevHint}
onSkip={tutorial.skipTutorial} onSkip={tutorial.skipTutorial}
groupProgress={tutorial.groupProgress}
/> />
)} )}
</> </>
+152 -71
View File
@@ -20,6 +20,7 @@ interface TutorialOverlayProps {
onNext: () => void; onNext: () => void;
onPrev: () => void; onPrev: () => void;
onSkip: () => void; onSkip: () => void;
groupProgress?: { groupTotal: number; groupOffset: number; isLastKeyInGroup: boolean } | null;
} }
const PADDING = 8; const PADDING = 8;
@@ -31,36 +32,50 @@ function getTargetRect(selector: string): Rect | null {
return { top: r.top, left: r.left, width: r.width, height: r.height }; return { top: r.top, left: r.left, width: r.width, height: r.height };
} }
function calcTooltipPos(rect: Rect, position: TutorialHint['position']): TooltipPos { function getSpotlightRect(
const tooltipW = 300; rect: Rect,
const tooltipH = 140; padding: number,
override?: { top?: number; right?: number; bottom?: number; left?: number }
): Rect {
const pTop = override?.top ?? padding;
const pRight = override?.right ?? padding;
const pBottom = override?.bottom ?? padding;
const pLeft = override?.left ?? padding;
const left = Math.max(0, Math.floor(rect.left - pLeft));
const top = Math.max(0, Math.floor(rect.top - pTop));
const right = Math.min(window.innerWidth, Math.ceil(rect.left + rect.width + pRight));
const bottom = Math.min(window.innerHeight, Math.ceil(rect.top + rect.height + pBottom));
return {
top,
left,
width: Math.max(0, right - left),
height: Math.max(0, bottom - top),
};
}
function calcTooltipPos(rect: Rect, position: TutorialHint['position'], tooltipW = 300, tooltipH = 160): TooltipPos {
switch (position) { switch (position) {
case 'bottom': case 'bottom':
return { return {
top: rect.top + rect.height + PADDING, top: Math.min(rect.top + rect.height + PADDING, window.innerHeight - tooltipH - 8),
left: Math.min( left: Math.min(Math.max(rect.left + rect.width / 2 - tooltipW / 2, 8), window.innerWidth - tooltipW - 8),
Math.max(rect.left + rect.width / 2 - tooltipW / 2, 8),
window.innerWidth - tooltipW - 8
),
}; };
case 'top': case 'top':
return { return {
top: rect.top - tooltipH - PADDING, top: Math.max(rect.top - tooltipH - PADDING, 8),
left: Math.min( left: Math.min(Math.max(rect.left + rect.width / 2 - tooltipW / 2, 8), window.innerWidth - tooltipW - 8),
Math.max(rect.left + rect.width / 2 - tooltipW / 2, 8),
window.innerWidth - tooltipW - 8
),
}; };
case 'right': case 'right':
return { return {
top: Math.max(rect.top + rect.height / 2 - tooltipH / 2, 8), top: Math.min(Math.max(rect.top + rect.height / 2 - tooltipH / 2, 8), window.innerHeight - tooltipH - 8),
left: rect.left + rect.width + PADDING, left: Math.min(rect.left + rect.width + PADDING, window.innerWidth - tooltipW - 8),
}; };
case 'left': case 'left':
return { return {
top: Math.max(rect.top + rect.height / 2 - tooltipH / 2, 8), top: Math.min(Math.max(rect.top + rect.height / 2 - tooltipH / 2, 8), window.innerHeight - tooltipH - 8),
left: rect.left - tooltipW - PADDING, left: Math.max(rect.left - tooltipW - PADDING, 8),
}; };
} }
} }
@@ -71,12 +86,17 @@ const TutorialOverlay: React.FC<TutorialOverlayProps> = ({
onNext, onNext,
onPrev, onPrev,
onSkip, onSkip,
groupProgress,
}) => { }) => {
const { t } = useTranslation(); const { t } = useTranslation();
const [targetRect, setTargetRect] = useState<Rect | null>(null); const [targetRect, setTargetRect] = useState<Rect | null>(null);
const tooltipRef = React.useRef<HTMLDivElement>(null);
const [tooltipSize, setTooltipSize] = useState({ w: 300, h: 160 });
const hint = hints[currentIndex]; const hint = hints[currentIndex];
const isLast = currentIndex === hints.length - 1; const isLast = currentIndex === hints.length - 1;
// 그룹이 있으면 그룹의 마지막 키 + 마지막 힌트일 때만 완료, 그룹 없으면 기존대로
const isFinish = isLast && (groupProgress ? groupProgress.isLastKeyInGroup : true);
const updateRect = useCallback(() => { const updateRect = useCallback(() => {
if (!hint) return; if (!hint) return;
@@ -86,89 +106,148 @@ const TutorialOverlay: React.FC<TutorialOverlayProps> = ({
useEffect(() => { useEffect(() => {
updateRect(); updateRect();
window.addEventListener('resize', updateRect); window.addEventListener('resize', updateRect);
return () => window.removeEventListener('resize', updateRect); window.addEventListener('scroll', updateRect, true);
return () => {
window.removeEventListener('resize', updateRect);
window.removeEventListener('scroll', updateRect, true);
};
}, [updateRect]); }, [updateRect]);
// 대상 요소 z-index 끌어올리기 + 스크롤 + 클릭 시 onNext 연결
useEffect(() => { useEffect(() => {
if (!hint) return; if (!hint) return;
const el = document.querySelector<HTMLElement>(hint.targetSelector); let retryTimer: number | undefined;
if (!el) return; let rectTimer: number | undefined;
let cleanupTarget: (() => void) | undefined;
// 스크롤해서 요소가 화면 중앙에 오도록 const bindToTarget = (el: HTMLElement) => {
el.scrollIntoView({ behavior: 'smooth', block: 'center' }); el.scrollIntoView({ behavior: 'smooth', block: 'center' });
rectTimer = window.setTimeout(updateRect, 200);
// scrollIntoView 완료 후 rect 재계산
const timer = setTimeout(updateRect, 400);
const prevZ = el.style.zIndex;
const prevPos = el.style.position;
const prevCursor = el.style.cursor;
el.style.zIndex = '10001';
el.style.position = el.style.position || 'relative';
// clickToAdvance가 명시적으로 false가 아닌 경우에만 클릭 리스너 연결
const shouldClickAdvance = hint.clickToAdvance !== false; const shouldClickAdvance = hint.clickToAdvance !== false;
if (shouldClickAdvance) { if (shouldClickAdvance) {
el.style.cursor = 'pointer'; el.style.cursor = 'pointer';
el.addEventListener('click', onNext); el.addEventListener('click', onNext);
cleanupTarget = () => {
el.style.cursor = '';
el.removeEventListener('click', onNext);
};
} else {
cleanupTarget = () => {};
}
};
const tryBind = (): boolean => {
const el = document.querySelector(hint.targetSelector) as HTMLElement | null;
if (!el) return false;
bindToTarget(el);
return true;
};
if (!tryBind()) {
retryTimer = window.setInterval(() => {
if (tryBind() && retryTimer) {
window.clearInterval(retryTimer);
retryTimer = undefined;
}
}, 80);
} }
return () => { return () => {
clearTimeout(timer); if (retryTimer) window.clearInterval(retryTimer);
el.style.zIndex = prevZ; if (rectTimer) window.clearTimeout(rectTimer);
el.style.position = prevPos; cleanupTarget?.();
el.style.cursor = prevCursor;
if (shouldClickAdvance) {
el.removeEventListener('click', onNext);
}
}; };
}, [hint, updateRect, onNext]); }, [hint, updateRect, onNext]);
// 툴팁 DOM 크기 측정 — 힌트가 바뀔 때만 재측정
useEffect(() => {
const el = tooltipRef.current;
if (!el) return;
const { offsetWidth, offsetHeight } = el;
if (offsetWidth && offsetHeight) {
setTooltipSize(prev =>
prev.w === offsetWidth && prev.h === offsetHeight
? prev
: { w: offsetWidth, h: offsetHeight }
);
}
}, [currentIndex, hints]);
if (!hint) return null; if (!hint) return null;
// 대상 요소가 없으면 화면 중앙에 툴팁 표시 (오버레이는 보이지 않음) const spotlightPadding = hint.spotlightPadding ?? PADDING;
const tooltipPos: TooltipPos = targetRect const spotlightRect = (targetRect && !hint.noSpotlight) ? getSpotlightRect(targetRect, spotlightPadding, hint.spotlightPaddingOverride) : null;
? calcTooltipPos(targetRect, hint.position)
: {
top: window.innerHeight / 2 - 70,
left: window.innerWidth / 2 - 150,
};
// spotlight SVG 경로: 화면 전체 - 대상 요소 구멍 // 툴팁은 spotlightRect 기준으로 배치해야 스포트라이트와 겹치지 않음
// 대상 요소가 없으면 오버레이 없음 const tooltipPos: TooltipPos = (spotlightRect ?? targetRect)
const spotlight = targetRect ? calcTooltipPos((spotlightRect ?? targetRect)!, hint.position, tooltipSize.w, tooltipSize.h)
? `M0,0 H${window.innerWidth} V${window.innerHeight} H0 Z : {
M${targetRect.left - PADDING},${targetRect.top - PADDING} top: window.innerHeight / 2 - tooltipSize.h / 2,
H${targetRect.left + targetRect.width + PADDING} left: window.innerWidth / 2 - tooltipSize.w / 2,
V${targetRect.top + targetRect.height + PADDING} };
H${targetRect.left - PADDING} Z`
: null;
return ( return (
<div className="tutorial-overlay-root"> <div className="tutorial-overlay-root">
{/* 어두운 배경 + 스포트라이트 — 배경 클릭 시 아무 동작 없음 */} {spotlightRect ? (
{spotlight && ( <>
<svg className="tutorial-overlay-svg">
<path
d={spotlight}
fillRule="evenodd"
fill="rgba(0,0,0,0.72)"
/>
</svg>
)}
{/* 툴팁 — 항상 표시 */}
<div <div
className="tutorial-tooltip" className="tutorial-overlay-blocker"
style={{ top: 0, left: 0, right: 0, height: spotlightRect.top }}
/>
<div
className="tutorial-overlay-blocker"
style={{
top: spotlightRect.top,
left: 0,
width: spotlightRect.left,
height: spotlightRect.height,
}}
/>
<div
className="tutorial-overlay-blocker"
style={{
top: spotlightRect.top,
left: spotlightRect.left + spotlightRect.width,
right: 0,
height: spotlightRect.height,
}}
/>
<div
className="tutorial-overlay-blocker"
style={{
top: spotlightRect.top + spotlightRect.height,
left: 0,
right: 0,
bottom: 0,
}}
/>
<div
className="tutorial-spotlight-ring"
style={{
top: spotlightRect.top,
left: spotlightRect.left,
width: spotlightRect.width,
height: spotlightRect.height,
}}
/>
</>
) : null}
<div
ref={tooltipRef}
className={`tutorial-tooltip${hint.variant === 'bubble' ? ` tutorial-tooltip-bubble tutorial-tooltip-bubble--${hint.position}` : ''}`}
style={{ top: tooltipPos.top, left: tooltipPos.left }} style={{ top: tooltipPos.top, left: tooltipPos.left }}
onClick={e => e.stopPropagation()} onClick={(e) => e.stopPropagation()}
> >
<p className="tutorial-tooltip-title">{t(hint.titleKey)}</p> <p className="tutorial-tooltip-title">{t(hint.titleKey)}</p>
<p className="tutorial-tooltip-desc">{t(hint.descriptionKey)}</p> <p className="tutorial-tooltip-desc">{t(hint.descriptionKey)}</p>
{hint.noteKey && (
<p className="tutorial-tooltip-note">{t(hint.noteKey)}</p>
)}
<div className="tutorial-tooltip-footer"> <div className="tutorial-tooltip-footer">
<span className="tutorial-tooltip-counter"> <span className="tutorial-tooltip-counter">
{currentIndex + 1} / {hints.length} {groupProgress ? groupProgress.groupOffset + 1 : currentIndex + 1} / {groupProgress ? groupProgress.groupTotal : hints.length}
</span> </span>
<div className="tutorial-tooltip-actions"> <div className="tutorial-tooltip-actions">
<button className="tutorial-btn-skip" onClick={onSkip}> <button className="tutorial-btn-skip" onClick={onSkip}>
@@ -179,9 +258,11 @@ const TutorialOverlay: React.FC<TutorialOverlayProps> = ({
{t('tutorial.prev')} {t('tutorial.prev')}
</button> </button>
)} )}
{(hint.clickToAdvance !== true || isFinish) && (
<button className="tutorial-btn-next" onClick={onNext}> <button className="tutorial-btn-next" onClick={onNext}>
{isLast ? t('tutorial.finish') : t('tutorial.next')} {isFinish ? t('tutorial.finish') : t('tutorial.next')}
</button> </button>
)}
</div> </div>
</div> </div>
</div> </div>
@@ -200,7 +281,7 @@ export const TutorialRestartPopup: React.FC<TutorialRestartPopupProps> = ({ onCo
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<div className="tutorial-restart-backdrop"> <div className="tutorial-restart-backdrop">
<div className="tutorial-restart-popup" onClick={e => e.stopPropagation()}> <div className="tutorial-restart-popup" onClick={(e) => e.stopPropagation()}>
<p className="tutorial-restart-title">{t('tutorial.restart.title')}</p> <p className="tutorial-restart-title">{t('tutorial.restart.title')}</p>
<p className="tutorial-restart-desc">{t('tutorial.restart.desc')}</p> <p className="tutorial-restart-desc">{t('tutorial.restart.desc')}</p>
<div className="tutorial-restart-actions"> <div className="tutorial-restart-actions">
+241 -63
View File
@@ -3,7 +3,13 @@ export interface TutorialHint {
titleKey: string; titleKey: string;
descriptionKey: string; descriptionKey: string;
position: 'top' | 'bottom' | 'left' | 'right'; position: 'top' | 'bottom' | 'left' | 'right';
clickToAdvance?: boolean; // true면 요소 클릭 시 튜토리얼 진행, false면 툴팁 버튼으로만 진행 noteKey?: string;
variant?: 'bubble';
clickToAdvance?: boolean;
advanceSelector?: string;
noSpotlight?: boolean;
spotlightPadding?: number;
spotlightPaddingOverride?: { top?: number; right?: number; bottom?: number; left?: number };
} }
export interface TutorialStepDef { export interface TutorialStepDef {
@@ -16,98 +22,137 @@ export const TUTORIAL_KEYS = {
ANALYSIS: 'analysis', ANALYSIS: 'analysis',
ASSET: 'asset', ASSET: 'asset',
SOUND: 'sound', SOUND: 'sound',
SOUND_LYRICS: 'soundLyrics',
SOUND_AUDIO: 'soundAudio',
GENERATING:'generating',
COMPLETION: 'completion', COMPLETION: 'completion',
MY_INFO: 'myInfo', MY_INFO: 'myInfo',
ADO2_CONTENTS: 'ado2Contents', ADO2_CONTENTS: 'ado2Contents',
UPLOAD_MODAL: 'uploadModal', UPLOAD_MODAL: 'uploadModal',
UPLOAD_FORM: 'uploadForm',
DASHBOARD: 'dashboard', DASHBOARD: 'dashboard',
CONTENT_CALENDAR: 'contentCalendar',
FEEDBACK: 'feedback', FEEDBACK: 'feedback',
} as const; } as const;
// 같은 페이지에 속하는 튜토리얼 키 그룹 — 진행 카운터를 합산해서 표시
export const TUTORIAL_PAGE_GROUPS: string[][] = [
[TUTORIAL_KEYS.SOUND, TUTORIAL_KEYS.SOUND_LYRICS, TUTORIAL_KEYS.SOUND_AUDIO],
[TUTORIAL_KEYS.GENERATING, TUTORIAL_KEYS.COMPLETION],
[TUTORIAL_KEYS.UPLOAD_MODAL, TUTORIAL_KEYS.UPLOAD_FORM],
];
export const tutorialSteps: TutorialStepDef[] = [ export const tutorialSteps: TutorialStepDef[] = [
{ {
key: TUTORIAL_KEYS.LANDING, key: TUTORIAL_KEYS.LANDING,
hints: [ hints: [
// {
// targetSelector: '.tutorial-center-anchor',
// titleKey: 'tutorial.landing.intro.title',
// descriptionKey: 'tutorial.landing.intro.desc',
// position: 'bottom',
// clickToAdvance: false,
// noSpotlight: true,
// },
{ {
targetSelector: '.hero-dropdown-container', targetSelector: '.hero-dropdown-trigger',
titleKey: 'tutorial.landing.dropdown.title', titleKey: 'tutorial.landing.dropdown.title',
descriptionKey: 'tutorial.landing.dropdown.desc', descriptionKey: 'tutorial.landing.dropdown.desc',
position: 'bottom', position: 'left',
clickToAdvance: false,
noSpotlight: true,
variant: 'bubble',
}, },
{ {
targetSelector: '.hero-input-container', targetSelector: '.hero-input-wrapper',
titleKey: 'tutorial.landing.field.title', titleKey: 'tutorial.landing.field.title',
descriptionKey: 'tutorial.landing.field.desc', descriptionKey: 'tutorial.landing.field.desc',
position: 'bottom', position: 'right',
clickToAdvance: false,
noSpotlight: true,
variant: 'bubble',
}, },
{ {
targetSelector: '.hero-button', targetSelector: '.hero-button',
titleKey: 'tutorial.landing.button.title', titleKey: 'tutorial.landing.button.title',
descriptionKey: 'tutorial.landing.button.desc', descriptionKey: 'tutorial.landing.button.desc',
position: 'top', position: 'right',
},
],
},
{
key: TUTORIAL_KEYS.ANALYSIS,
hints: [
{
targetSelector: '.bi2-identity-card',
titleKey: 'tutorial.analysis.identity.title',
descriptionKey: 'tutorial.analysis.identity.desc',
position: 'bottom',
clickToAdvance: false, clickToAdvance: false,
}, noSpotlight: true,
{ variant: 'bubble',
targetSelector: '.bi2-selling-card',
titleKey: 'tutorial.analysis.selling.title',
descriptionKey: 'tutorial.analysis.selling.desc',
position: 'bottom',
clickToAdvance: false,
},
{
targetSelector: '.bi2-persona-grid',
titleKey: 'tutorial.analysis.persona.title',
descriptionKey: 'tutorial.analysis.persona.desc',
position: 'bottom',
clickToAdvance: false,
},
{
targetSelector: '.bi2-keyword-tags',
titleKey: 'tutorial.analysis.keywords.title',
descriptionKey: 'tutorial.analysis.keywords.desc',
position: 'bottom',
clickToAdvance: false,
},
{
targetSelector: '.bi2-generate-btn',
titleKey: 'tutorial.analysis.generate.title',
descriptionKey: 'tutorial.analysis.generate.desc',
position: 'top',
clickToAdvance: true,
}, },
], ],
}, },
// {
// key: TUTORIAL_KEYS.ANALYSIS,
// hints: [
// {
// targetSelector: '.bi2-identity-card',
// titleKey: 'tutorial.analysis.identity.title',
// descriptionKey: 'tutorial.analysis.identity.desc',
// position: 'top',
// clickToAdvance: false,
// },
// {
// targetSelector: '.bi2-selling-card',
// titleKey: 'tutorial.analysis.selling.title',
// descriptionKey: 'tutorial.analysis.selling.desc',
// position: 'top',
// clickToAdvance: false,
// },
// {
// targetSelector: '.bi2-persona-grid',
// titleKey: 'tutorial.analysis.persona.title',
// descriptionKey: 'tutorial.analysis.persona.desc',
// position: 'top',
// clickToAdvance: false,
// },
// {
// targetSelector: '.bi2-keyword-tags',
// titleKey: 'tutorial.analysis.keywords.title',
// descriptionKey: 'tutorial.analysis.keywords.desc',
// position: 'top',
// clickToAdvance: false,
// },
// {
// targetSelector: '.bi2-generate-btn',
// titleKey: 'tutorial.analysis.generate.title',
// descriptionKey: 'tutorial.analysis.generate.desc',
// position: 'right',
// clickToAdvance: true,
// },
// ],
// },
{ {
key: TUTORIAL_KEYS.ASSET, key: TUTORIAL_KEYS.ASSET,
hints: [ hints: [
{
targetSelector: '.asset-column.asset-column-left',
titleKey: 'tutorial.asset.image.title',
descriptionKey: 'tutorial.asset.image.desc',
position: 'left',
clickToAdvance: false,
},
{ {
targetSelector: '.asset-upload-zone', targetSelector: '.asset-upload-zone',
titleKey: 'tutorial.asset.upload.title', titleKey: 'tutorial.asset.upload.title',
descriptionKey: 'tutorial.asset.upload.desc', descriptionKey: 'tutorial.asset.upload.desc',
position: 'left', position: 'left',
clickToAdvance: false,
}, },
{ {
targetSelector: '.asset-ratio-section', targetSelector: '.asset-ratio-section',
titleKey: 'tutorial.asset.ratio.title', titleKey: 'tutorial.asset.ratio.title',
descriptionKey: 'tutorial.asset.ratio.desc', descriptionKey: 'tutorial.asset.ratio.desc',
position: 'left', position: 'left',
clickToAdvance: false,
}, },
{ {
targetSelector: '.asset-next-button', targetSelector: '.asset-next-button',
titleKey: 'tutorial.asset.next.title', titleKey: 'tutorial.asset.next.title',
descriptionKey: 'tutorial.asset.next.desc', descriptionKey: 'tutorial.asset.next.desc',
position: 'top', position: 'top',
clickToAdvance: true,
}, },
], ],
}, },
@@ -118,23 +163,54 @@ export const tutorialSteps: TutorialStepDef[] = [
targetSelector: '.genre-grid', targetSelector: '.genre-grid',
titleKey: 'tutorial.sound.genre.title', titleKey: 'tutorial.sound.genre.title',
descriptionKey: 'tutorial.sound.genre.desc', descriptionKey: 'tutorial.sound.genre.desc',
position: 'right', position: 'top',
clickToAdvance: false, clickToAdvance: false,
}, },
{ {
targetSelector: '.language-selector-wrapper', targetSelector: '.language-selector-wrapper',
titleKey: 'tutorial.sound.language.title', titleKey: 'tutorial.sound.language.title',
descriptionKey: 'tutorial.sound.language.desc', descriptionKey: 'tutorial.sound.language.desc',
position: 'right', position: 'top',
clickToAdvance: false, clickToAdvance: false,
}, },
{ {
targetSelector: '.btn-generate-sound', targetSelector: '.btn-generate-sound',
titleKey: 'tutorial.sound.generate.title', titleKey: 'tutorial.sound.generate.title',
descriptionKey: 'tutorial.sound.generate.desc', descriptionKey: 'tutorial.sound.generate.desc',
position: 'top', position: 'right',
clickToAdvance: true, clickToAdvance: true,
}, },
],
},
{
key: TUTORIAL_KEYS.SOUND_LYRICS,
hints: [
{
targetSelector: '.lyrics-display',
titleKey: 'tutorial.sound.lyrics.title',
descriptionKey: 'tutorial.sound.lyrics.desc',
position: 'left',
clickToAdvance: false,
},
{
targetSelector: '.status-message-new',
titleKey: 'tutorial.sound.lyricsWait.title',
descriptionKey: 'tutorial.sound.lyricsWait.desc',
position: 'right',
clickToAdvance: false,
},
],
},
{
key: TUTORIAL_KEYS.SOUND_AUDIO,
hints: [
{
targetSelector: '.audio-player',
titleKey: 'tutorial.sound.audioPlayer.title',
descriptionKey: 'tutorial.sound.audioPlayer.desc',
position: 'left',
clickToAdvance: false,
},
{ {
targetSelector: '.btn-video-generate', targetSelector: '.btn-video-generate',
titleKey: 'tutorial.sound.video.title', titleKey: 'tutorial.sound.video.title',
@@ -149,15 +225,32 @@ export const tutorialSteps: TutorialStepDef[] = [
hints: [ hints: [
{ {
targetSelector: '.youtube-connect-section', targetSelector: '.youtube-connect-section',
titleKey: 'tutorial.myInfo.connect.title', titleKey: 'tutorial.myInfo.myInfo.title',
descriptionKey: 'tutorial.myInfo.connect.desc', descriptionKey: 'tutorial.myInfo.myInfo.desc',
position: 'bottom', position: 'top',
clickToAdvance: false,
}, },
{ {
targetSelector: '.youtube-connect-button', targetSelector: '.myinfo-social-btn',
titleKey: 'tutorial.myInfo.button.title', titleKey: 'tutorial.myInfo.connect.title',
descriptionKey: 'tutorial.myInfo.button.desc', descriptionKey: 'tutorial.myInfo.connect.desc',
noteKey: 'tutorial.myInfo.connect.note',
position: 'top', position: 'top',
clickToAdvance: true,
},
{
targetSelector: '.myinfo-connected-accounts',
titleKey: 'tutorial.myInfo.connected.title',
descriptionKey: 'tutorial.myInfo.connected.desc',
position: 'top',
clickToAdvance: false,
},
{
targetSelector: '#sidebar-ado2-contents',
titleKey: 'tutorial.myInfo.ado2.title',
descriptionKey: 'tutorial.myInfo.ado2.desc',
position: 'right',
clickToAdvance: true,
}, },
], ],
}, },
@@ -165,22 +258,62 @@ export const tutorialSteps: TutorialStepDef[] = [
key: TUTORIAL_KEYS.ADO2_CONTENTS, key: TUTORIAL_KEYS.ADO2_CONTENTS,
hints: [ hints: [
{ {
targetSelector: '.ado2-contents-list', targetSelector: '.ado2-content-card',
titleKey: 'tutorial.ado2.list.title', titleKey: 'tutorial.ado2.list.title',
descriptionKey: 'tutorial.ado2.list.desc', descriptionKey: 'tutorial.ado2.list.desc',
position: 'bottom', position: 'right',
clickToAdvance: false,
}, },
{ {
targetSelector: '.ado2-upload-button', targetSelector: '.content-upload-btn',
titleKey: 'tutorial.ado2.download.title',
descriptionKey: 'tutorial.ado2.download.desc',
position: 'right',
clickToAdvance: false,
},
{
targetSelector: '.content-delete-btn',
titleKey: 'tutorial.ado2.delete.title',
descriptionKey: 'tutorial.ado2.delete.desc',
position: 'right',
clickToAdvance: false,
},
{
targetSelector: '.content-download-btn',
titleKey: 'tutorial.ado2.upload.title', titleKey: 'tutorial.ado2.upload.title',
descriptionKey: 'tutorial.ado2.upload.desc', descriptionKey: 'tutorial.ado2.upload.desc',
position: 'top', position: 'right',
clickToAdvance: true,
}, },
], ],
}, },
{
key: TUTORIAL_KEYS.GENERATING,
hints:[
{
targetSelector: '.comp2-info-section',
titleKey: 'tutorial.completion.contentInfo.title',
descriptionKey: 'tutorial.completion.contentInfo.desc',
position: 'left',
},
{
targetSelector: '.comp2-video-section',
titleKey: 'tutorial.completion.generating.title',
descriptionKey: 'tutorial.completion.generating.desc',
position: 'right',
}
]
},
{ {
key: TUTORIAL_KEYS.COMPLETION, key: TUTORIAL_KEYS.COMPLETION,
hints: [ hints: [
{
targetSelector: '.comp2-video-section',
titleKey: 'tutorial.completion.completion.title',
descriptionKey: 'tutorial.completion.completion.desc',
position: 'right',
clickToAdvance: false,
},
{ {
targetSelector: '#sidebar-my-info', targetSelector: '#sidebar-my-info',
titleKey: 'tutorial.completion.myInfo.title', titleKey: 'tutorial.completion.myInfo.title',
@@ -194,9 +327,21 @@ export const tutorialSteps: TutorialStepDef[] = [
key: TUTORIAL_KEYS.UPLOAD_MODAL, key: TUTORIAL_KEYS.UPLOAD_MODAL,
hints: [ hints: [
{ {
targetSelector: '.social-posting-field', targetSelector: '.social-posting-content',
titleKey: 'tutorial.upload.title.title', titleKey: 'tutorial.upload.seo.title',
descriptionKey: 'tutorial.upload.title.desc', descriptionKey: 'tutorial.upload.seo.desc',
position: 'right',
clickToAdvance: false,
},
],
},
{
key: TUTORIAL_KEYS.UPLOAD_FORM,
hints: [
{
targetSelector: '.social-posting-form',
titleKey: 'tutorial.upload.required.title',
descriptionKey: 'tutorial.upload.required.desc',
position: 'left', position: 'left',
clickToAdvance: false, clickToAdvance: false,
}, },
@@ -220,22 +365,55 @@ export const tutorialSteps: TutorialStepDef[] = [
key: TUTORIAL_KEYS.DASHBOARD, key: TUTORIAL_KEYS.DASHBOARD,
hints: [ hints: [
{ {
targetSelector: '.dashboard-metrics-row', targetSelector: '.stats-grid-8',
titleKey: 'tutorial.dashboard.metrics.title', titleKey: 'tutorial.dashboard.metrics.title',
descriptionKey: 'tutorial.dashboard.metrics.desc', descriptionKey: 'tutorial.dashboard.metrics.desc',
position: 'bottom', position: 'bottom',
}, },
{ {
targetSelector: '.dashboard-chart-section', targetSelector: '.yoy-chart-card',
titleKey: 'tutorial.dashboard.chart.title', titleKey: 'tutorial.dashboard.chart.title',
descriptionKey: 'tutorial.dashboard.chart.desc', descriptionKey: 'tutorial.dashboard.chart.desc',
position: 'right',
},
{
targetSelector: '.tutorial-center-anchor',
titleKey: 'tutorial.dashboard.more.title',
descriptionKey: 'tutorial.dashboard.more.desc',
position: 'bottom',
clickToAdvance: false,
},
],
},
{
key: TUTORIAL_KEYS.CONTENT_CALENDAR,
hints: [
{
targetSelector: '.calendar-grid-area',
titleKey: 'tutorial.contentCalendar.grid.title',
descriptionKey: 'tutorial.contentCalendar.grid.desc',
position: 'top', position: 'top',
clickToAdvance: true,
},
{
targetSelector: '.calendar-side-panel',
titleKey: 'tutorial.contentCalendar.panel.title',
descriptionKey: 'tutorial.contentCalendar.panel.desc',
position: 'left',
clickToAdvance: false,
}, },
], ],
}, },
{ {
key: TUTORIAL_KEYS.FEEDBACK, key: TUTORIAL_KEYS.FEEDBACK,
hints: [ hints: [
{
targetSelector: '.tutorial-center-anchor',
titleKey: 'tutorial.feedback.complete.title',
descriptionKey: 'tutorial.feedback.complete.desc',
position: 'bottom',
clickToAdvance: false,
},
{ {
targetSelector: '.sidebar-inquiry-btn', targetSelector: '.sidebar-inquiry-btn',
titleKey: 'tutorial.feedback.title', titleKey: 'tutorial.feedback.title',
+82 -12
View File
@@ -1,7 +1,27 @@
import { useState, useCallback } from 'react'; import React, { useState, useCallback } from 'react';
import { tutorialSteps, TutorialHint } from './tutorialSteps'; import { tutorialSteps, TutorialHint, TUTORIAL_PAGE_GROUPS } from './tutorialSteps';
const SEEN_KEY = 'castad_tutorial_seen'; // 현재 키가 속한 그룹의 전체 힌트 수와 현재까지의 offset 반환
function getGroupProgress(key: string, currentIndex: number): { groupTotal: number; groupOffset: number; isLastKeyInGroup: boolean } | null {
const group = TUTORIAL_PAGE_GROUPS.find(g => g.includes(key));
if (!group) return null;
let offset = 0;
let total = 0;
for (const k of group) {
const step = tutorialSteps.find(s => s.key === k);
const count = step?.hints.length ?? 0;
if (k === key) offset = total;
total += count;
}
const isLastKeyInGroup = group[group.length - 1] === key;
return { groupTotal: total, groupOffset: offset + currentIndex, isLastKeyInGroup };
}
const SEEN_KEY = 'ado2_tutorial_seen';
const PROGRESS_KEY = 'ado2_tutorial_progress';
// 전역 단일 활성 튜토리얼 관리 — 새 튜토리얼 시작 시 이전 것을 skip 처리
let globalSkip: (() => void) | null = null;
function getSeenKeys(): string[] { function getSeenKeys(): string[] {
try { try {
@@ -16,6 +36,32 @@ function markSeen(key: string) {
if (!seen.includes(key)) { if (!seen.includes(key)) {
localStorage.setItem(SEEN_KEY, JSON.stringify([...seen, key])); localStorage.setItem(SEEN_KEY, JSON.stringify([...seen, key]));
} }
clearProgress(key);
}
function saveProgress(key: string, index: number) {
try {
const progress = JSON.parse(localStorage.getItem(PROGRESS_KEY) || '{}');
progress[key] = index;
localStorage.setItem(PROGRESS_KEY, JSON.stringify(progress));
} catch {}
}
function loadProgress(key: string): number {
try {
const progress = JSON.parse(localStorage.getItem(PROGRESS_KEY) || '{}');
return progress[key] ?? 0;
} catch {
return 0;
}
}
function clearProgress(key: string) {
try {
const progress = JSON.parse(localStorage.getItem(PROGRESS_KEY) || '{}');
delete progress[key];
localStorage.setItem(PROGRESS_KEY, JSON.stringify(progress));
} catch {}
} }
interface UseTutorialReturn { interface UseTutorialReturn {
@@ -24,7 +70,8 @@ interface UseTutorialReturn {
currentHintIndex: number; currentHintIndex: number;
hints: TutorialHint[]; hints: TutorialHint[];
tutorialKey: string | null; tutorialKey: string | null;
startTutorial: (key: string) => void; groupProgress: { groupTotal: number; groupOffset: number; isLastKeyInGroup: boolean } | null;
startTutorial: (key: string, onComplete?: () => void, forceFromStart?: boolean) => void;
nextHint: () => void; nextHint: () => void;
prevHint: () => void; prevHint: () => void;
skipTutorial: () => void; skipTutorial: () => void;
@@ -41,22 +88,42 @@ export function useTutorial(): UseTutorialReturn {
const [currentHintIndex, setCurrentHintIndex] = useState(0); const [currentHintIndex, setCurrentHintIndex] = useState(0);
const [hints, setHints] = useState<TutorialHint[]>([]); const [hints, setHints] = useState<TutorialHint[]>([]);
const [tutorialKey, setTutorialKey] = useState<string | null>(null); const [tutorialKey, setTutorialKey] = useState<string | null>(null);
const onCompleteRef = React.useRef<(() => void) | undefined>(undefined);
const startTutorial = useCallback((key: string) => { const startTutorial = useCallback((key: string, onComplete?: () => void, forceFromStart?: boolean) => {
const step = tutorialSteps.find(s => s.key === key); const step = tutorialSteps.find(s => s.key === key);
if (!step || step.hints.length === 0) return; if (!step || step.hints.length === 0) return;
// 다른 인스턴스에서 활성화된 튜토리얼이 있으면 skip 처리
globalSkip?.();
const savedIndex = forceFromStart ? 0 : loadProgress(key);
const resumeIndex = savedIndex < step.hints.length ? savedIndex : 0;
onCompleteRef.current = onComplete;
setHints(step.hints); setHints(step.hints);
setTutorialKey(key); setTutorialKey(key);
setCurrentHintIndex(0); setCurrentHintIndex(resumeIndex);
setIsActive(true); setIsActive(true);
// 이 인스턴스의 skip을 전역에 등록
globalSkip = () => {
if (key) saveProgress(key, resumeIndex);
setIsActive(false);
setCurrentHintIndex(0);
globalSkip = null;
};
}, []); }, []);
const nextHint = useCallback(() => { const nextHint = useCallback(() => {
setCurrentHintIndex(prev => { setCurrentHintIndex(prev => {
if (prev < hints.length - 1) return prev + 1; if (prev < hints.length - 1) {
// 마지막 힌트 완료 → seen 기록 const next = prev + 1;
if (tutorialKey) saveProgress(tutorialKey, next);
return next;
}
// 마지막 힌트 완료 → seen 기록 + 진행 상태 삭제
setIsActive(false); setIsActive(false);
if (tutorialKey) markSeen(tutorialKey); if (tutorialKey) markSeen(tutorialKey);
globalSkip = null; // 완료된 튜토리얼은 globalSkip 해제
onCompleteRef.current?.();
onCompleteRef.current = undefined;
return 0; return 0;
}); });
}, [hints.length, tutorialKey]); }, [hints.length, tutorialKey]);
@@ -65,11 +132,12 @@ export function useTutorial(): UseTutorialReturn {
setCurrentHintIndex(prev => Math.max(0, prev - 1)); setCurrentHintIndex(prev => Math.max(0, prev - 1));
}, []); }, []);
// 건너뛰기: 오버레이만 닫고 seen 기록 안 함 → 다음 방문 시 다시 표시 // 건너뛰기: 현재 진행 인덱스 저장 후 오버레이 닫기 → 다음 방문 시 이어서 표시
const skipTutorial = useCallback(() => { const skipTutorial = useCallback(() => {
if (tutorialKey) saveProgress(tutorialKey, currentHintIndex);
setIsActive(false); setIsActive(false);
setCurrentHintIndex(0); setCurrentHintIndex(0);
}, []); }, [tutorialKey, currentHintIndex]);
// 튜토리얼 다시 보기: 팝업 표시만 // 튜토리얼 다시 보기: 팝업 표시만
const showRestartPopup = useCallback((key: string) => { const showRestartPopup = useCallback((key: string) => {
@@ -77,12 +145,13 @@ export function useTutorial(): UseTutorialReturn {
setIsRestartPopupVisible(true); setIsRestartPopupVisible(true);
}, []); }, []);
// 팝업에서 확인 → seen 초기화 후 튜토리얼 시작 // 팝업에서 확인 → seen/progress 초기화 후 튜토리얼 시작
const confirmRestart = useCallback(() => { const confirmRestart = useCallback(() => {
setIsRestartPopupVisible(false); setIsRestartPopupVisible(false);
if (pendingRestartKey) { if (pendingRestartKey) {
localStorage.removeItem(SEEN_KEY); localStorage.removeItem(SEEN_KEY);
startTutorial(pendingRestartKey); localStorage.removeItem(PROGRESS_KEY);
startTutorial(pendingRestartKey, undefined, true);
} }
setPendingRestartKey(null); setPendingRestartKey(null);
}, [pendingRestartKey, startTutorial]); }, [pendingRestartKey, startTutorial]);
@@ -103,6 +172,7 @@ export function useTutorial(): UseTutorialReturn {
currentHintIndex, currentHintIndex,
hints, hints,
tutorialKey, tutorialKey,
groupProgress: tutorialKey ? getGroupProgress(tutorialKey, currentHintIndex) : null,
startTutorial, startTutorial,
nextHint, nextHint,
prevHint, prevHint,
+52 -33
View File
@@ -21,53 +21,72 @@
"next": "Next", "next": "Next",
"prev": "Back", "prev": "Back",
"finish": "Done", "finish": "Done",
"clickToProceed": "Click the highlighted item to continue.",
"clickToFinish": "Click the highlighted item to finish the tutorial.",
"landing": { "landing": {
"dropdown": { "title": "Choose Search Type", "desc": "Search by URL or business name." }, "intro": { "title": "Welcome to ADO2 Tutorial", "desc": "We'll guide you through ADO2 step by step." },
"field": { "title": "Enter URL or Business Name", "desc": "Paste a Naver Maps share URL or type a business name." }, "dropdown": { "title": "Choose Search Type", "desc": "Select URL or business name from the dropdown." },
"button": { "title": "Start Brand Analysis", "desc": "Click to let AI analyze your brand." } "field": { "title": "Enter Search Term", "desc": "For URL, paste a Naver Maps share URL.\nFor business name, type the name and select from the list." },
"button": { "title": "Start Brand Analysis", "desc": "Click the button to let AI start analyzing your brand." }
}, },
"analysis": { "analysis": {
"identity": { "title": "Brand Identity", "desc": "Check the core values and market positioning analyzed by AI." }, "identity": { "title": "Brand Identity", "desc": "Check the core values and market positioning AI analyzed for your brand." },
"selling": { "title": "Key Selling Points", "desc": "See your brand's strengths ranked by score." }, "selling": { "title": "Key Selling Points", "desc": "See your brand's strengths." },
"persona": { "title": "Target Customer Types", "desc": "AI analyzed what kind of customers visit this brand." }, "persona": { "title": "Target Customer Types", "desc": "AI analyzed what kind of customers visit this brand." },
"keywords": { "title": "Recommended Keywords", "desc": "Keywords your customers are likely to search for." }, "keywords": { "title": "Recommended Keywords", "desc": "Keywords your customers are likely to search for." },
"generate": { "title": "Generate Content", "desc": "Create video content based on the analysis. Click to proceed to the next step." } "generate": { "title": "Generate Content", "desc": "Create video content based on the analysis.\nClick to sign in with Kakao and continue." }
}, },
"asset": { "asset": {
"upload": { "title": "Add Images", "desc": "Upload or remove brand images." }, "image": { "title": "Image List", "desc": "Photos from Naver Place. Tap 'Show more' to see the rest, or X to remove any." },
"ratio": { "title": "Select Video Ratio", "desc": "Choose the best ratio for YouTube." }, "upload": { "title": "Add Images", "desc": "You can freely add more images." },
"ratio": { "title": "Select Video Ratio", "desc": "Choose the ratio for the video to be generated." },
"next": { "title": "Next Step", "desc": "Proceed to the next step when ready." } "next": { "title": "Next Step", "desc": "Proceed to the next step when ready." }
}, },
"sound": { "sound": {
"genre": { "title": "Select Genre", "desc": "Pick a music genre that fits your brand." }, "genre": { "title": "Select Genre", "desc": "Pick a music genre that fits your brand." },
"language": { "title": "Select Language", "desc": "Choose the language for the sound." }, "language": { "title": "Select Language", "desc": "You can choose the language for the sound.\nWant to continue with Korean?" },
"generate": { "title": "Generate Sound", "desc": "AI will create music tailored to your brand." }, "generate": { "title": "Generate Sound", "desc": "Click the button and AI will generate lyrics and music in your chosen genre and language." },
"video": { "title": "Generate Video", "desc": "Create your video after generating the sound." } "lyrics": { "title": "Lyrics Complete", "desc": "AI wrote lyrics in your selected language.\nCheck the generated lyrics." },
"lyricsWait": { "title": "Generating Music", "desc": "AI is composing music based on the lyrics.\nPlease wait a moment." },
"audioPlayer": { "title": "Preview the Music", "desc": "Music generation is complete.\nPress play to listen to the generated music." },
"video": { "title": "Generate Video", "desc": "Click the button to start generating your video." }
}, },
"myInfo": { "myInfo": {
"connect": { "title": "Connect YouTube", "desc": "Link your YouTube account to upload videos." }, "myInfo": { "title": "My Info", "desc": "In My Info, you can manage your social connections and view connected accounts." },
"button": { "title": "Connect Now", "desc": "Click to sign in with your Google account." } "connect": { "title": "Connect Now", "desc": "Click the YouTube connect button to go to the connection page.", "note": "Instagram connection is coming soon." },
"connected": { "title": "Connected Accounts", "desc": "Your linked social accounts appear here.\nCheck after connecting." },
"ado2": { "title": "ADO2 Contents", "desc": "You can now upload the generated video.\nClick to navigate." }
}, },
"ado2": { "ado2": {
"list": { "title": "Generated Videos", "desc": "View all AI-created videos here." }, "list": { "title": "Generated Videos", "desc": "View all AI-created videos here." },
"upload": { "title": "Upload to YouTube", "desc": "Select a video and upload it to YouTube." } "download": { "title": "Download", "desc": "Download the video to your device." },
"delete": { "title": "Delete", "desc": "Remove videos you no longer need." },
"upload": { "title": "Upload to Social Media", "desc": "Select a video and upload it to social media." }
}, },
"completion": { "completion": {
"upload": { "title": "Upload to YouTube", "desc": "Click the button to upload your video to YouTube." }, "contentInfo": { "title": "Content Info", "desc": "Check the title, genre, resolution, and lyrics of the generated content." },
"generating": { "title": "Generating Video", "desc": "AI is creating your video.\nPlease wait a moment." },
"completion": { "title": "Video Complete!", "desc": "Your video is ready. Want to take a look?" },
"myInfo": { "title": "Connect Social Account", "desc": "To upload your video to YouTube, connect your social account in My Info. Click to go there." } "myInfo": { "title": "Connect Social Account", "desc": "To upload your video to YouTube, connect your social account in My Info. Click to go there." }
}, },
"upload": { "upload": {
"title": { "title": "Edit Title & Description", "desc": "Enter the title and description for YouTube." }, "seo": { "title": "Title & Description", "desc": "AI is generating the title and description for your video. Please wait a moment." },
"schedule": { "title": "Schedule Upload", "desc": "Upload now or schedule for a specific date." }, "required": { "title": "Required Fields", "desc": "Fields marked with * are required.\nPlease check them before uploading." },
"submit": { "title": "Start Upload", "desc": "Click the button to start uploading to YouTube." } "schedule": { "title": "Schedule Upload", "desc": "Post now or schedule for a specific time." },
"submit": { "title": "Start Upload", "desc": "Click the Post button to start uploading." }
}, },
"dashboard": { "dashboard": {
"metrics": { "title": "Key Metrics", "desc": "Check views, subscribers, and other stats." }, "metrics": { "title": "Key Metrics", "desc": "Check views, subscribers, and other stats for content uploaded via ADO2." },
"chart": { "title": "Growth Chart", "desc": "Track your channel's growth over time." } "chart": { "title": "Growth Chart", "desc": "Track your channel's growth over time." },
"more": { "title": "More Analytics", "desc": "Even more statistics are available at a glance on the dashboard." }
},
"contentCalendar": {
"grid": { "title": "Content Calendar", "desc": "View your content schedule by date.\nWhy not select today?" },
"panel": { "title": "Content List", "desc": "Check the detailed content schedule here." }
},
"feedback": {
"complete": { "title": "Tutorial Complete 🎉", "desc": "You've completed the full flow from brand analysis to YouTube upload.\nTo replay the tutorial, click the button in the top right." },
"title": "Customer Feedback",
"desc": "Share any issues or suggestions to help us improve."
}, },
"feedback": { "title": "Customer Feedback", "desc": "Share your thoughts to help us improve." },
"restart": { "restart": {
"title": "Restart Tutorial?", "title": "Restart Tutorial?",
"desc": "The tutorial will restart from the current screen.", "desc": "The tutorial will restart from the current screen.",
@@ -115,9 +134,9 @@
"invalidVideoInfo": "Video information is invalid. (missing video_id)", "invalidVideoInfo": "Video information is invalid. (missing video_id)",
"uploadStartFailed": "Failed to start upload.", "uploadStartFailed": "Failed to start upload.",
"uploadFailed": "Upload failed.", "uploadFailed": "Upload failed.",
"autoSeoTitle": "This will be automatically generated. please wait.", "autoSeoTitle": "Auto-generating... (30–60 sec)",
"autoSeoDescription": "This will be automatically generated. please wait.", "autoSeoDescription": "Auto-generating... (30–60 sec)",
"autoSeoTags": "This will be automatically generated. please wait." "autoSeoTags": "Auto-generating... (30–60 sec)"
}, },
"upload": { "upload": {
"title": "YouTube Upload", "title": "YouTube Upload",
@@ -139,7 +158,7 @@
"hero": { "hero": {
"searchTypeBusinessName": "Business Name", "searchTypeBusinessName": "Business Name",
"placeholderBusinessName": "Enter a business name", "placeholderBusinessName": "Enter a business name",
"guideUrl": "Select a place on Naver Maps, click Share,\nand paste the URL that appears.", "guideUrl": "Search for a place on Naver Maps, tap Share,\nthen paste the URL here.",
"guideBusinessName": "Search by business name to retrieve information.", "guideBusinessName": "Search by business name to retrieve information.",
"errorUrlRequired": "Please enter a URL.", "errorUrlRequired": "Please enter a URL.",
"errorNameRequired": "Please enter a business name.", "errorNameRequired": "Please enter a business name.",
@@ -157,7 +176,7 @@
"feature1Title": "Business Core Information Analysis", "feature1Title": "Business Core Information Analysis",
"feature1Desc": "Enter the URL of your homepage,\nNaver Map, blog, etc.", "feature1Desc": "Enter the URL of your homepage,\nNaver Map, blog, etc.",
"feature2Title": "Automated Promotional Content Creation", "feature2Title": "Automated Promotional Content Creation",
"feature2Desc": "Based on analyzed information,\nautomatically create music, subtitles, songs,\nand videos tailored to your business", "feature2Desc": "Based on analyzed information,\nautomatically create music, subtitles,\nand videos tailored to your business",
"feature3Title": "Multi-Channel Auto Distribution", "feature3Title": "Multi-Channel Auto Distribution",
"feature3Desc": "Completed videos can be downloaded\nor uploaded directly to social media" "feature3Desc": "Completed videos can be downloaded\nor uploaded directly to social media"
}, },
@@ -175,7 +194,7 @@
"urlInput": { "urlInput": {
"searchTypeBusinessName": "Business Name", "searchTypeBusinessName": "Business Name",
"placeholderBusinessName": "Enter a business name", "placeholderBusinessName": "Enter a business name",
"guideUrl": "Select a place on Naver Maps, click Share,\nand paste the URL that appears.", "guideUrl": "Search for a place on Naver Maps, tap Share, then paste the URL here.",
"guideBusinessName": "Search by business name to retrieve information.", "guideBusinessName": "Search by business name to retrieve information.",
"searchButton": "Search", "searchButton": "Search",
"searching": "Searching...", "searching": "Searching...",
@@ -196,7 +215,7 @@
"back": "Go Back", "back": "Go Back",
"loadMore": "Load more", "loadMore": "Load more",
"uploadFailed": "Image upload failed.", "uploadFailed": "Image upload failed.",
"uploading": "Uploading...", "uploading": "Uploading... (30 sec – 2 min)",
"nextStep": "Next Step" "nextStep": "Next Step"
}, },
"soundStudio": { "soundStudio": {
@@ -220,8 +239,8 @@
"videoGenerating": "Generating Video", "videoGenerating": "Generating Video",
"noBusinessInfo": "No business information. Please try again.", "noBusinessInfo": "No business information. Please try again.",
"noImageUploadInfo": "No image upload information. Please go back to the previous step and try again.", "noImageUploadInfo": "No image upload information. Please go back to the previous step and try again.",
"generatingLyrics": "Generating lyrics...", "generatingLyrics": "Generating lyrics...\n(30–60 sec)",
"generatingSong": "Generating song...", "generatingSong": "Generating music...\n(1–2 min)",
"songQueued": "Song generation queued...", "songQueued": "Song generation queued...",
"retryMessage": "Regenerating due to timeout... ({{count}}/{{max}})", "retryMessage": "Regenerating due to timeout... ({{count}}/{{max}})",
"lyricGenerationFailed": "Lyrics generation request failed.", "lyricGenerationFailed": "Lyrics generation request failed.",
@@ -251,7 +270,7 @@
"statusPlanned": "Scheduled", "statusPlanned": "Scheduled",
"statusWaiting": "Waiting", "statusWaiting": "Waiting",
"statusTranscribing": "Transcribing", "statusTranscribing": "Transcribing",
"statusRendering": "Rendering", "statusRendering": "Rendering (2–3 min)",
"statusSucceeded": "Completed", "statusSucceeded": "Completed",
"statusDefault": "Processing...", "statusDefault": "Processing...",
"aiOptimization": "AI Optimization", "aiOptimization": "AI Optimization",
+58 -39
View File
@@ -21,53 +21,72 @@
"next": "다음", "next": "다음",
"prev": "이전", "prev": "이전",
"finish": "완료", "finish": "완료",
"clickToProceed": "위 항목을 직접 선택하면 다음으로 넘어갑니다.",
"clickToFinish": "위 항목을 직접 선택하면 튜토리얼이 완료됩니다.",
"landing": { "landing": {
"dropdown": { "title": "검색 방식 선택", "desc": "URL 또는 업체명 중 원하는 방식을 선택하세요." }, "intro": { "title": "ADO2 튜토리얼 시작", "desc": "ADO2 사용 방법을 단계별로 안내해 드릴게요." },
"field": { "title": "URL 또는 업체명 입력", "desc": "네이버 지도에서 장소를 검색하고 공유 클릭하여 나온 URL을 붙여넣거나 업체명을 입력하고 선택하세요." }, "dropdown": { "title": "검색 방식 선택", "desc": "드롭다운에서 URL 또는 업체명 중 원하는 방식을 선택하세요." },
"field": { "title": "입력하기", "desc": "URL 방식이라면 네이버 지도 공유 URL,\n업체명 방식이라면 업체명을 입력하고 목록에서 선택하세요." },
"button": { "title": "브랜드 분석 시작", "desc": "버튼을 누르면 AI가 브랜드를 분석하기 시작해요." } "button": { "title": "브랜드 분석 시작", "desc": "버튼을 누르면 AI가 브랜드를 분석하기 시작해요." }
}, },
"analysis": { "analysis": {
"identity": { "title": "브랜드 정체성", "desc": "AI가 분석한 브랜드의 핵심 가치와 시장 포지셔닝을 확인하세요." }, "identity": { "title": "브랜드 정체성", "desc": "AI가 분석한 펜션의 핵심 가치와 시장 포지셔닝을 확인하세요." },
"selling": { "title": "주요 셀링 포인트", "desc": "브랜드의 강점을 확인할 수 있어요." }, "selling": { "title": "주요 셀링 포인트", "desc": "펜션의 강점을 확인할 수 있어요." },
"persona": { "title": "주요 고객 유형", "desc": "어떤 고객이 이 브랜드를 찾는지 분석했어요." }, "persona": { "title": "주요 고객 유형", "desc": "어떤 고객이 이 펜션을 찾는지 분석했어요." },
"keywords": { "title": "추천 타겟 키워드", "desc": "고객이 검색할 가능성이 높은 키워드들이에요." }, "keywords": { "title": "추천 타겟 키워드", "desc": "고객이 검색할 가능성이 높은 키워드들이에요." },
"generate": { "title": "콘텐츠 생성", "desc": "분석 결과를 바탕으로 영상 콘텐츠를 만들어 보세요. 버튼을 클릭하면 카카오 로그인으로 이동합니다." } "generate": { "title": "콘텐츠 생성", "desc": "분석 결과를 바탕으로 영상을 만들어 보세요.\n클릭하면 카카오 로그인으로 이동합니다." }
}, },
"asset": { "asset": {
"upload": { "title": "이미지 추가", "desc": "브랜드 이미지를 추가하거나 삭제할 수 있어요." }, "image": { "title": "이미지 목록", "desc": "네이버 Place에서 가져 온 사진이에요. \n더보기를 누르면 나머지 사진도 볼 수 있고 X를 눌러 삭제 할 수 있어요." },
"ratio": { "title": "영상 비율 선택", "desc": "유튜브에 최적화된 비율을 선택하세요." }, "upload": { "title": "이미지 추가", "desc": "이미지를 자유롭게 추가 할 수 있어요." },
"ratio": { "title": "영상 비율 선택", "desc": "생성 할 영상의 비율을 선택하세요." },
"next": { "title": "다음 단계로", "desc": "설정이 완료되면 다음 단계로 진행하세요." } "next": { "title": "다음 단계로", "desc": "설정이 완료되면 다음 단계로 진행하세요." }
}, },
"sound": { "sound": {
"genre": { "title": "장르 선택", "desc": "영상에 어울리는 음악 장르를 선택하세요." }, "genre": { "title": "장르 선택", "desc": "영상에 어울리는 음악 장르를 선택하세요." },
"language": { "title": "언어 선택", "desc": "사운드의 언어를 선택하세요." }, "language": { "title": "언어 선택", "desc": "사운드의 언어를 선택할 수 있어요. \n이미 선택된 한국어로 진행해볼까요?" },
"generate": { "title": "사운드 생성", "desc": "AI가 브랜드에 맞는 음악을 생성해요." }, "generate": { "title": "사운드 생성", "desc": "버튼을 클릭하면 AI가 선택한 장르와 언어로 가사와 음악을 생성해요."},
"video": { "title": "영상 생성", "desc": "사운드 생성 후 영상을 만들 수 있어요." } "lyrics": { "title": "가사 생성 완료", "desc": "AI가 선택한 언어로 가사를 만들었어요.\n생성된 가사를 확인하세요." },
"lyricsWait": { "title": "음악 생성 중", "desc": "가사를 바탕으로 AI가 음악을 만들고 있어요.\n잠시만 기다려 주세요." },
"audioPlayer": { "title": "음악 미리 듣기", "desc": "음악 생성이 완료되었어요.\n재생 버튼을 눌러 생성된 음악을 들어보세요." },
"video": { "title": "영상 생성", "desc": "버튼을 클릭해서 영상 생성을 시작하세요." }
}, },
"myInfo": { "myInfo": {
"connect": { "title": "소셜 연동", "desc": "영상을 업로드하려면 소셜 계정을 연동해야 해요." }, "myInfo": { "title": "내 정보", "desc": "내 정보에서는 소셜 연결과 연결된 계정을 확인 할 수 있어요." },
"button": { "title": "연동하기", "desc": "원하는 소셜미디어 버튼을 클릭해서 연동하세요." } "connect": { "title": "연결하기", "desc": "YouTube 연결 버튼을 누르면 연결 페이지로 이동합니다.", "note": "Instargram 연결은 오픈 예정입니다." },
"connected": { "title": "연결 계정", "desc": "연결된 소셜 계정 목록이에요. \n연결 후 여기서 확인할 수 있어요." },
"ado2": { "title": "ADO2 콘텐츠", "desc": "이제 생성된 영상을 업로드할 수 있어요. \n클릭해서 이동하세요." }
}, },
"ado2": { "ado2": {
"list": { "title": "생성된 영상 목록", "desc": "ADO2에서 만든 영상들을 여기서 확인할 수 있어요." }, "list": { "title": "생성된 영상 목록", "desc": "ADO2에서 만든 영상들을 확인할 수 있어요." },
"upload": { "title": "소셜 업로드", "desc": "원하는 영상을 선택해서 소셜미디어에 업로드하세요." } "download": { "title": "다운로드", "desc": "영상을 다운로드 할 수 있어요." },
"delete": { "title": "삭제", "desc": "필요없는 영상을 삭제할 수 있어요." },
"upload": { "title": "소셜 업로드", "desc": "선택해서 소셜미디어에 업로드하세요." }
}, },
"completion": { "completion": {
"upload": { "title": "업로드", "desc": "버튼을 눌러 완성된 영상을 업로드하세요." }, "contentInfo": { "title": "콘텐츠 정보", "desc": "콘텐츠의 제목,장르,규격,가사를 확인하세요." },
"myInfo": { "title": "소셜 계정 연동", "desc": "영상을 유튜브에 업로드하려면 내 정보에서 소셜 계정을 연동해야 해요. 클릭해서 이동하세요." } "generating": { "title": "영상 제작 중", "desc": "AI가 영상을 만들고 있어요. \n잠시만 기다려 주세요." },
"completion": { "title": "영상 완성!", "desc": "영상 제작이 완료되었어요. \n영상을 확인해 볼까요?" },
"myInfo": { "title": "소셜 계정 연동", "desc": "영상을 유튜브에 업로드하려면 내 정보에서 소셜 계정을 연동해야 해요. \n클릭해서 이동하세요." }
}, },
"upload": { "upload": {
"title": { "title": "제목 및 설명 입력", "desc": "유튜브에 표시될 제목과 설명을 입력하세요." }, "seo": { "title": "제목 및 설명", "desc": "영상의 제목과 설명을 AI가 만들고 있어요. 잠시만 기다려 주세요." },
"schedule": { "title": "업로드 예약", "desc": "즉시 업로드하거나 원하는 날짜에 예약할 수 있어요." }, "required": { "title": "필수 항목", "desc": "영상을 업로드 하기 전 *는 필수 항목으로 \n반드시 확인해 주세요." },
"submit": { "title": "업로드 시작", "desc": "버튼을 눌러 유튜브 업로드를 시작하세요." } "schedule": { "title": "업로드 예약", "desc": "지금 게시하거나 원하는 시간에 예약할 수 있어요." },
"submit": { "title": "업로드 시작", "desc": "게시 버튼을 눌러 업로드를 시작하세요." }
}, },
"dashboard": { "dashboard": {
"metrics": { "title": "핵심 지표", "desc": "조회수, 구독자 등 채널의 주요 통계를 확인하세요." }, "metrics": { "title": "핵심 지표", "desc": "조회수, 구독자 등 ADO2로 업로드한 콘텐츠의 주요 통계를 확인하세요." },
"chart": { "title": "성장 추이 차트", "desc": "기간별 성장 추이를 그래프로 확인할 수 있어요." } "chart": { "title": "성장 추이 차트", "desc": "기간별 성장 추이를 그래프로 확인할 수 있어요." },
"more": { "title": "더 많은 통계", "desc": "그 외에도 다양한 통계를 대시보드에서 한눈에 확인할 수 있어요." }
},
"contentCalendar": {
"grid": { "title": "콘텐츠 캘린더", "desc": "날짜별로 콘텐츠 스케줄을 확인할 수 있어요. \n오늘 날짜를 선택해 볼까요?" },
"panel": { "title": "콘텐츠 목록", "desc": "자세한 콘텐츠 스케줄을 확인 할수 있어요." }
},
"feedback": {
"complete": { "title": "튜토리얼 완료 🎉", "desc": "유튜브 업로드까지 모든 과정을 완료했어요. \n튜토리얼을 다시보고 싶다면 우측 상단의 버튼을 눌러주세요." },
"title": "고객의견",
"desc": "서비스 이용 중 불편한 점이나 개선 의견을 보내주세요."
}, },
"feedback": { "title": "고객의견", "desc": "서비스 이용 중 불편한 점이나 개선 의견을 보내주세요." },
"restart": { "restart": {
"title": "튜토리얼을 다시 시작할까요?", "title": "튜토리얼을 다시 시작할까요?",
"desc": "현재 화면부터 튜토리얼이 다시 시작됩니다.", "desc": "현재 화면부터 튜토리얼이 다시 시작됩니다.",
@@ -115,9 +134,9 @@
"invalidVideoInfo": "영상 정보가 올바르지 않습니다. (video_id 누락)", "invalidVideoInfo": "영상 정보가 올바르지 않습니다. (video_id 누락)",
"uploadStartFailed": "업로드 시작에 실패했습니다.", "uploadStartFailed": "업로드 시작에 실패했습니다.",
"uploadFailed": "업로드에 실패했습니다.", "uploadFailed": "업로드에 실패했습니다.",
"autoSeoTitle": "자동으로 작성중입니다. 기다려주세요.", "autoSeoTitle": "자동으로 작성중입니다. (30~60초 소요)",
"autoSeoDescription": "자동으로 작성중입니다. 기다려주세요.", "autoSeoDescription": "자동으로 작성중입니다. (30~60초 소요)",
"autoSeoTags": "자동으로 작성중입니다. 기다려주세요." "autoSeoTags": "자동으로 작성중입니다. (30~60초 소요)"
}, },
"upload": { "upload": {
"title": "YouTube 업로드", "title": "YouTube 업로드",
@@ -138,8 +157,8 @@
"landing": { "landing": {
"hero": { "hero": {
"searchTypeBusinessName": "업체명", "searchTypeBusinessName": "업체명",
"placeholderBusinessName": "업체명을 입력하세요", "placeholderBusinessName": "업체명을 입력하세요.",
"guideUrl": "네이버 지도에서 우리 펜션을 검색한 뒤 공유를 클릭하고,\nURL을 복사해서 여기에 붙여넣어 주세요.", "guideUrl": "네이버지도에서 장소를 검색하고 공유 선택, \n나오는 URL을 붙여 넣어 주세요.",
"guideBusinessName": "업체명으로 검색하여 정보를 가져옵니다.", "guideBusinessName": "업체명으로 검색하여 정보를 가져옵니다.",
"errorUrlRequired": "URL을 입력해주세요.", "errorUrlRequired": "URL을 입력해주세요.",
"errorNameRequired": "업체명을 입력해주세요.", "errorNameRequired": "업체명을 입력해주세요.",
@@ -155,9 +174,9 @@
"title": "ADO2.AI에 오신 것을 환영합니다.", "title": "ADO2.AI에 오신 것을 환영합니다.",
"subtitle": "분석, 제작, 배포까지 콘텐츠 마케팅의 전과정을 자동화", "subtitle": "분석, 제작, 배포까지 콘텐츠 마케팅의 전과정을 자동화",
"feature1Title": "비즈니스 핵심 정보 분석", "feature1Title": "비즈니스 핵심 정보 분석",
"feature1Desc": "홈페이지, 네이버 지도, 블로그 등의\nURL을 입력하세요", "feature1Desc": "홈페이지, 네이버 지도, 블로그 등의\nURL을 입력하세요.",
"feature2Title": "홍보 콘텐츠 자동 제작", "feature2Title": "홍보 콘텐츠 자동 제작",
"feature2Desc": "분석된 정보를 바탕으로\n비즈니스에 맞는 음악, 자막, 노래, 영상을\n자동으로 제작해요", "feature2Desc": "분석된 정보를 바탕으로\n비즈니스에 맞는 음악, 자막, 영상을\n자동으로 제작해요",
"feature3Title": "멀티채널 자동 배포", "feature3Title": "멀티채널 자동 배포",
"feature3Desc": "완성된 영상은 다운로드하거나\n바로 SNS에 업로드 할 수 있어요" "feature3Desc": "완성된 영상은 다운로드하거나\n바로 SNS에 업로드 할 수 있어요"
}, },
@@ -174,8 +193,8 @@
}, },
"urlInput": { "urlInput": {
"searchTypeBusinessName": "업체명", "searchTypeBusinessName": "업체명",
"placeholderBusinessName": "업체명을 입력하세요", "placeholderBusinessName": "업체명을 입력하세요.",
"guideUrl": "네이버 지도에서 우리 펜션을 검색한 뒤 공유를 클릭하고,\nURL을 복사해서 여기에 붙여넣어 주세요.", "guideUrl": "네이버지도에서 장소를 검색하고 공유 선택, \n나오는 URL을 붙여 넣어 주세요.",
"guideBusinessName": "업체명으로 검색하여 정보를 가져옵니다.", "guideBusinessName": "업체명으로 검색하여 정보를 가져옵니다.",
"searchButton": "검색하기", "searchButton": "검색하기",
"searching": "검색 중...", "searching": "검색 중...",
@@ -196,7 +215,7 @@
"back": "뒤로가기", "back": "뒤로가기",
"loadMore": "더보기", "loadMore": "더보기",
"uploadFailed": "이미지 업로드에 실패했습니다.", "uploadFailed": "이미지 업로드에 실패했습니다.",
"uploading": "업로드 중...", "uploading": "업로드 중 (30초~2분 소요)",
"nextStep": "다음 단계" "nextStep": "다음 단계"
}, },
"soundStudio": { "soundStudio": {
@@ -220,9 +239,9 @@
"videoGenerating": "영상 생성 중", "videoGenerating": "영상 생성 중",
"noBusinessInfo": "비즈니스 정보가 없습니다. 다시 시도해주세요.", "noBusinessInfo": "비즈니스 정보가 없습니다. 다시 시도해주세요.",
"noImageUploadInfo": "이미지 업로드 정보가 없습니다. 이전 단계로 돌아가 다시 시도해주세요.", "noImageUploadInfo": "이미지 업로드 정보가 없습니다. 이전 단계로 돌아가 다시 시도해주세요.",
"generatingLyrics": "가사를 생성하고 있습니다...", "generatingLyrics": "가사를 생성하고 있습니다. (30~60초 소요)",
"generatingSong": "노래를 생성하고 있습니다...", "generatingSong": "음악을 생성하고 있습니다. (1~2분 소요)",
"songQueued": "노래 생성 대기 중...", "songQueued": "음악 생성 대기 중...",
"retryMessage": "시간 초과로 재생성 중... ({{count}}/{{max}})", "retryMessage": "시간 초과로 재생성 중... ({{count}}/{{max}})",
"lyricGenerationFailed": "가사 생성 요청에 실패했습니다.", "lyricGenerationFailed": "가사 생성 요청에 실패했습니다.",
"lyricNotReceived": "가사를 받지 못했습니다.", "lyricNotReceived": "가사를 받지 못했습니다.",
@@ -251,7 +270,7 @@
"statusPlanned": "예약됨", "statusPlanned": "예약됨",
"statusWaiting": "대기 중", "statusWaiting": "대기 중",
"statusTranscribing": "트랜스크립션 중", "statusTranscribing": "트랜스크립션 중",
"statusRendering": "렌더링 중", "statusRendering": "생성 중 (2~3분 소요)",
"statusSucceeded": "완료", "statusSucceeded": "완료",
"statusDefault": "처리 중...", "statusDefault": "처리 중...",
"aiOptimization": "AI 최적화", "aiOptimization": "AI 최적화",
@@ -198,6 +198,7 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
onNext={tutorial.nextHint} onNext={tutorial.nextHint}
onPrev={tutorial.prevHint} onPrev={tutorial.prevHint}
onSkip={tutorial.skipTutorial} onSkip={tutorial.skipTutorial}
groupProgress={tutorial.groupProgress}
/> />
)} )}
</> </>
+9 -3
View File
@@ -44,12 +44,17 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
const tutorial = useTutorial(); const tutorial = useTutorial();
// 영상 완료 시 튜토리얼 트리거 // 영상 생성 중 튜토리얼 트리거 (생성 상태 안내 -> 콘텐츠 정보 -> 내 정보 이동)
useEffect(() => { useEffect(() => {
if (videoStatus === 'complete' && !tutorial.hasSeen(TUTORIAL_KEYS.COMPLETION)) { const isComplete = videoStatus === 'complete';
const isProcessing = videoStatus === 'generating' || videoStatus === 'polling';
if (isProcessing && !tutorial.isActive && !tutorial.hasSeen(TUTORIAL_KEYS.GENERATING)) {
tutorial.startTutorial(TUTORIAL_KEYS.GENERATING);
} else if (isComplete && !tutorial.isActive && !tutorial.hasSeen(TUTORIAL_KEYS.COMPLETION)) {
tutorial.startTutorial(TUTORIAL_KEYS.COMPLETION); tutorial.startTutorial(TUTORIAL_KEYS.COMPLETION);
} }
}, [videoStatus]); }, [videoStatus, tutorial]);
// 소셜 미디어 포스팅 모달 // 소셜 미디어 포스팅 모달
const [showSocialModal, setShowSocialModal] = useState(false); const [showSocialModal, setShowSocialModal] = useState(false);
@@ -458,6 +463,7 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
onNext={tutorial.nextHint} onNext={tutorial.nextHint}
onPrev={tutorial.prevHint} onPrev={tutorial.prevHint}
onSkip={tutorial.skipTutorial} onSkip={tutorial.skipTutorial}
groupProgress={tutorial.groupProgress}
/> />
)} )}
</main> </main>
@@ -758,7 +758,7 @@ const ContentCalendarContent: React.FC<ContentCalendarContentProps> = ({ onNavig
flex: 1, minHeight: 0, flex: 1, minHeight: 0,
}}> }}>
{/* 캘린더 영역 */} {/* 캘린더 영역 */}
<div style={{ <div className="calendar-grid-area" style={{
gridColumn: '1 / span 8', gridColumn: '1 / span 8',
backgroundColor: '#01393b', backgroundColor: '#01393b',
borderRadius: 20, padding: 16, borderRadius: 20, padding: 16,
@@ -780,7 +780,7 @@ const ContentCalendarContent: React.FC<ContentCalendarContentProps> = ({ onNavig
</div> </div>
{/* 오른쪽 패널 */} {/* 오른쪽 패널 */}
<div style={{ <div className="calendar-side-panel" style={{
gridColumn: '9 / span 1', gridColumn: '9 / span 1',
backgroundColor: '#01393b', borderRadius: 20, backgroundColor: '#01393b', borderRadius: 20,
display: 'flex', flexDirection: 'column', overflow: 'hidden', display: 'flex', flexDirection: 'column', overflow: 'hidden',
+23 -6
View File
@@ -320,8 +320,11 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
localStorage.setItem(ACTIVE_ITEM_KEY, activeItem); localStorage.setItem(ACTIVE_ITEM_KEY, activeItem);
}, [activeItem]); }, [activeItem]);
// wizardStep 변경 시 튜토리얼 트리거 // wizardStep 변경 시 튜토리얼 트리거 (사이드바 메뉴 화면에서는 제외)
const SIDEBAR_ITEMS = ['대시보드', 'ADO2 콘텐츠', '내 정보', '콘텐츠 캘린더'];
useEffect(() => { useEffect(() => {
if (tutorial.isActive) tutorial.skipTutorial();
if (SIDEBAR_ITEMS.includes(activeItem)) return;
const timer = setTimeout(() => { const timer = setTimeout(() => {
if (wizardStep === 1 && !tutorial.hasSeen(TUTORIAL_KEYS.ASSET)) { if (wizardStep === 1 && !tutorial.hasSeen(TUTORIAL_KEYS.ASSET)) {
tutorial.startTutorial(TUTORIAL_KEYS.ASSET); tutorial.startTutorial(TUTORIAL_KEYS.ASSET);
@@ -330,16 +333,19 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
} }
}, 600); }, 600);
return () => clearTimeout(timer); return () => clearTimeout(timer);
}, [wizardStep]); }, [wizardStep, activeItem]);
// activeItem 변경 시 튜토리얼 트리거 // activeItem 변경 시 튜토리얼 트리거
useEffect(() => { useEffect(() => {
if (tutorial.isActive) tutorial.skipTutorial();
if (activeItem === '내 정보' && !tutorial.hasSeen(TUTORIAL_KEYS.MY_INFO)) { if (activeItem === '내 정보' && !tutorial.hasSeen(TUTORIAL_KEYS.MY_INFO)) {
tutorial.startTutorial(TUTORIAL_KEYS.MY_INFO); tutorial.startTutorial(TUTORIAL_KEYS.MY_INFO);
} else if (activeItem === 'ADO2 콘텐츠' && !tutorial.hasSeen(TUTORIAL_KEYS.ADO2_CONTENTS)) { } else if (activeItem === 'ADO2 콘텐츠' && !tutorial.hasSeen(TUTORIAL_KEYS.ADO2_CONTENTS)) {
tutorial.startTutorial(TUTORIAL_KEYS.ADO2_CONTENTS); tutorial.startTutorial(TUTORIAL_KEYS.ADO2_CONTENTS);
} else if (activeItem === '대시보드' && !tutorial.hasSeen(TUTORIAL_KEYS.DASHBOARD)) { } else if (activeItem === '대시보드' && !tutorial.hasSeen(TUTORIAL_KEYS.DASHBOARD)) {
tutorial.startTutorial(TUTORIAL_KEYS.DASHBOARD); tutorial.startTutorial(TUTORIAL_KEYS.DASHBOARD);
} else if (activeItem === '콘텐츠 캘린더' && !tutorial.hasSeen(TUTORIAL_KEYS.CONTENT_CALENDAR)) {
tutorial.startTutorial(TUTORIAL_KEYS.CONTENT_CALENDAR);
} }
}, [activeItem]); }, [activeItem]);
@@ -426,6 +432,13 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
mId={analysisData?.m_id ?? 0} mId={analysisData?.m_id ?? 0}
videoGenerationStatus={videoGenerationStatus} videoGenerationStatus={videoGenerationStatus}
videoGenerationProgress={videoGenerationProgress} videoGenerationProgress={videoGenerationProgress}
onStatusChange={(status: string) => {
if (status === 'generating_song' && !tutorial.hasSeen(TUTORIAL_KEYS.SOUND_LYRICS)) {
setTimeout(() => tutorial.startTutorial(TUTORIAL_KEYS.SOUND_LYRICS), 400);
} else if (status === 'complete' && !tutorial.hasSeen(TUTORIAL_KEYS.SOUND_AUDIO)) {
setTimeout(() => tutorial.startTutorial(TUTORIAL_KEYS.SOUND_AUDIO), 400);
}
}}
/> />
); );
case 3: case 3:
@@ -493,24 +506,26 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
// 스크롤이 필요한 페이지: 대시보드, 비즈니스 설정, 브랜드 분석(0), ADO2 콘텐츠, 내 정보 // 스크롤이 필요한 페이지: 대시보드, 비즈니스 설정, 브랜드 분석(0), ADO2 콘텐츠, 내 정보
const needsScroll = activeItem === '대시보드' || activeItem === '비즈니스 설정' || activeItem === 'ADO2 콘텐츠' || activeItem === '내 정보' || activeItem === '콘텐츠 캘린더' || isBrandAnalysis; const needsScroll = activeItem === '대시보드' || activeItem === '비즈니스 설정' || activeItem === 'ADO2 콘텐츠' || activeItem === '내 정보' || activeItem === '콘텐츠 캘린더' || isBrandAnalysis;
// 현재 화면에 맞는 튜토리얼 키 반환 // 현재 화면에 맞는 튜토리얼 키 반환 (없으면 null)
const getCurrentTutorialKey = (): string => { const getCurrentTutorialKey = (): string | null => {
if (activeItem === '내 정보') return TUTORIAL_KEYS.MY_INFO; if (activeItem === '내 정보') return TUTORIAL_KEYS.MY_INFO;
if (activeItem === 'ADO2 콘텐츠') return TUTORIAL_KEYS.ADO2_CONTENTS; if (activeItem === 'ADO2 콘텐츠') return TUTORIAL_KEYS.ADO2_CONTENTS;
if (activeItem === '대시보드') return TUTORIAL_KEYS.DASHBOARD; if (activeItem === '대시보드') return TUTORIAL_KEYS.DASHBOARD;
if (activeItem === '콘텐츠 캘린더') return TUTORIAL_KEYS.CONTENT_CALENDAR;
if (activeItem === '새 프로젝트 만들기') { if (activeItem === '새 프로젝트 만들기') {
if (wizardStep === 1) return TUTORIAL_KEYS.ASSET; if (wizardStep === 1) return TUTORIAL_KEYS.ASSET;
if (wizardStep === 2) return TUTORIAL_KEYS.SOUND; if (wizardStep === 2) return TUTORIAL_KEYS.SOUND;
} }
return TUTORIAL_KEYS.ASSET; return null;
}; };
const handleTutorialRestart = () => { const handleTutorialRestart = () => {
tutorial.showRestartPopup(getCurrentTutorialKey()); tutorial.showRestartPopup(getCurrentTutorialKey()!);
}; };
const tutorialUI = ( const tutorialUI = (
<> <>
{getCurrentTutorialKey() && (
<button <button
className="tutorial-restart-fab" className="tutorial-restart-fab"
onClick={handleTutorialRestart} onClick={handleTutorialRestart}
@@ -522,6 +537,7 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
</svg> </svg>
<span>{t('sidebar.tutorialRestart')}</span> <span>{t('sidebar.tutorialRestart')}</span>
</button> </button>
)}
{tutorial.isActive && ( {tutorial.isActive && (
<TutorialOverlay <TutorialOverlay
hints={tutorial.hints} hints={tutorial.hints}
@@ -529,6 +545,7 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
onNext={tutorial.nextHint} onNext={tutorial.nextHint}
onPrev={tutorial.prevHint} onPrev={tutorial.prevHint}
onSkip={tutorial.skipTutorial} onSkip={tutorial.skipTutorial}
groupProgress={tutorial.groupProgress}
/> />
)} )}
{tutorial.isRestartPopupVisible && ( {tutorial.isRestartPopupVisible && (
@@ -16,6 +16,7 @@ interface SoundStudioContentProps {
businessInfo?: BusinessInfo; businessInfo?: BusinessInfo;
imageTaskId: string | null; imageTaskId: string | null;
mId: number; mId: number;
onStatusChange?: (status: string) => void;
videoGenerationStatus?: 'idle' | 'generating' | 'complete' | 'error'; videoGenerationStatus?: 'idle' | 'generating' | 'complete' | 'error';
videoGenerationProgress?: number; videoGenerationProgress?: number;
} }
@@ -39,6 +40,7 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
businessInfo, businessInfo,
imageTaskId, imageTaskId,
mId, mId,
onStatusChange,
videoGenerationStatus = 'idle', videoGenerationStatus = 'idle',
videoGenerationProgress = 0 videoGenerationProgress = 0
}) => { }) => {
@@ -389,7 +391,13 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
const isGenerating = status === 'generating_lyric' || status === 'generating_song' || status === 'polling'; const isGenerating = status === 'generating_lyric' || status === 'generating_song' || status === 'polling';
// status 변경 시 부모에 알림
useEffect(() => {
onStatusChange?.(status);
}, [status]);
return ( return (
<>
<main className="sound-studio-page"> <main className="sound-studio-page">
{audioUrl && ( {audioUrl && (
<audio ref={audioRef} src={audioUrl} preload="metadata" /> <audio ref={audioRef} src={audioUrl} preload="metadata" />
@@ -643,6 +651,8 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
</button> </button>
</div> </div>
</main> </main>
</>
); );
}; };
+2 -2
View File
@@ -19,7 +19,7 @@ interface UrlInputContentProps {
const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomplete, onTestData, error }) => { const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomplete, onTestData, error }) => {
const { t, i18n } = useTranslation(); const { t, i18n } = useTranslation();
const [inputValue, setInputValue] = useState(''); const [inputValue, setInputValue] = useState('');
const [searchType, setSearchType] = useState<SearchType>('url'); const [searchType, setSearchType] = useState<SearchType>('name');
const [isDropdownOpen, setIsDropdownOpen] = useState(false); const [isDropdownOpen, setIsDropdownOpen] = useState(false);
const [autocompleteResults, setAutocompleteResults] = useState<AccommodationSearchItem[]>([]); const [autocompleteResults, setAutocompleteResults] = useState<AccommodationSearchItem[]>([]);
const [isAutocompleteLoading, setIsAutocompleteLoading] = useState(false); const [isAutocompleteLoading, setIsAutocompleteLoading] = useState(false);
@@ -53,7 +53,7 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
const getPlaceholder = () => { const getPlaceholder = () => {
return searchType === 'url' return searchType === 'url'
? 'https://www.castad.com' ? 'https://naver.me/abcdef'
: t('urlInput.placeholderBusinessName'); : t('urlInput.placeholderBusinessName');
}; };
+6 -1
View File
@@ -63,7 +63,7 @@ const orbConfigs: OrbConfig[] = [
const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, onTestData, onNext, error: externalError, scrollProgress = 0 }) => { const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, onTestData, onNext, error: externalError, scrollProgress = 0 }) => {
const { t, i18n } = useTranslation(); const { t, i18n } = useTranslation();
const [inputValue, setInputValue] = useState(''); const [inputValue, setInputValue] = useState('');
const [searchType, setSearchType] = useState<SearchType>('url'); const [searchType, setSearchType] = useState<SearchType>('name');
const [isDropdownOpen, setIsDropdownOpen] = useState(false); const [isDropdownOpen, setIsDropdownOpen] = useState(false);
const [localError, setLocalError] = useState(''); const [localError, setLocalError] = useState('');
const [isLoadingTest, setIsLoadingTest] = useState(false); const [isLoadingTest, setIsLoadingTest] = useState(false);
@@ -155,6 +155,10 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
setShowAutocomplete(false); setShowAutocomplete(false);
setAutocompleteResults([]); setAutocompleteResults([]);
setHighlightedIndex(-1); setHighlightedIndex(-1);
// LANDING_NAME 튜토리얼 진행 중이면 다음 힌트로 이동
if (tutorial.isActive && tutorial.tutorialKey === TUTORIAL_KEYS.LANDING_NAME) {
tutorial.nextHint();
}
}; };
// 키보드 네비게이션 핸들러 // 키보드 네비게이션 핸들러
@@ -524,6 +528,7 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
onNext={tutorial.nextHint} onNext={tutorial.nextHint}
onPrev={tutorial.prevHint} onPrev={tutorial.prevHint}
onSkip={tutorial.skipTutorial} onSkip={tutorial.skipTutorial}
groupProgress={tutorial.groupProgress}
/> />
)} )}
</div> </div>