Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c3c0b4508 | ||
|
|
5b6fab8ef4 | ||
|
|
eceea6a5a4 | ||
|
|
a7c1d1ec76 | ||
|
|
5ec50e66de | ||
|
|
eb55383de5 | ||
|
|
3f3f8bb159 | ||
|
|
7aedf07203 | ||
|
|
65ea09ffd5 | ||
|
|
388351e6d4 | ||
|
|
fa4864e9ef | ||
|
|
1d868627e4 | ||
|
|
8be7b7adcf |
No files matched your search
Generated
+6
-17
@@ -12,7 +12,7 @@
|
|||||||
"react": "^19.2.3",
|
"react": "^19.2.3",
|
||||||
"react-dom": "^19.2.3",
|
"react-dom": "^19.2.3",
|
||||||
"react-i18next": "^16.5.4",
|
"react-i18next": "^16.5.4",
|
||||||
"recharts": "^3.7.0"
|
"recharts": "^3.8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.14.0",
|
"@types/node": "^22.14.0",
|
||||||
@@ -52,7 +52,6 @@
|
|||||||
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
|
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.27.1",
|
"@babel/code-frame": "^7.27.1",
|
||||||
"@babel/generator": "^7.28.5",
|
"@babel/generator": "^7.28.5",
|
||||||
@@ -1289,7 +1288,6 @@
|
|||||||
"integrity": "sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA==",
|
"integrity": "sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~6.21.0"
|
"undici-types": "~6.21.0"
|
||||||
}
|
}
|
||||||
@@ -1351,7 +1349,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"baseline-browser-mapping": "^2.9.0",
|
"baseline-browser-mapping": "^2.9.0",
|
||||||
"caniuse-lite": "^1.0.30001759",
|
"caniuse-lite": "^1.0.30001759",
|
||||||
@@ -1694,7 +1691,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.28.4"
|
"@babel/runtime": "^7.28.4"
|
||||||
},
|
},
|
||||||
@@ -1815,7 +1811,6 @@
|
|||||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
},
|
},
|
||||||
@@ -1857,7 +1852,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz",
|
||||||
"integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==",
|
"integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@@ -1867,7 +1861,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz",
|
||||||
"integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==",
|
"integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"scheduler": "^0.27.0"
|
"scheduler": "^0.27.0"
|
||||||
},
|
},
|
||||||
@@ -1914,7 +1907,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz",
|
||||||
"integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==",
|
"integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/use-sync-external-store": "^0.0.6",
|
"@types/use-sync-external-store": "^0.0.6",
|
||||||
"use-sync-external-store": "^1.4.0"
|
"use-sync-external-store": "^1.4.0"
|
||||||
@@ -1944,15 +1936,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/recharts": {
|
"node_modules/recharts": {
|
||||||
"version": "3.7.0",
|
"version": "3.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/recharts/-/recharts-3.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/recharts/-/recharts-3.8.0.tgz",
|
||||||
"integrity": "sha512-l2VCsy3XXeraxIID9fx23eCb6iCBsxUQDnE8tWm6DFdszVAO7WVY/ChAD9wVit01y6B2PMupYiMmQwhgPHc9Ew==",
|
"integrity": "sha512-Z/m38DX3L73ExO4Tpc9/iZWHmHnlzWG4njQbxsF5aSjwqmHNDDIm0rdEBArkwsBvR8U6EirlEHiQNYWCVh9sGQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"www"
|
"www"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@reduxjs/toolkit": "1.x.x || 2.x.x",
|
"@reduxjs/toolkit": "^1.9.0 || 2.x.x",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"decimal.js-light": "^2.5.1",
|
"decimal.js-light": "^2.5.1",
|
||||||
"es-toolkit": "^1.39.3",
|
"es-toolkit": "^1.39.3",
|
||||||
@@ -1977,8 +1969,7 @@
|
|||||||
"version": "5.0.1",
|
"version": "5.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
|
||||||
"integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==",
|
"integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==",
|
||||||
"license": "MIT",
|
"license": "MIT"
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"node_modules/redux-thunk": {
|
"node_modules/redux-thunk": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
@@ -2092,7 +2083,6 @@
|
|||||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"peer": true,
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
"tsserver": "bin/tsserver"
|
"tsserver": "bin/tsserver"
|
||||||
@@ -2176,7 +2166,6 @@
|
|||||||
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
|
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.25.0",
|
"esbuild": "^0.25.0",
|
||||||
"fdir": "^6.4.4",
|
"fdir": "^6.4.4",
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@
|
|||||||
"react": "^19.2.3",
|
"react": "^19.2.3",
|
||||||
"react-dom": "^19.2.3",
|
"react-dom": "^19.2.3",
|
||||||
"react-i18next": "^16.5.4",
|
"react-i18next": "^16.5.4",
|
||||||
"recharts": "^3.7.0"
|
"recharts": "^3.8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.14.0",
|
"@types/node": "^22.14.0",
|
||||||
|
|||||||
@@ -8,10 +8,11 @@ const Footer: React.FC = () => {
|
|||||||
<footer className="landing-footer">
|
<footer className="landing-footer">
|
||||||
<div className="footer-content">
|
<div className="footer-content">
|
||||||
<div className="footer-left">
|
<div className="footer-left">
|
||||||
<img src="/assets/images/logo.svg" alt="CASTAD" className="footer-logo" />
|
<img src="/assets/images/ado2-sidebar-logo.svg" alt="ADO2" className="footer-logo" />
|
||||||
<p className="footer-copyright">Copyright ⓒ O2O Inc. All rights reserved</p>
|
<p className="footer-copyright">Copyright ⓒ O2O Inc. All rights reserved</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="footer-right">
|
<div className="footer-right">
|
||||||
|
<p className="footer-info">{t('footer.company')}</p>
|
||||||
<p className="footer-info">{t('footer.businessNumber')}</p>
|
<p className="footer-info">{t('footer.businessNumber')}</p>
|
||||||
<p className="footer-info">{t('footer.headquarters')}</p>
|
<p className="footer-info">{t('footer.headquarters')}</p>
|
||||||
<p className="footer-info">{t('footer.researchCenter')}</p>
|
<p className="footer-info">{t('footer.researchCenter')}</p>
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, onHome, userI
|
|||||||
{ id: '대시보드', label: t('sidebar.dashboard'), disabled: false, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><rect x="3" y="3" width="7" height="9"/><rect x="14" y="3" width="7" height="5"/><rect x="14" y="12" width="7" height="9"/><rect x="3" y="16" width="7" height="5"/></svg> },
|
{ id: '대시보드', label: t('sidebar.dashboard'), disabled: false, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><rect x="3" y="3" width="7" height="9"/><rect x="14" y="3" width="7" height="5"/><rect x="14" y="12" width="7" height="9"/><rect x="3" y="16" width="7" height="5"/></svg> },
|
||||||
{ id: '새 프로젝트 만들기', label: t('sidebar.newProject'), disabled: false, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg> },
|
{ id: '새 프로젝트 만들기', label: t('sidebar.newProject'), disabled: false, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg> },
|
||||||
{ id: 'ADO2 콘텐츠', label: t('sidebar.ado2Contents'), disabled: false, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg> },
|
{ id: 'ADO2 콘텐츠', label: t('sidebar.ado2Contents'), disabled: false, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/></svg> },
|
||||||
{ id: '내 콘텐츠', label: t('sidebar.myContents'), disabled: true, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg> },
|
// { id: '내 콘텐츠', label: t('sidebar.myContents'), disabled: true, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg> },
|
||||||
{ id: '콘텐츠 캘린더', label: '콘텐츠 캘린더', disabled: false, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg> },
|
{ id: '콘텐츠 캘린더', label: '콘텐츠 캘린더', disabled: false, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg> },
|
||||||
{ id: '내 정보', label: t('sidebar.myInfo'), disabled: false, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg> },
|
{ id: '내 정보', label: t('sidebar.myInfo'), disabled: false, icon: <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg> },
|
||||||
];
|
];
|
||||||
@@ -175,6 +175,7 @@ const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, onHome, userI
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="sidebar-footer-actions">
|
||||||
<button
|
<button
|
||||||
className={`logout-btn ${isCollapsed ? 'collapsed' : ''}`}
|
className={`logout-btn ${isCollapsed ? 'collapsed' : ''}`}
|
||||||
onClick={handleLogout}
|
onClick={handleLogout}
|
||||||
@@ -185,6 +186,19 @@ const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, onHome, userI
|
|||||||
</svg>
|
</svg>
|
||||||
{!isCollapsed && <span className="logout-btn-label">{isLoggingOut ? t('sidebar.loggingOut') : t('sidebar.logout')}</span>}
|
{!isCollapsed && <span className="logout-btn-label">{isLoggingOut ? t('sidebar.loggingOut') : t('sidebar.logout')}</span>}
|
||||||
</button>
|
</button>
|
||||||
|
<a
|
||||||
|
href="https://forms.gle/4a8mGebBYtdesvby9"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className={`sidebar-inquiry-btn ${isCollapsed ? 'collapsed' : ''}`}
|
||||||
|
title="고객의견"
|
||||||
|
>
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
||||||
|
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
|
||||||
|
</svg>
|
||||||
|
{!isCollapsed && <span>고객의견</span>}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
const [isPrivacyDropdownOpen, setIsPrivacyDropdownOpen] = useState(false);
|
const [isPrivacyDropdownOpen, setIsPrivacyDropdownOpen] = useState(false);
|
||||||
const [isLoadingAutoDescription, setIsLoadingAutoDescription] = useState(false);
|
const [isLoadingAutoDescription, setIsLoadingAutoDescription] = useState(false);
|
||||||
const [isHorizontalVideo, setIsHorizontalVideo] = useState(false);
|
const [isHorizontalVideo, setIsHorizontalVideo] = useState(false);
|
||||||
|
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);
|
||||||
|
|
||||||
@@ -175,12 +176,6 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
loadSocialAccounts();
|
loadSocialAccounts();
|
||||||
loadAutocomplete();
|
loadAutocomplete();
|
||||||
// // 비디오 정보로 기본 제목 설정
|
|
||||||
// if (video) {
|
|
||||||
// const date = new Date(video.created_at);
|
|
||||||
// const formattedDate = `${date.getFullYear()}.${String(date.getMonth() + 1).padStart(2, '0')}.${String(date.getDate()).padStart(2, '0')}`;
|
|
||||||
// setTitle(`${video.store_name} ${formattedDate}`);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}, [isOpen, video]);
|
}, [isOpen, video]);
|
||||||
|
|
||||||
@@ -436,6 +431,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
onLoadedMetadata={(e) => {
|
onLoadedMetadata={(e) => {
|
||||||
const v = e.currentTarget;
|
const v = e.currentTarget;
|
||||||
setIsHorizontalVideo(v.videoWidth > v.videoHeight);
|
setIsHorizontalVideo(v.videoWidth > v.videoHeight);
|
||||||
|
setVideoMeta({ width: v.videoWidth, height: v.videoHeight, duration: v.duration });
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -444,16 +440,20 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
{/* Right: Form */}
|
{/* Right: Form */}
|
||||||
<div className="social-posting-form">
|
<div className="social-posting-form">
|
||||||
{/* Video Info */}
|
{/* Video Info */}
|
||||||
<div className="social-posting-video-info">
|
{/* <div className="social-posting-video-info">
|
||||||
<span className="social-posting-label-badge">{t('social.postNumber')}</span>
|
<span className="social-posting-label-badge">{t('social.postNumber')}</span>
|
||||||
<span className="social-posting-add-btn">+</span>
|
<span className="social-posting-add-btn">+</span>
|
||||||
</div>
|
</div> */}
|
||||||
|
|
||||||
<div className="social-posting-video-meta">
|
<div className="social-posting-video-meta">
|
||||||
<p className="social-posting-video-title">
|
<p className="social-posting-video-title">
|
||||||
{video.store_name} {new Date(video.created_at).toLocaleString('ko-KR')}
|
{video.store_name} {new Date(video.created_at).toLocaleString('ko-KR')}
|
||||||
</p>
|
</p>
|
||||||
<p className="social-posting-video-specs">{t('social.videoSpecs')}</p>
|
<p className="social-posting-video-specs">
|
||||||
|
{videoMeta
|
||||||
|
? `${videoMeta.width}×${videoMeta.height} · ${Math.floor(videoMeta.duration / 60)}:${String(Math.floor(videoMeta.duration % 60)).padStart(2, '0')}`
|
||||||
|
: t('social.videoSpecs')}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Channel Selector - Custom Dropdown */}
|
{/* Channel Selector - Custom Dropdown */}
|
||||||
|
|||||||
+2
-1
@@ -16,6 +16,7 @@
|
|||||||
"logout": "Log Out"
|
"logout": "Log Out"
|
||||||
},
|
},
|
||||||
"footer": {
|
"footer": {
|
||||||
|
"company":"O2O Inc.",
|
||||||
"businessNumber": "Business Registration No. : 620-87-00810 | CEO : Ahn Sungmin",
|
"businessNumber": "Business Registration No. : 620-87-00810 | CEO : Ahn Sungmin",
|
||||||
"headquarters": "HQ : 41593 Unicorn Lab Daegu A05, 5F, 111 Oksan-ro, Buk-gu, Daegu, Korea",
|
"headquarters": "HQ : 41593 Unicorn Lab Daegu A05, 5F, 111 Oksan-ro, Buk-gu, Daegu, Korea",
|
||||||
"researchCenter": "R&D : 13453 Rooms 504-505 (East), KT Pangyo Bldg, 32 Geumto-ro, Sujeong-gu, Seongnam-si, Gyeonggi-do, Korea",
|
"researchCenter": "R&D : 13453 Rooms 504-505 (East), KT Pangyo Bldg, 32 Geumto-ro, Sujeong-gu, Seongnam-si, Gyeonggi-do, Korea",
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
"social": {
|
"social": {
|
||||||
"title": "Social Media Posting",
|
"title": "Social Media Posting",
|
||||||
"postNumber": "Post 1",
|
"postNumber": "Post 1",
|
||||||
"videoSpecs": "1080x1920 · 10 sec",
|
"videoSpecs": "720x1280 · 1:01",
|
||||||
"channelLabel": "Post Channel",
|
"channelLabel": "Post Channel",
|
||||||
"loadingAccounts": "Loading accounts...",
|
"loadingAccounts": "Loading accounts...",
|
||||||
"noAccounts": "No connected social accounts.",
|
"noAccounts": "No connected social accounts.",
|
||||||
|
|||||||
+5
-4
@@ -16,6 +16,7 @@
|
|||||||
"logout": "로그아웃"
|
"logout": "로그아웃"
|
||||||
},
|
},
|
||||||
"footer": {
|
"footer": {
|
||||||
|
"company":"㈜에이아이오투오",
|
||||||
"businessNumber": "사업자 등록번호 : 620-87-00810 | 대표 : 안성민",
|
"businessNumber": "사업자 등록번호 : 620-87-00810 | 대표 : 안성민",
|
||||||
"headquarters": "본사 : 41593 대구광역시 북구 옥산로 111, 5층 유니콘랩 대구 A05호",
|
"headquarters": "본사 : 41593 대구광역시 북구 옥산로 111, 5층 유니콘랩 대구 A05호",
|
||||||
"researchCenter": "연구소 : 13453 경기 성남시 수정구 금토로 32 (금토동) (주)KT 판교빌딩 504호~505호 (East)",
|
"researchCenter": "연구소 : 13453 경기 성남시 수정구 금토로 32 (금토동) (주)KT 판교빌딩 504호~505호 (East)",
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
"social": {
|
"social": {
|
||||||
"title": "소셜 미디어 포스팅",
|
"title": "소셜 미디어 포스팅",
|
||||||
"postNumber": "게시물 1",
|
"postNumber": "게시물 1",
|
||||||
"videoSpecs": "1080x1920 · 10초",
|
"videoSpecs": "720x1280 · 1:01",
|
||||||
"channelLabel": "게시 채널",
|
"channelLabel": "게시 채널",
|
||||||
"loadingAccounts": "계정 로딩 중...",
|
"loadingAccounts": "계정 로딩 중...",
|
||||||
"noAccounts": "연결된 소셜 계정이 없습니다.",
|
"noAccounts": "연결된 소셜 계정이 없습니다.",
|
||||||
@@ -345,11 +346,11 @@
|
|||||||
"conceptScalability": "컨셉 확장성",
|
"conceptScalability": "컨셉 확장성",
|
||||||
"noInfo": "정보 없음",
|
"noInfo": "정보 없음",
|
||||||
"marketPositioning": "시장 포지셔닝",
|
"marketPositioning": "시장 포지셔닝",
|
||||||
"coreValue": "핵심 가치 (Core Value)",
|
"coreValue": "핵심 가치",
|
||||||
"categoryDefinition": "카테고리 정의",
|
"categoryDefinition": "카테고리 정의",
|
||||||
"targetPersona": "타겟 페르소나",
|
"targetPersona": "주요 고객 유형",
|
||||||
"ageSuffix": "세",
|
"ageSuffix": "세",
|
||||||
"sellingPoints": "주요 셀링 포인트 (USP)",
|
"sellingPoints": "주요 셀링 포인트",
|
||||||
"recommendedKeywords": "추천 타겟 키워드",
|
"recommendedKeywords": "추천 타겟 키워드",
|
||||||
"generateContent": "콘텐츠 생성",
|
"generateContent": "콘텐츠 생성",
|
||||||
"pageDescBefore": "을 통해 도출된 ",
|
"pageDescBefore": "을 통해 도출된 ",
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr className="bi2-page-divider" />
|
||||||
|
|
||||||
{/* Main Content Container */}
|
{/* Main Content Container */}
|
||||||
<div className="bi2-main-container">
|
<div className="bi2-main-container">
|
||||||
{/* 매장명 & 주소 */}
|
{/* 매장명 & 주소 */}
|
||||||
@@ -130,9 +132,11 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
|||||||
<div className="bi2-persona-divider"></div>
|
<div className="bi2-persona-divider"></div>
|
||||||
<div className="bi2-persona-detail grow">
|
<div className="bi2-persona-detail grow">
|
||||||
<span className="bi2-label-xs">{t('analysis.favorKeywords', { defaultValue: '선호 키워드' })}</span>
|
<span className="bi2-label-xs">{t('analysis.favorKeywords', { defaultValue: '선호 키워드' })}</span>
|
||||||
<p className="bi2-persona-detail-text">
|
<div className="bi2-persona-detail-text">
|
||||||
{persona.favor_target.join('\n')}
|
{persona.favor_target.map((item, i) => (
|
||||||
</p>
|
<p key={i}>{item}</p>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="bi2-persona-divider"></div>
|
<div className="bi2-persona-divider"></div>
|
||||||
<div className="bi2-persona-detail">
|
<div className="bi2-persona-detail">
|
||||||
|
|||||||
@@ -76,11 +76,27 @@ export const GeometricChart: React.FC<GeometricChartProps> = ({ data }) => {
|
|||||||
style={{ overflow: 'visible', width: '440px', height: '440px' }}
|
style={{ overflow: 'visible', width: '440px', height: '440px' }}
|
||||||
>
|
>
|
||||||
<defs>
|
<defs>
|
||||||
<filter id="radar-glow" x="-20%" y="-20%" width="140%" height="140%">
|
{/* 레이더 폴리곤 fill: radial gradient */}
|
||||||
<feGaussianBlur stdDeviation="4" result="coloredBlur" />
|
<radialGradient id="radar-fill-gradient" cx="280" cy="280" r="160" fx="280" fy="280" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="60%" stopColor="#034245" stopOpacity="0" />
|
||||||
|
<stop offset="100%" stopColor="#94FBE0" stopOpacity="0.30" />
|
||||||
|
</radialGradient>
|
||||||
|
{/* 레이더 폴리곤 filter: outer drop-shadow + inset glow */}
|
||||||
|
<filter id="radar-polygon-filter" x="-30%" y="-30%" width="160%" height="160%">
|
||||||
|
{/* Outer drop shadow */}
|
||||||
|
<feDropShadow dx="0" dy="0" stdDeviation="6" floodColor="#94FBE0" floodOpacity="0.5" result="dropShadow" />
|
||||||
|
{/* Inset glow: invert alpha → blur → composite inside */}
|
||||||
|
<feComponentTransfer in="SourceAlpha" result="invertedAlpha">
|
||||||
|
<feFuncA type="linear" slope="-1" intercept="1" />
|
||||||
|
</feComponentTransfer>
|
||||||
|
<feGaussianBlur in="invertedAlpha" stdDeviation="6" result="blurredOuter" />
|
||||||
|
<feComposite in="blurredOuter" in2="SourceAlpha" operator="in" result="insetMask" />
|
||||||
|
<feFlood floodColor="#94FBE0" floodOpacity="0.5" result="insetColor" />
|
||||||
|
<feComposite in="insetColor" in2="insetMask" operator="in" result="insetGlow" />
|
||||||
<feMerge>
|
<feMerge>
|
||||||
<feMergeNode in="coloredBlur" />
|
<feMergeNode in="dropShadow" />
|
||||||
<feMergeNode in="SourceGraphic" />
|
<feMergeNode in="SourceGraphic" />
|
||||||
|
<feMergeNode in="insetGlow" />
|
||||||
</feMerge>
|
</feMerge>
|
||||||
</filter>
|
</filter>
|
||||||
<filter id="badge-glow" x="-50%" y="-50%" width="200%" height="200%">
|
<filter id="badge-glow" x="-50%" y="-50%" width="200%" height="200%">
|
||||||
@@ -118,11 +134,11 @@ export const GeometricChart: React.FC<GeometricChartProps> = ({ data }) => {
|
|||||||
{/* 데이터 폴리곤 */}
|
{/* 데이터 폴리곤 */}
|
||||||
<polygon
|
<polygon
|
||||||
points={dataPolygon}
|
points={dataPolygon}
|
||||||
fill="rgba(45, 212, 191, 0.15)"
|
fill="url(#radar-fill-gradient)"
|
||||||
stroke="#2DD4BF"
|
stroke="var(--Color-mint-500, #94FBE0)"
|
||||||
strokeWidth="2"
|
strokeWidth="2"
|
||||||
strokeLinejoin="round"
|
strokeLinejoin="round"
|
||||||
filter="url(#radar-glow)"
|
filter="url(#radar-polygon-filter)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* 데이터 포인트 */}
|
{/* 데이터 포인트 */}
|
||||||
@@ -132,8 +148,8 @@ export const GeometricChart: React.FC<GeometricChartProps> = ({ data }) => {
|
|||||||
cx={point.x}
|
cx={point.x}
|
||||||
cy={point.y}
|
cy={point.y}
|
||||||
r="4"
|
r="4"
|
||||||
fill="#2DD4BF"
|
fill="#ffffff"
|
||||||
stroke="#1A1A2E"
|
stroke="#ffffff"
|
||||||
strokeWidth="2"
|
strokeWidth="2"
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
@@ -145,7 +161,7 @@ export const GeometricChart: React.FC<GeometricChartProps> = ({ data }) => {
|
|||||||
const rank = rankMap.get(i) || i + 1;
|
const rank = rankMap.get(i) || i + 1;
|
||||||
const isTopThree = rank <= 3;
|
const isTopThree = rank <= 3;
|
||||||
const isLeftSide = Math.cos(angle) < -0.1;
|
const isLeftSide = Math.cos(angle) < -0.1;
|
||||||
const textX = isLeftSide ? -14 : 14;
|
const textX = isLeftSide ? -20 : 20;
|
||||||
const textAnchor: 'start' | 'end' = isLeftSide ? 'end' : 'start';
|
const textAnchor: 'start' | 'end' = isLeftSide ? 'end' : 'start';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
|||||||
<div className="comp2-info-content">
|
<div className="comp2-info-content">
|
||||||
<div className="comp2-file-info">
|
<div className="comp2-file-info">
|
||||||
<h3 className="comp2-filename">{getFileName()}</h3>
|
<h3 className="comp2-filename">{getFileName()}</h3>
|
||||||
<p className="comp2-filesize">19.6MB</p>
|
{/* <p className="comp2-filesize">19.6MB</p> */}
|
||||||
</div>
|
</div>
|
||||||
<div className="comp2-meta-grid">
|
<div className="comp2-meta-grid">
|
||||||
<div className="comp2-meta-item">
|
<div className="comp2-meta-item">
|
||||||
|
|||||||
@@ -643,7 +643,8 @@ const ContentCalendarContent: React.FC<ContentCalendarContentProps> = ({ onNavig
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={panelRef}
|
ref={panelRef}
|
||||||
style={{ flex: 1, overflowY: 'auto', padding: '12px 16px', display: 'flex', flexDirection: 'column', gap: 20 }}
|
className="calendar-panel-scroll"
|
||||||
|
style={{ flex: 1, overflowY: 'auto', padding: '12px 16px', display: 'flex', flexDirection: 'column', gap: 20, maxHeight: 900 }}
|
||||||
>
|
>
|
||||||
{sortedDateKeys.map(dateKey => (
|
{sortedDateKeys.map(dateKey => (
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -34,21 +34,6 @@ interface DailyData {
|
|||||||
lastPeriod: number;
|
lastPeriod: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// interface PlatformMetric { // 미사용 — platform_data 기능 예정
|
|
||||||
// id: string;
|
|
||||||
// label: string;
|
|
||||||
// value: string;
|
|
||||||
// unit?: string;
|
|
||||||
// trend: number;
|
|
||||||
// trendDirection: 'up' | 'down';
|
|
||||||
// }
|
|
||||||
|
|
||||||
// interface PlatformData { // 미사용 — platform_data 기능 예정
|
|
||||||
// platform: 'youtube' | 'instagram';
|
|
||||||
// displayName: string;
|
|
||||||
// metrics: PlatformMetric[];
|
|
||||||
// }
|
|
||||||
|
|
||||||
interface TopContent {
|
interface TopContent {
|
||||||
id: string;
|
id: string;
|
||||||
title: string;
|
title: string;
|
||||||
@@ -65,6 +50,12 @@ interface AudienceData {
|
|||||||
topRegions: { region: string; percentage: number }[];
|
topRegions: { region: string; percentage: number }[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface DashboardError {
|
||||||
|
code: string;
|
||||||
|
message: string;
|
||||||
|
reconnect_url?: string;
|
||||||
|
}
|
||||||
|
|
||||||
interface DashboardResponse {
|
interface DashboardResponse {
|
||||||
contentMetrics: ContentMetric[];
|
contentMetrics: ContentMetric[];
|
||||||
monthlyData: MonthlyData[];
|
monthlyData: MonthlyData[];
|
||||||
@@ -72,7 +63,7 @@ interface DashboardResponse {
|
|||||||
topContent: TopContent[];
|
topContent: TopContent[];
|
||||||
audienceData: AudienceData;
|
audienceData: AudienceData;
|
||||||
hasUploads: boolean; // 업로드 영상 존재 여부 (false 시 mock 데이터 + 안내 메시지 표시)
|
hasUploads: boolean; // 업로드 영상 존재 여부 (false 시 mock 데이터 + 안내 메시지 표시)
|
||||||
// platformData: PlatformData[]; // 미사용
|
error: DashboardError | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ConnectedAccount {
|
interface ConnectedAccount {
|
||||||
@@ -487,8 +478,9 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
|
|
||||||
const [dashboardData, setDashboardData] = useState<DashboardResponse | null>(null);
|
const [dashboardData, setDashboardData] = useState<DashboardResponse | null>(null);
|
||||||
const [isLoading, setIsLoading] = useState(true);
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<DashboardError | null>(null);
|
||||||
const [showMockData, setShowMockData] = useState(false);
|
const [showMockData, setShowMockData] = useState(false);
|
||||||
|
const [retryTrigger, setRetryTrigger] = useState(0);
|
||||||
|
|
||||||
// 계정 관련 state
|
// 계정 관련 state
|
||||||
const [accounts, setAccounts] = useState<ConnectedAccount[]>([]);
|
const [accounts, setAccounts] = useState<ConnectedAccount[]>([]);
|
||||||
@@ -576,25 +568,32 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
const errorData = await response.json();
|
const errorData = await response.json();
|
||||||
|
|
||||||
if (errorData.code === 'YOUTUBE_NOT_CONNECTED') {
|
|
||||||
setError('YouTube 계정을 연동하여 데이터를 확인하세요.');
|
|
||||||
setDashboardData(null);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (errorData.code === 'YOUTUBE_ACCOUNT_SELECTION_REQUIRED') {
|
if (errorData.code === 'YOUTUBE_ACCOUNT_SELECTION_REQUIRED') {
|
||||||
setDashboardData(null);
|
setDashboardData(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
throw new Error(errorData.detail || `API Error: ${response.status}`);
|
if (errorData.code === 'YOUTUBE_API_FAILED') {
|
||||||
|
setError({ code: 'YOUTUBE_API_FAILED', message: 'YouTube Analytics API 호출에 실패했습니다.' });
|
||||||
|
setDashboardData(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setError({ code: errorData.code || 'API_ERROR', message: errorData.detail || `API Error: ${response.status}`, reconnect_url: errorData.reconnect_url });
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data: DashboardResponse = await response.json();
|
const data: DashboardResponse = await response.json();
|
||||||
|
|
||||||
|
if (data.error) {
|
||||||
|
setError(data.error);
|
||||||
|
setDashboardData(data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setDashboardData(data);
|
setDashboardData(data);
|
||||||
setError(null);
|
setError(null);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Dashboard API Error:', err);
|
console.error('Dashboard API Error:', err);
|
||||||
setError(err instanceof Error ? err.message : 'Unknown error');
|
setError({ code: 'UNKNOWN', message: err instanceof Error ? err.message : 'Unknown error' });
|
||||||
setDashboardData(null);
|
setDashboardData(null);
|
||||||
} finally {
|
} finally {
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
@@ -602,7 +601,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
fetchDashboardData();
|
fetchDashboardData();
|
||||||
}, [mode, selectedAccountId, accountsLoaded]);
|
}, [mode, selectedAccountId, accountsLoaded, retryTrigger]);
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
@@ -612,27 +611,28 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// hasUploads === false: 업로드 영상 없음 → 전체 mock 데이터 표시 + 안내 배너
|
// hasUploads === false이고 error 없음: 업로드 영상 없음 → 전체 mock 데이터 표시 + 안내 배너
|
||||||
const isEmptyState = dashboardData?.hasUploads === false;
|
const isEmptyState = dashboardData?.hasUploads === false && !dashboardData?.error;
|
||||||
|
|
||||||
// 블러 조건: 1)계정 미연결 2)업로드 영상 없음 3)데이터 없음
|
// 블러 조건: 1)계정 미연결 2)업로드 영상 없음 3)데이터 없음 4)에러 있음
|
||||||
const isBlurred = accounts.length === 0 || isEmptyState || !dashboardData;
|
const isBlurred = accounts.length === 0 || isEmptyState || !dashboardData || !!error;
|
||||||
|
|
||||||
// API 데이터 우선 사용, 없거나 영상 없음(isEmptyState) 시 Mock 데이터로 폴백
|
// showMockData=true면 전체 mock 강제, 아니면 API 우선 / isEmptyState 시 mock 폴백
|
||||||
const contentMetrics = (!isEmptyState && dashboardData?.contentMetrics?.length) ? dashboardData.contentMetrics : MOCK_CONTENT_METRICS;
|
const useReal = !showMockData && !isEmptyState;
|
||||||
const topContent = (!isEmptyState && dashboardData?.topContent?.length) ? dashboardData.topContent : MOCK_TOP_CONTENT;
|
const contentMetrics = (useReal && dashboardData?.contentMetrics?.length) ? dashboardData.contentMetrics : MOCK_CONTENT_METRICS;
|
||||||
const hasRealAgeGroups = !isEmptyState && !!dashboardData?.audienceData?.ageGroups?.some(g => g.percentage > 0);
|
const topContent = (useReal && dashboardData?.topContent?.length) ? dashboardData.topContent : MOCK_TOP_CONTENT;
|
||||||
const hasRealGender = !isEmptyState && ((dashboardData?.audienceData?.gender?.male ?? 0) + (dashboardData?.audienceData?.gender?.female ?? 0)) > 0;
|
const hasRealAgeGroups = useReal && !!dashboardData?.audienceData?.ageGroups?.some(g => g.percentage > 0);
|
||||||
const hasRealTopRegions = !isEmptyState && !!dashboardData?.audienceData?.topRegions?.some(r => r.percentage > 0);
|
const hasRealGender = useReal && ((dashboardData?.audienceData?.gender?.male ?? 0) + (dashboardData?.audienceData?.gender?.female ?? 0)) > 0;
|
||||||
|
const hasRealTopRegions = useReal && !!dashboardData?.audienceData?.topRegions?.some(r => r.percentage > 0);
|
||||||
const hasRealAudienceData = hasRealAgeGroups && hasRealGender && hasRealTopRegions;
|
const hasRealAudienceData = hasRealAgeGroups && hasRealGender && hasRealTopRegions;
|
||||||
const audienceData = hasRealAudienceData ? dashboardData!.audienceData : MOCK_AUDIENCE_DATA;
|
const audienceData = hasRealAudienceData ? dashboardData!.audienceData : MOCK_AUDIENCE_DATA;
|
||||||
|
|
||||||
// mode별 차트 데이터를 ChartDataPoint 통합 형식으로 변환
|
// mode별 차트 데이터를 ChartDataPoint 통합 형식으로 변환
|
||||||
const chartData: ChartDataPoint[] = mode === 'month'
|
const chartData: ChartDataPoint[] = mode === 'month'
|
||||||
? ((!isEmptyState && dashboardData?.monthlyData?.length)
|
? ((useReal && dashboardData?.monthlyData?.length)
|
||||||
? dashboardData.monthlyData.map((d: MonthlyData) => ({ label: d.month, current: d.thisYear, previous: d.lastYear }))
|
? dashboardData.monthlyData.map((d: MonthlyData) => ({ label: d.month, current: d.thisYear, previous: d.lastYear }))
|
||||||
: MOCK_MONTHLY_DATA.map((d: MonthlyData) => ({ label: d.month, current: d.thisYear, previous: d.lastYear })))
|
: MOCK_MONTHLY_DATA.map((d: MonthlyData) => ({ label: d.month, current: d.thisYear, previous: d.lastYear })))
|
||||||
: ((!isEmptyState && dashboardData?.dailyData?.length)
|
: ((useReal && dashboardData?.dailyData?.length)
|
||||||
? dashboardData.dailyData.map((d: DailyData) => ({ label: d.date, current: d.thisPeriod, previous: d.lastPeriod }))
|
? dashboardData.dailyData.map((d: DailyData) => ({ label: d.date, current: d.thisPeriod, previous: d.lastPeriod }))
|
||||||
: MOCK_DAILY_DATA.map((d: DailyData) => ({ label: d.date, current: d.thisPeriod, previous: d.lastPeriod })));
|
: MOCK_DAILY_DATA.map((d: DailyData) => ({ label: d.date, current: d.thisPeriod, previous: d.lastPeriod })));
|
||||||
|
|
||||||
@@ -657,8 +657,8 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
<path d="M15 10l4.553-2.069A1 1 0 0121 8.87v6.26a1 1 0 01-1.447.899L15 14M3 8a2 2 0 012-2h10a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2V8z" strokeLinecap="round" strokeLinejoin="round" />
|
<path d="M15 10l4.553-2.069A1 1 0 0121 8.87v6.26a1 1 0 01-1.447.899L15 14M3 8a2 2 0 012-2h10a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2V8z" strokeLinecap="round" strokeLinejoin="round" />
|
||||||
</svg>
|
</svg>
|
||||||
<div>
|
<div>
|
||||||
<p style={{ color: '#a6ffea', fontWeight: 600, marginBottom: '2px' }}>아직 업로드된 영상이 없습니다.</p>
|
<p style={{ color: '#a6ffea', fontSize: '20px', fontWeight: 600, marginBottom: '2px' }}>아직 업로드된 영상이 없습니다.</p>
|
||||||
<p style={{ color: 'rgba(255,255,255,0.5)', fontSize: '13px' }}>ADO2에서 영상을 업로드하면 실제 통계가 표시됩니다.</p>
|
<p style={{ color: 'rgba(255,255,255,0.5)', fontSize: '16px' }}>ADO2에서 영상을 업로드하면 실제 통계가 표시됩니다.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -672,11 +672,17 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
<svg className="w-5 h-5 mr-2 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
|
<svg className="w-5 h-5 mr-2 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
|
||||||
<path fillRule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clipRule="evenodd" />
|
<path fillRule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clipRule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
<div>
|
<p className="font-semibold">{error.message}</p>
|
||||||
<p className="font-semibold">실제 데이터를 보려면 계정을 연동하세요.</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{error.code === 'YOUTUBE_TOKEN_EXPIRED' && (
|
||||||
{error.includes('YouTube') && (
|
<button
|
||||||
|
onClick={() => onNavigate?.('내 정보')}
|
||||||
|
className="ml-4 px-4 py-2 bg-yellow-600 text-white rounded hover:bg-yellow-700 whitespace-nowrap"
|
||||||
|
>
|
||||||
|
재연동하러 가기 →
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
{error.code === 'YOUTUBE_NOT_CONNECTED' && (
|
||||||
<button
|
<button
|
||||||
onClick={() => onNavigate?.('내 정보')}
|
onClick={() => onNavigate?.('내 정보')}
|
||||||
className="ml-4 px-4 py-2 bg-yellow-600 text-white rounded hover:bg-yellow-700 whitespace-nowrap"
|
className="ml-4 px-4 py-2 bg-yellow-600 text-white rounded hover:bg-yellow-700 whitespace-nowrap"
|
||||||
@@ -684,6 +690,14 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
연동하러 가기 →
|
연동하러 가기 →
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
{(error.code === 'YOUTUBE_API_FAILED' || error.code === 'DASHBOARD_DATA_ERROR') && (
|
||||||
|
<button
|
||||||
|
onClick={() => { setError(null); setRetryTrigger((n: number) => n + 1); }}
|
||||||
|
className="ml-4 px-4 py-2 bg-yellow-600 text-white rounded hover:bg-yellow-700 whitespace-nowrap"
|
||||||
|
>
|
||||||
|
재시도 →
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -786,7 +800,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
<div className="flex items-center justify-between mb-4">
|
<div className="flex items-center justify-between mb-4">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="dashboard-section-title" style={{ marginBottom: '2px' }}>{t('dashboard.contentPerformance')}</h2>
|
<h2 className="dashboard-section-title" style={{ marginBottom: '2px' }}>{t('dashboard.contentPerformance')}</h2>
|
||||||
<p style={{ fontSize: '12px', color: 'rgba(255,255,255,0.4)', margin: 0 }}>ADO2에서 업로드한 최근 30개의 영상 통계가 표시됩니다.</p>
|
<p style={{ fontSize: '14px', color: 'rgba(255,255,255,0.4)', margin: 0 }}>ADO2에서 업로드한 최근 30개의 영상 통계가 표시됩니다.</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="mode-toggle">
|
<div className="mode-toggle">
|
||||||
<button
|
<button
|
||||||
@@ -860,7 +874,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
<AnimatedSection delay={1000} className="audience-section">
|
<AnimatedSection delay={1000} className="audience-section">
|
||||||
<div style={{ marginBottom: '16px' }}>
|
<div style={{ marginBottom: '16px' }}>
|
||||||
<h2 className="dashboard-section-title" style={{ marginBottom: '2px' }}>{t('dashboard.audienceInsights')}</h2>
|
<h2 className="dashboard-section-title" style={{ marginBottom: '2px' }}>{t('dashboard.audienceInsights')}</h2>
|
||||||
<p style={{ fontSize: '12px', color: 'rgba(255,255,255,0.4)', margin: 0 }}>선택한 채널의 통계가 표시됩니다.</p>
|
<p style={{ fontSize: '14px', color: 'rgba(255,255,255,0.4)', margin: 0 }}>선택한 채널의 통계가 표시됩니다.</p>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ position: 'relative' }}>
|
<div style={{ position: 'relative' }}>
|
||||||
<div className="audience-cards" style={!hasRealAudienceData && !showMockData ? { filter: 'blur(4px)', pointerEvents: 'none', userSelect: 'none' } : {}}>
|
<div className="audience-cards" style={!hasRealAudienceData && !showMockData ? { filter: 'blur(4px)', pointerEvents: 'none', userSelect: 'none' } : {}}>
|
||||||
@@ -883,7 +897,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
</div>
|
</div>
|
||||||
</AnimatedItem>
|
</AnimatedItem>
|
||||||
</div>
|
</div>
|
||||||
{dashboardData && !isEmptyState && !hasRealAudienceData && (
|
{dashboardData && !isEmptyState && !hasRealAudienceData && !showMockData && (
|
||||||
<div style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', pointerEvents: 'none' }}>
|
<div style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', pointerEvents: 'none' }}>
|
||||||
<div style={{
|
<div style={{
|
||||||
display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px',
|
display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px',
|
||||||
@@ -892,7 +906,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
borderRadius: '12px',
|
borderRadius: '12px',
|
||||||
padding: '20px 28px',
|
padding: '20px 28px',
|
||||||
}}>
|
}}>
|
||||||
<p style={{ color: 'rgba(255,255,255,0.85)', fontSize: '14px', fontWeight: 500, margin: 0, textAlign: 'center' }}>
|
<p style={{ color: 'rgba(255,255,255,0.85)', fontSize: '16px', fontWeight: 500, margin: 0, textAlign: 'center' }}>
|
||||||
누적 데이터가 부족하여 실제 시청자 정보가 없습니다.
|
누적 데이터가 부족하여 실제 시청자 정보가 없습니다.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -901,8 +915,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
</div>
|
</div>
|
||||||
</AnimatedSection>
|
</AnimatedSection>
|
||||||
|
|
||||||
{/* 개발자 모드 전용: mock 데이터 블러 해제 버튼 */}
|
{/* mock 데이터 보기 버튼 */}
|
||||||
{isTestPage && isEmptyState && (
|
|
||||||
<button
|
<button
|
||||||
onClick={() => setShowMockData(prev => !prev)}
|
onClick={() => setShowMockData(prev => !prev)}
|
||||||
style={{
|
style={{
|
||||||
@@ -930,9 +943,8 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
|||||||
: <><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></>
|
: <><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></>
|
||||||
}
|
}
|
||||||
</svg>
|
</svg>
|
||||||
{showMockData ? 'Mock 숨기기' : 'Mock 보기'} [DEV]
|
{showMockData ? 'Sample 숨기기' : 'Sample 보기'}
|
||||||
</button>
|
</button>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import Sidebar from '../../components/Sidebar';
|
import Sidebar from '../../components/Sidebar';
|
||||||
import AssetManagementContent from './AssetManagementContent';
|
import AssetManagementContent from './AssetManagementContent';
|
||||||
@@ -148,13 +148,18 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const [imageList, setImageList] = useState<ImageItem[]>(getInitialImageList());
|
const [imageList, setImageList] = useState<ImageItem[]>(getInitialImageList());
|
||||||
|
const prevAnalysisMIdRef = useRef<number | null | undefined>(analysisData?.m_id);
|
||||||
|
|
||||||
// analysisData 변경 시 imageList 업데이트
|
// analysisData 변경 시 m_id가 바뀐 경우(새로운 분석)에만 imageList 업데이트
|
||||||
|
// m_id가 동일하면 언어 변경 등 기타 업데이트이므로 사용자가 수정한 이미지 목록 유지
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('[GenerationFlow] analysisData updated, m_id:', analysisData?.m_id);
|
console.log('[GenerationFlow] analysisData updated, m_id:', analysisData?.m_id);
|
||||||
if (analysisData?.image_list && analysisData.image_list.length > 0) {
|
if (analysisData?.image_list && analysisData.image_list.length > 0) {
|
||||||
|
if (prevAnalysisMIdRef.current !== analysisData.m_id) {
|
||||||
setImageList(analysisData.image_list.map(url => ({ type: 'url', url })));
|
setImageList(analysisData.image_list.map(url => ({ type: 'url', url })));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
prevAnalysisMIdRef.current = analysisData?.m_id;
|
||||||
}, [analysisData]);
|
}, [analysisData]);
|
||||||
|
|
||||||
const handleRemoveImage = (index: number) => {
|
const handleRemoveImage = (index: number) => {
|
||||||
|
|||||||
@@ -286,6 +286,9 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
|||||||
setErrorMessage(null);
|
setErrorMessage(null);
|
||||||
setStatusMessage(t('soundStudio.generatingLyrics'));
|
setStatusMessage(t('soundStudio.generatingLyrics'));
|
||||||
|
|
||||||
|
const savedRatio = localStorage.getItem('castad_video_ratio');
|
||||||
|
const orientation = (savedRatio === 'horizontal' || savedRatio === 'vertical') ? savedRatio : 'vertical';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const language = LANGUAGE_MAP[selectedLang] || 'Korean';
|
const language = LANGUAGE_MAP[selectedLang] || 'Korean';
|
||||||
|
|
||||||
@@ -298,6 +301,7 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
|||||||
m_id: mId,
|
m_id: mId,
|
||||||
region: businessInfo.region,
|
region: businessInfo.region,
|
||||||
task_id: imageTaskId,
|
task_id: imageTaskId,
|
||||||
|
orientation,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!lyricResponse.success || !lyricResponse.task_id) {
|
if (!lyricResponse.success || !lyricResponse.task_id) {
|
||||||
|
|||||||
@@ -207,10 +207,19 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
|||||||
{/* 입력 필드 */}
|
{/* 입력 필드 */}
|
||||||
<div className="url-input-field-container" ref={autocompleteRef}>
|
<div className="url-input-field-container" ref={autocompleteRef}>
|
||||||
<input
|
<input
|
||||||
type={searchType === 'url' ? 'url' : 'text'}
|
type="text"
|
||||||
value={inputValue}
|
value={inputValue}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
let value = e.target.value;
|
||||||
|
|
||||||
|
// URL 모드일 때 URL만 추출 (예: "[네이버 지도] https://...")
|
||||||
|
if (searchType === 'url') {
|
||||||
|
const urlMatch = value.match(/https?:\/\/\S+/);
|
||||||
|
if (urlMatch && urlMatch[0] !== value) {
|
||||||
|
value = urlMatch[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setInputValue(value);
|
setInputValue(value);
|
||||||
|
|
||||||
// 업체명 검색일 때 자동완성 검색 (디바운스)
|
// 업체명 검색일 때 자동완성 검색 (디바운스)
|
||||||
@@ -260,10 +269,9 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
|||||||
|
|
||||||
{/* 검색 버튼 */}
|
{/* 검색 버튼 */}
|
||||||
<button type="submit" className="url-input-button">
|
<button type="submit" className="url-input-button">
|
||||||
{t('urlInput.searchButton')}
|
{t('landing.hero.analyzeButton')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 에러 메시지 */}
|
{/* 에러 메시지 */}
|
||||||
{error && (
|
{error && (
|
||||||
<p className="url-input-error">{error}</p>
|
<p className="url-input-error">{error}</p>
|
||||||
|
|||||||
@@ -376,7 +376,16 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
|
|||||||
type="text"
|
type="text"
|
||||||
value={inputValue}
|
value={inputValue}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
let value = e.target.value;
|
||||||
|
|
||||||
|
// URL 모드일 때 URL만 추출 (예: "[네이버 지도] https://...")
|
||||||
|
if (searchType === 'url') {
|
||||||
|
const urlMatch = value.match(/https?:\/\/\S+/);
|
||||||
|
if (urlMatch && urlMatch[0] !== value) {
|
||||||
|
value = urlMatch[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setInputValue(value);
|
setInputValue(value);
|
||||||
setHighlightedIndex(-1); // 입력 시 하이라이트 초기화
|
setHighlightedIndex(-1); // 입력 시 하이라이트 초기화
|
||||||
if (localError) setLocalError('');
|
if (localError) setLocalError('');
|
||||||
@@ -391,6 +400,16 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
|
|||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
onPaste={(e: React.ClipboardEvent<HTMLInputElement>) => {
|
||||||
|
if (searchType !== 'url') return;
|
||||||
|
const pasted = e.clipboardData.getData('text');
|
||||||
|
const urlMatch = pasted.match(/https?:\/\/[^\s]+/);
|
||||||
|
if (urlMatch) {
|
||||||
|
e.preventDefault();
|
||||||
|
setInputValue(urlMatch[0]);
|
||||||
|
if (localError) setLocalError('');
|
||||||
|
}
|
||||||
|
}}
|
||||||
onFocus={() => {
|
onFocus={() => {
|
||||||
setIsFocused(true);
|
setIsFocused(true);
|
||||||
if (searchType === 'name' && autocompleteResults.length > 0) {
|
if (searchType === 'name' && autocompleteResults.length > 0) {
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export interface LyricGenerateRequest {
|
|||||||
m_id: number;
|
m_id: number;
|
||||||
region: string;
|
region: string;
|
||||||
task_id: string;
|
task_id: string;
|
||||||
|
orientation?: 'vertical' | 'horizontal';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 가사 생성 응답
|
// 가사 생성 응답
|
||||||
|
|||||||
Reference in new issue
Block a user