Compare commits
17
Commits
cab67c711a
...
subtitle
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb55383de5 | ||
|
|
3f3f8bb159 | ||
|
|
7aedf07203 | ||
|
|
65ea09ffd5 | ||
|
|
388351e6d4 | ||
|
|
fa4864e9ef | ||
|
|
1d868627e4 | ||
|
|
8086e28908 | ||
|
|
dc3d128b22 | ||
|
|
937ef7a576 | ||
|
|
9fe03a66cb | ||
|
|
3cbc48181b | ||
|
|
b05c7bd080 | ||
|
|
cd4114f74d | ||
|
|
ed13c83ae0 | ||
|
|
4d91da9b9a | ||
|
|
be32a04dd0 |
No files matched your search
@@ -10,7 +10,8 @@
|
||||
"mcp__figma__get_figma_data",
|
||||
"mcp__figma__download_figma_images",
|
||||
"Bash(npx tsc:*)",
|
||||
"Bash(grep:*)"
|
||||
"Bash(grep:*)",
|
||||
"mcp__claude_ai_Figma__get_design_context"
|
||||
]
|
||||
}
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": []
|
||||
}
|
||||
Generated
+6
-17
@@ -12,7 +12,7 @@
|
||||
"react": "^19.2.3",
|
||||
"react-dom": "^19.2.3",
|
||||
"react-i18next": "^16.5.4",
|
||||
"recharts": "^3.7.0"
|
||||
"recharts": "^3.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.14.0",
|
||||
@@ -52,7 +52,6 @@
|
||||
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.27.1",
|
||||
"@babel/generator": "^7.28.5",
|
||||
@@ -1289,7 +1288,6 @@
|
||||
"integrity": "sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
}
|
||||
@@ -1351,7 +1349,6 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.9.0",
|
||||
"caniuse-lite": "^1.0.30001759",
|
||||
@@ -1694,7 +1691,6 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.28.4"
|
||||
},
|
||||
@@ -1815,7 +1811,6 @@
|
||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
@@ -1857,7 +1852,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz",
|
||||
"integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@@ -1867,7 +1861,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz",
|
||||
"integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"scheduler": "^0.27.0"
|
||||
},
|
||||
@@ -1914,7 +1907,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz",
|
||||
"integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/use-sync-external-store": "^0.0.6",
|
||||
"use-sync-external-store": "^1.4.0"
|
||||
@@ -1944,15 +1936,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/recharts": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/recharts/-/recharts-3.7.0.tgz",
|
||||
"integrity": "sha512-l2VCsy3XXeraxIID9fx23eCb6iCBsxUQDnE8tWm6DFdszVAO7WVY/ChAD9wVit01y6B2PMupYiMmQwhgPHc9Ew==",
|
||||
"version": "3.8.0",
|
||||
"resolved": "https://registry.npmjs.org/recharts/-/recharts-3.8.0.tgz",
|
||||
"integrity": "sha512-Z/m38DX3L73ExO4Tpc9/iZWHmHnlzWG4njQbxsF5aSjwqmHNDDIm0rdEBArkwsBvR8U6EirlEHiQNYWCVh9sGQ==",
|
||||
"license": "MIT",
|
||||
"workspaces": [
|
||||
"www"
|
||||
],
|
||||
"dependencies": {
|
||||
"@reduxjs/toolkit": "1.x.x || 2.x.x",
|
||||
"@reduxjs/toolkit": "^1.9.0 || 2.x.x",
|
||||
"clsx": "^2.1.1",
|
||||
"decimal.js-light": "^2.5.1",
|
||||
"es-toolkit": "^1.39.3",
|
||||
@@ -1977,8 +1969,7 @@
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
|
||||
"integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/redux-thunk": {
|
||||
"version": "3.1.0",
|
||||
@@ -2092,7 +2083,6 @@
|
||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
||||
"devOptional": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@@ -2176,7 +2166,6 @@
|
||||
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.25.0",
|
||||
"fdir": "^6.4.4",
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
"react": "^19.2.3",
|
||||
"react-dom": "^19.2.3",
|
||||
"react-i18next": "^16.5.4",
|
||||
"recharts": "^3.7.0"
|
||||
"recharts": "^3.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.14.0",
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.0001 7.5C15.2717 7.50006 15.5359 7.58858 15.7527 7.75216C15.9695 7.91575 16.1271 8.14551 16.2017 8.40667L17.5567 13.15C17.8485 14.1715 18.3958 15.1018 19.147 15.853C19.8982 16.6043 20.8285 17.1516 21.8501 17.4433L26.5934 18.7983C26.8544 18.8731 27.084 19.0308 27.2474 19.2476C27.4108 19.4644 27.4992 19.7285 27.4992 20C27.4992 20.2715 27.4108 20.5356 27.2474 20.7524C27.084 20.9692 26.8544 21.1269 26.5934 21.2017L21.8501 22.5567C20.8285 22.8484 19.8982 23.3957 19.147 24.147C18.3958 24.8982 17.8485 25.8285 17.5567 26.85L16.2017 31.5933C16.127 31.8543 15.9693 32.0839 15.7525 32.2473C15.5357 32.4107 15.2716 32.4991 15.0001 32.4991C14.7286 32.4991 14.4645 32.4107 14.2477 32.2473C14.0309 32.0839 13.8732 31.8543 13.7984 31.5933L12.4434 26.85C12.1517 25.8285 11.6043 24.8982 10.8531 24.147C10.1019 23.3957 9.17161 22.8484 8.15008 22.5567L3.40674 21.2017C3.14575 21.1269 2.91619 20.9692 2.75278 20.7524C2.58937 20.5356 2.50098 20.2715 2.50098 20C2.50098 19.7285 2.58937 19.4644 2.75278 19.2476C2.91619 19.0308 3.14575 18.8731 3.40674 18.7983L8.15008 17.4433C9.17161 17.1516 10.1019 16.6043 10.8531 15.853C11.6043 15.1018 12.1517 14.1715 12.4434 13.15L13.7984 8.40667C13.873 8.14551 14.0306 7.91575 14.2475 7.75216C14.4643 7.58858 14.7285 7.50006 15.0001 7.5ZM30.0001 2.5C30.2789 2.49984 30.5498 2.59294 30.7697 2.76448C30.9896 2.93601 31.1457 3.17614 31.2134 3.44667L31.6434 5.17333C32.0367 6.74 33.2601 7.96333 34.8267 8.35667L36.5534 8.78667C36.8245 8.8538 37.0652 9.00976 37.2373 9.22967C37.4094 9.44957 37.5029 9.72077 37.5029 10C37.5029 10.2792 37.4094 10.5504 37.2373 10.7703C37.0652 10.9902 36.8245 11.1462 36.5534 11.2133L34.8267 11.6433C33.2601 12.0367 32.0367 13.26 31.6434 14.8267L31.2134 16.5533C31.1463 16.8244 30.9903 17.0651 30.7704 17.2372C30.5505 17.4093 30.2793 17.5028 30.0001 17.5028C29.7208 17.5028 29.4496 17.4093 29.2297 17.2372C29.0098 17.0651 28.8539 16.8244 28.7867 16.5533L28.3567 14.8267C28.1644 14.0574 27.7667 13.3548 27.2059 12.7941C26.6452 12.2334 25.9427 11.8356 25.1734 11.6433L23.4467 11.2133C23.1757 11.1462 22.9349 10.9902 22.7629 10.7703C22.5908 10.5504 22.4973 10.2792 22.4973 10C22.4973 9.72077 22.5908 9.44957 22.7629 9.22967C22.9349 9.00976 23.1757 8.8538 23.4467 8.78667L25.1734 8.35667C25.9427 8.16435 26.6452 7.76658 27.2059 7.20587C27.7667 6.64517 28.1644 5.94262 28.3567 5.17333L28.7867 3.44667C28.8544 3.17614 29.0106 2.93601 29.2305 2.76448C29.4503 2.59294 29.7212 2.49984 30.0001 2.5ZM27.5001 25C27.7626 24.9999 28.0185 25.0824 28.2315 25.2358C28.4445 25.3893 28.6038 25.6059 28.6867 25.855L29.3434 27.8267C29.5934 28.5717 30.1767 29.1583 30.9234 29.4067L32.8951 30.065C33.1434 30.1484 33.3592 30.3076 33.5121 30.5202C33.665 30.7328 33.7472 30.9881 33.7472 31.25C33.7472 31.5119 33.665 31.7672 33.5121 31.9798C33.3592 32.1924 33.1434 32.3517 32.8951 32.435L30.9234 33.0933C30.1784 33.3433 29.5917 33.9267 29.3434 34.6733L28.6851 36.645C28.6017 36.8933 28.4425 37.1091 28.2299 37.262C28.0172 37.4149 27.762 37.4972 27.5001 37.4972C27.2382 37.4972 26.9829 37.4149 26.7703 37.262C26.5577 37.1091 26.3984 36.8933 26.3151 36.645L25.6567 34.6733C25.534 34.3055 25.3273 33.9712 25.0531 33.697C24.7789 33.4228 24.4446 33.2161 24.0767 33.0933L22.1051 32.435C21.8568 32.3517 21.641 32.1924 21.4881 31.9798C21.3352 31.7672 21.2529 31.5119 21.2529 31.25C21.2529 30.9881 21.3352 30.7328 21.4881 30.5202C21.641 30.3076 21.8568 30.1484 22.1051 30.065L24.0767 29.4067C24.8217 29.1567 25.4084 28.5733 25.6567 27.8267L26.3151 25.855C26.3979 25.6062 26.557 25.3898 26.7696 25.2363C26.9823 25.0829 27.2378 25.0002 27.5001 25Z" fill="#DFC7FD"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
@@ -1,3 +1,21 @@
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.0001 7.5C15.2717 7.50006 15.5359 7.58858 15.7527 7.75216C15.9695 7.91575 16.1271 8.14551 16.2017 8.40667L17.5567 13.15C17.8485 14.1715 18.3958 15.1018 19.147 15.853C19.8982 16.6043 20.8285 17.1516 21.8501 17.4433L26.5934 18.7983C26.8544 18.8731 27.084 19.0308 27.2474 19.2476C27.4108 19.4644 27.4992 19.7285 27.4992 20C27.4992 20.2715 27.4108 20.5356 27.2474 20.7524C27.084 20.9692 26.8544 21.1269 26.5934 21.2017L21.8501 22.5567C20.8285 22.8484 19.8982 23.3957 19.147 24.147C18.3958 24.8982 17.8485 25.8285 17.5567 26.85L16.2017 31.5933C16.127 31.8543 15.9693 32.0839 15.7525 32.2473C15.5357 32.4107 15.2716 32.4991 15.0001 32.4991C14.7286 32.4991 14.4645 32.4107 14.2477 32.2473C14.0309 32.0839 13.8732 31.8543 13.7984 31.5933L12.4434 26.85C12.1517 25.8285 11.6043 24.8982 10.8531 24.147C10.1019 23.3957 9.17161 22.8484 8.15008 22.5567L3.40674 21.2017C3.14575 21.1269 2.91619 20.9692 2.75278 20.7524C2.58937 20.5356 2.50098 20.2715 2.50098 20C2.50098 19.7285 2.58937 19.4644 2.75278 19.2476C2.91619 19.0308 3.14575 18.8731 3.40674 18.7983L8.15008 17.4433C9.17161 17.1516 10.1019 16.6043 10.8531 15.853C11.6043 15.1018 12.1517 14.1715 12.4434 13.15L13.7984 8.40667C13.873 8.14551 14.0306 7.91575 14.2475 7.75216C14.4643 7.58858 14.7285 7.50006 15.0001 7.5ZM30.0001 2.5C30.2789 2.49984 30.5498 2.59294 30.7697 2.76448C30.9896 2.93601 31.1457 3.17614 31.2134 3.44667L31.6434 5.17333C32.0367 6.74 33.2601 7.96333 34.8267 8.35667L36.5534 8.78667C36.8245 8.8538 37.0652 9.00976 37.2373 9.22967C37.4094 9.44957 37.5029 9.72077 37.5029 10C37.5029 10.2792 37.4094 10.5504 37.2373 10.7703C37.0652 10.9902 36.8245 11.1462 36.5534 11.2133L34.8267 11.6433C33.2601 12.0367 32.0367 13.26 31.6434 14.8267L31.2134 16.5533C31.1463 16.8244 30.9903 17.0651 30.7704 17.2372C30.5505 17.4093 30.2793 17.5028 30.0001 17.5028C29.7208 17.5028 29.4496 17.4093 29.2297 17.2372C29.0098 17.0651 28.8539 16.8244 28.7867 16.5533L28.3567 14.8267C28.1644 14.0574 27.7667 13.3548 27.2059 12.7941C26.6452 12.2334 25.9427 11.8356 25.1734 11.6433L23.4467 11.2133C23.1757 11.1462 22.9349 10.9902 22.7629 10.7703C22.5908 10.5504 22.4973 10.2792 22.4973 10C22.4973 9.72077 22.5908 9.44957 22.7629 9.22967C22.9349 9.00976 23.1757 8.8538 23.4467 8.78667L25.1734 8.35667C25.9427 8.16435 26.6452 7.76658 27.2059 7.20587C27.7667 6.64517 28.1644 5.94262 28.3567 5.17333L28.7867 3.44667C28.8544 3.17614 29.0106 2.93601 29.2305 2.76448C29.4503 2.59294 29.7212 2.49984 30.0001 2.5ZM27.5001 25C27.7626 24.9999 28.0185 25.0824 28.2315 25.2358C28.4445 25.3893 28.6038 25.6059 28.6867 25.855L29.3434 27.8267C29.5934 28.5717 30.1767 29.1583 30.9234 29.4067L32.8951 30.065C33.1434 30.1484 33.3592 30.3076 33.5121 30.5202C33.665 30.7328 33.7472 30.9881 33.7472 31.25C33.7472 31.5119 33.665 31.7672 33.5121 31.9798C33.3592 32.1924 33.1434 32.3517 32.8951 32.435L30.9234 33.0933C30.1784 33.3433 29.5917 33.9267 29.3434 34.6733L28.6851 36.645C28.6017 36.8933 28.4425 37.1091 28.2299 37.262C28.0172 37.4149 27.762 37.4972 27.5001 37.4972C27.2382 37.4972 26.9829 37.4149 26.7703 37.262C26.5577 37.1091 26.3984 36.8933 26.3151 36.645L25.6567 34.6733C25.534 34.3055 25.3273 33.9712 25.0531 33.697C24.7789 33.4228 24.4446 33.2161 24.0767 33.0933L22.1051 32.435C21.8568 32.3517 21.641 32.1924 21.4881 31.9798C21.3352 31.7672 21.2529 31.5119 21.2529 31.25C21.2529 30.9881 21.3352 30.7328 21.4881 30.5202C21.641 30.3076 21.8568 30.1484 22.1051 30.065L24.0767 29.4067C24.8217 29.1567 25.4084 28.5733 25.6567 27.8267L26.3151 25.855C26.3979 25.6062 26.557 25.3898 26.7696 25.2363C26.9823 25.0829 27.2378 25.0002 27.5001 25Z" fill="#DFC7FD"/>
|
||||
<svg width="118" height="118" viewBox="0 0 118 118" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g filter="url(#filter0_d_2381_2707)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M48.9982 30C49.5414 30.0001 50.0698 30.1771 50.5034 30.5043C50.9371 30.8315 51.2523 31.291 51.4015 31.8133L54.1115 41.3C54.695 43.3431 55.7897 45.2037 57.2921 46.7061C58.7945 48.2085 60.6551 49.3032 62.6982 49.8867L72.1849 52.5967C72.7068 52.7462 73.166 53.0616 73.4928 53.4952C73.8196 53.9288 73.9964 54.457 73.9964 55C73.9964 55.543 73.8196 56.0712 73.4928 56.5048C73.166 56.9384 72.7068 57.2538 72.1849 57.4033L62.6982 60.1133C60.6551 60.6968 58.7945 61.7915 57.2921 63.2939C55.7897 64.7963 54.695 66.6569 54.1115 68.7L51.4015 78.1867C51.252 78.7086 50.9366 79.1678 50.503 79.4946C50.0694 79.8214 49.5412 79.9982 48.9982 79.9982C48.4552 79.9982 47.927 79.8214 47.4934 79.4946C47.0598 79.1678 46.7444 78.7086 46.5949 78.1867L43.8849 68.7C43.3014 66.6569 42.2067 64.7963 40.7043 63.2939C39.2019 61.7915 37.3413 60.6968 35.2982 60.1133L25.8115 57.4033C25.2895 57.2538 24.8304 56.9384 24.5036 56.5048C24.1768 56.0712 24 55.543 24 55C24 54.457 24.1768 53.9288 24.5036 53.4952C24.8304 53.0616 25.2895 52.7462 25.8115 52.5967L35.2982 49.8867C37.3413 49.3032 39.2019 48.2085 40.7043 46.7061C42.2067 45.2037 43.3014 43.3431 43.8849 41.3L46.5949 31.8133C46.7441 31.291 47.0593 30.8315 47.493 30.5043C47.9266 30.1771 48.455 30.0001 48.9982 30ZM78.9982 20C79.5559 19.9997 80.0977 20.1859 80.5374 20.529C80.9771 20.872 81.2895 21.3523 81.4249 21.8933L82.2849 25.3467C83.0715 28.48 85.5182 30.9267 88.6515 31.7133L92.1049 32.5733C92.6469 32.7076 93.1285 33.0195 93.4726 33.4593C93.8168 33.8991 94.0038 34.4415 94.0038 35C94.0038 35.5585 93.8168 36.1009 93.4726 36.5407C93.1285 36.9805 92.6469 37.2924 92.1049 37.4267L88.6515 38.2867C85.5182 39.0733 83.0715 41.52 82.2849 44.6533L81.4249 48.1067C81.2906 48.6488 80.9787 49.1303 80.5389 49.4744C80.099 49.8186 79.5567 50.0056 78.9982 50.0056C78.4397 50.0056 77.8973 49.8186 77.4575 49.4744C77.0177 49.1303 76.7058 48.6488 76.5715 48.1067L75.7115 44.6533C75.3269 43.1148 74.5314 41.7097 73.4099 40.5882C72.2885 39.4668 70.8834 38.6713 69.3449 38.2867L65.8915 37.4267C65.3494 37.2924 64.8679 36.9805 64.5238 36.5407C64.1796 36.1009 63.9926 35.5585 63.9926 35C63.9926 34.4415 64.1796 33.8991 64.5238 33.4593C64.8679 33.0195 65.3494 32.7076 65.8915 32.5733L69.3449 31.7133C70.8834 31.3287 72.2885 30.5332 73.4099 29.4117C74.5314 28.2903 75.3269 26.8852 75.7115 25.3467L76.5715 21.8933C76.7069 21.3523 77.0192 20.872 77.459 20.529C77.8987 20.1859 78.4405 19.9997 78.9982 20ZM73.9982 65C74.5232 64.9997 75.0351 65.1647 75.4611 65.4716C75.8871 65.7786 76.2056 66.2118 76.3715 66.71L77.6849 70.6533C78.1849 72.1433 79.3515 73.3167 80.8449 73.8133L84.7882 75.13C85.2847 75.2967 85.7164 75.6152 86.0222 76.0404C86.328 76.4656 86.4925 76.9762 86.4925 77.5C86.4925 78.0238 86.328 78.5343 86.0222 78.9596C85.7164 79.3848 85.2847 79.7033 84.7882 79.87L80.8449 81.1867C79.3549 81.6867 78.1815 82.8533 77.6849 84.3467L76.3682 88.29C76.2015 88.7865 75.883 89.2182 75.4578 89.524C75.0325 89.8298 74.522 89.9943 73.9982 89.9943C73.4744 89.9943 72.9638 89.8298 72.5386 89.524C72.1133 89.2182 71.7949 88.7865 71.6282 88.29L70.3115 84.3467C70.066 83.6109 69.6527 82.9424 69.1042 82.394C68.5558 81.8455 67.8873 81.4322 67.1515 81.1867L63.2082 79.87C62.7116 79.7033 62.28 79.3848 61.9742 78.9596C61.6684 78.5343 61.5039 78.0238 61.5039 77.5C61.5039 76.9762 61.6684 76.4656 61.9742 76.0404C62.28 75.6152 62.7116 75.2967 63.2082 75.13L67.1515 73.8133C68.6415 73.3133 69.8149 72.1467 70.3115 70.6533L71.6282 66.71C71.7939 66.2124 72.112 65.7795 72.5373 65.4726C72.9626 65.1657 73.4737 65.0004 73.9982 65Z" fill="url(#paint0_linear_2381_2707)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_d_2381_2707" x="0" y="0" width="118.004" height="117.994" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
||||
<feOffset dy="4"/>
|
||||
<feGaussianBlur stdDeviation="12"/>
|
||||
<feComposite in2="hardAlpha" operator="out"/>
|
||||
<feColorMatrix type="matrix" values="0 0 0 0 0.682353 0 0 0 0 0.447059 0 0 0 0 0.976471 0 0 0 0.4 0"/>
|
||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2381_2707"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2381_2707" result="shape"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_2381_2707" x1="59.0019" y1="89.9943" x2="59.0019" y2="20" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#A65EFF"/>
|
||||
<stop offset="1" stop-color="#EFE3FE"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.6 KiB |
+12
-10
@@ -135,19 +135,15 @@ const App: React.FC = () => {
|
||||
url.searchParams.delete('refresh_token');
|
||||
window.history.replaceState({}, document.title, url.pathname);
|
||||
|
||||
// 로그인 성공 - 분석 데이터 유무에 따라 분기
|
||||
// 비로그인 상태에서 URL 입력 후 브랜드 분석을 본 경우 → 바로 generation_flow로 (URL 입력 스킵)
|
||||
// 홈에서 바로 로그인한 경우 → generation_flow로 (URL 입력 필요)
|
||||
const savedData = localStorage.getItem(ANALYSIS_DATA_KEY);
|
||||
if (savedData) {
|
||||
// 분석 데이터가 있으면 바로 에셋 관리로
|
||||
setInitialTab('새 프로젝트 만들기');
|
||||
setViewMode('generation_flow');
|
||||
} else {
|
||||
// 분석 데이터가 없으면 URL 입력부터 시작하도록 generation_flow로
|
||||
setInitialTab('새 프로젝트 만들기');
|
||||
setViewMode('generation_flow');
|
||||
// 분석 데이터가 있으면 에셋 관리(step 1)부터 시작
|
||||
// 이전에 저장된 wizard step이 URL 입력(-2) 등으로 남아있을 수 있으므로 초기화
|
||||
localStorage.removeItem('castad_wizard_step');
|
||||
localStorage.removeItem('castad_active_item');
|
||||
}
|
||||
setInitialTab('새 프로젝트 만들기');
|
||||
setViewMode('generation_flow');
|
||||
} catch (err) {
|
||||
console.error('Token callback failed:', err);
|
||||
alert(t('app.loginFailed'));
|
||||
@@ -335,6 +331,12 @@ const App: React.FC = () => {
|
||||
const handleToLogin = async () => {
|
||||
// 이미 로그인된 상태면 바로 generation_flow로 이동
|
||||
if (isLoggedIn()) {
|
||||
// 분석 데이터가 있으면 이전 wizard step 초기화 (에셋 관리부터 시작하도록)
|
||||
const savedData = localStorage.getItem(ANALYSIS_DATA_KEY);
|
||||
if (savedData) {
|
||||
localStorage.removeItem('castad_wizard_step');
|
||||
localStorage.removeItem('castad_active_item');
|
||||
}
|
||||
setInitialTab('새 프로젝트 만들기');
|
||||
setViewMode('generation_flow');
|
||||
return;
|
||||
|
||||
@@ -8,10 +8,11 @@ const Footer: React.FC = () => {
|
||||
<footer className="landing-footer">
|
||||
<div className="footer-content">
|
||||
<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>
|
||||
</div>
|
||||
<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.headquarters')}</p>
|
||||
<p className="footer-info">{t('footer.researchCenter')}</p>
|
||||
|
||||
@@ -82,7 +82,8 @@ 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.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: '내 콘텐츠', 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: 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> },
|
||||
];
|
||||
|
||||
|
||||
@@ -26,6 +26,90 @@ const getPlatformIcon = (platform: string) => {
|
||||
}
|
||||
};
|
||||
|
||||
// 미니 캘린더 컴포넌트
|
||||
const MiniCalendar: React.FC<{
|
||||
selectedDate: Date | null;
|
||||
onSelect: (date: Date) => void;
|
||||
minDate?: Date;
|
||||
}> = ({ selectedDate, onSelect, minDate }) => {
|
||||
const today = new Date();
|
||||
const [viewYear, setViewYear] = useState(selectedDate?.getFullYear() ?? today.getFullYear());
|
||||
const [viewMonth, setViewMonth] = useState(selectedDate?.getMonth() ?? today.getMonth());
|
||||
|
||||
const DAY_LABELS = ['일', '월', '화', '수', '목', '금', '토'];
|
||||
|
||||
const firstDay = new Date(viewYear, viewMonth, 1).getDay();
|
||||
const daysInMonth = new Date(viewYear, viewMonth + 1, 0).getDate();
|
||||
const daysInPrevMonth = new Date(viewYear, viewMonth, 0).getDate();
|
||||
|
||||
const cells: { date: Date; currentMonth: boolean }[] = [];
|
||||
for (let i = firstDay - 1; i >= 0; i--) {
|
||||
cells.push({ date: new Date(viewYear, viewMonth - 1, daysInPrevMonth - i), currentMonth: false });
|
||||
}
|
||||
for (let d = 1; d <= daysInMonth; d++) {
|
||||
cells.push({ date: new Date(viewYear, viewMonth, d), currentMonth: true });
|
||||
}
|
||||
while (cells.length % 7 !== 0) {
|
||||
cells.push({ date: new Date(viewYear, viewMonth + 1, cells.length - daysInMonth - firstDay + 1), currentMonth: false });
|
||||
}
|
||||
|
||||
const isSameDay = (a: Date, b: Date) =>
|
||||
a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
||||
|
||||
const isDisabled = (date: Date) => {
|
||||
if (!minDate) return false;
|
||||
const min = new Date(minDate); min.setHours(0,0,0,0);
|
||||
const d = new Date(date); d.setHours(0,0,0,0);
|
||||
return d < min;
|
||||
};
|
||||
|
||||
const prevMonth = () => {
|
||||
if (viewMonth === 0) { setViewYear(y => y - 1); setViewMonth(11); }
|
||||
else setViewMonth(m => m - 1);
|
||||
};
|
||||
const nextMonth = () => {
|
||||
if (viewMonth === 11) { setViewYear(y => y + 1); setViewMonth(0); }
|
||||
else setViewMonth(m => m + 1);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="mini-calendar">
|
||||
<div className="mini-calendar-header">
|
||||
<button type="button" className="mini-calendar-nav" onClick={prevMonth}>‹</button>
|
||||
<span className="mini-calendar-title">{viewYear}년 {viewMonth + 1}월</span>
|
||||
<button type="button" className="mini-calendar-nav" onClick={nextMonth}>›</button>
|
||||
</div>
|
||||
<div className="mini-calendar-grid">
|
||||
{DAY_LABELS.map(d => (
|
||||
<div key={d} className="mini-calendar-day-label">{d}</div>
|
||||
))}
|
||||
{cells.map((cell, i) => {
|
||||
const disabled = isDisabled(cell.date);
|
||||
const isSelected = selectedDate ? isSameDay(cell.date, selectedDate) : false;
|
||||
const isToday = isSameDay(cell.date, today);
|
||||
return (
|
||||
<button
|
||||
key={i}
|
||||
type="button"
|
||||
disabled={disabled}
|
||||
className={[
|
||||
'mini-calendar-cell',
|
||||
cell.currentMonth ? '' : 'other-month',
|
||||
isSelected ? 'selected' : '',
|
||||
isToday && !isSelected ? 'today' : '',
|
||||
disabled ? 'disabled' : '',
|
||||
].join(' ')}
|
||||
onClick={() => !disabled && onSelect(cell.date)}
|
||||
>
|
||||
{cell.date.getDate()}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
isOpen,
|
||||
onClose,
|
||||
@@ -39,11 +123,16 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
const [tags, setTags] = useState('');
|
||||
const [privacy, setPrivacy] = useState<PrivacyType>('public');
|
||||
const [publishTime, setPublishTime] = useState<PublishTimeType>('now');
|
||||
const [scheduledDate, setScheduledDate] = useState<Date | null>(null);
|
||||
const [scheduledHour, setScheduledHour] = useState<number>(12);
|
||||
const [scheduledMinute, setScheduledMinute] = useState<number>(0);
|
||||
const [isLoadingAccounts, setIsLoadingAccounts] = useState(false);
|
||||
const [isPosting, setIsPosting] = useState(false);
|
||||
const [isChannelDropdownOpen, setIsChannelDropdownOpen] = useState(false);
|
||||
const [isPrivacyDropdownOpen, setIsPrivacyDropdownOpen] = useState(false);
|
||||
const [isLoadingAutoDescription, setIsLoadingAutoDescription] = 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 privacyDropdownRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
@@ -72,17 +161,21 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
return () => document.removeEventListener('mousedown', handleClickOutside);
|
||||
}, []);
|
||||
|
||||
// 모달 열릴 때 배경 스크롤 차단
|
||||
useEffect(() => {
|
||||
if (isOpen) {
|
||||
document.body.style.overflow = 'hidden';
|
||||
} else {
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
return () => { document.body.style.overflow = ''; };
|
||||
}, [isOpen]);
|
||||
|
||||
// 소셜 계정 로드
|
||||
useEffect(() => {
|
||||
if (isOpen) {
|
||||
loadSocialAccounts();
|
||||
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]);
|
||||
|
||||
@@ -137,6 +230,20 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
return;
|
||||
}
|
||||
|
||||
if (publishTime === 'schedule' && !scheduledDate) {
|
||||
alert('게시 날짜를 선택해주세요.');
|
||||
return;
|
||||
}
|
||||
|
||||
if (publishTime === 'schedule' && scheduledDate) {
|
||||
const dt = new Date(scheduledDate);
|
||||
dt.setHours(scheduledHour, scheduledMinute, 0, 0);
|
||||
if (dt <= new Date()) {
|
||||
alert('현재 시각 이후의 시간을 선택해주세요.');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const selectedAcc = socialAccounts.find(acc => acc.platform_user_id === selectedChannel);
|
||||
if (!selectedAcc) {
|
||||
alert(t('social.selectChannel'));
|
||||
@@ -170,6 +277,15 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
.filter(tag => tag.length > 0);
|
||||
|
||||
// Request payload 로그
|
||||
let scheduledAt: string | null = null;
|
||||
if (publishTime === 'schedule' && scheduledDate) {
|
||||
const dt = new Date(scheduledDate);
|
||||
dt.setHours(scheduledHour, scheduledMinute, 0, 0);
|
||||
// 로컬 시간 기준으로 전송 (Z 없이)
|
||||
const pad = (n: number) => String(n).padStart(2, '0');
|
||||
scheduledAt = `${dt.getFullYear()}-${pad(dt.getMonth()+1)}-${pad(dt.getDate())}T${pad(dt.getHours())}:${pad(dt.getMinutes())}:00`;
|
||||
}
|
||||
|
||||
const requestPayload = {
|
||||
video_id: video.video_id,
|
||||
social_account_id: selectedAcc.id,
|
||||
@@ -177,7 +293,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
description: description.trim(),
|
||||
tags: tagsArray,
|
||||
privacy_status: privacy,
|
||||
scheduled_at: publishTime === 'now' ? null : null,
|
||||
scheduled_at: scheduledAt,
|
||||
};
|
||||
console.log('[Upload] Request payload:', requestPayload);
|
||||
|
||||
@@ -188,23 +304,31 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
throw new Error(uploadResponse.message || t('social.uploadStartFailed'));
|
||||
}
|
||||
|
||||
// Poll for upload completion
|
||||
const result = await waitForUploadComplete(
|
||||
uploadResponse.upload_id,
|
||||
(status, progress) => {
|
||||
setUploadStatus(status as UploadStatus);
|
||||
setUploadProgress(progress || 0);
|
||||
}
|
||||
);
|
||||
if (publishTime === 'schedule') {
|
||||
// 예약 업로드: 폴링 없이 바로 완료 처리
|
||||
setUploadStatus('completed');
|
||||
setUploadProgress(100);
|
||||
onClose();
|
||||
resetForm();
|
||||
} else {
|
||||
// 즉시 업로드: 완료될 때까지 폴링
|
||||
const result = await waitForUploadComplete(
|
||||
uploadResponse.upload_id,
|
||||
(status, progress) => {
|
||||
setUploadStatus(status as UploadStatus);
|
||||
setUploadProgress(progress || 0);
|
||||
}
|
||||
);
|
||||
|
||||
// Upload completed successfully
|
||||
setUploadStatus('completed');
|
||||
setUploadProgress(100);
|
||||
setUploadYoutubeUrl(result.platform_url);
|
||||
// Upload completed successfully
|
||||
setUploadStatus('completed');
|
||||
setUploadProgress(100);
|
||||
setUploadYoutubeUrl(result.platform_url);
|
||||
|
||||
// Close the posting modal (keep progress modal open)
|
||||
onClose();
|
||||
resetForm();
|
||||
// Close the posting modal (keep progress modal open)
|
||||
onClose();
|
||||
resetForm();
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof TokenExpiredError) {
|
||||
setShowUploadProgress(false);
|
||||
@@ -226,6 +350,9 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
setTags('');
|
||||
setPrivacy('public');
|
||||
setPublishTime('now');
|
||||
setScheduledDate(null);
|
||||
setScheduledHour(12);
|
||||
setScheduledMinute(0);
|
||||
setSelectedChannel('');
|
||||
setIsChannelDropdownOpen(false);
|
||||
setIsPrivacyDropdownOpen(false);
|
||||
@@ -267,6 +394,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
channelName={uploadChannelName || selectedAccount?.display_name || ''}
|
||||
youtubeUrl={uploadYoutubeUrl}
|
||||
errorMessage={uploadErrorMessage}
|
||||
isScheduled={publishTime === 'schedule'}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -297,9 +425,14 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
<div className="social-posting-video-container">
|
||||
<video
|
||||
src={video.result_movie_url}
|
||||
className="social-posting-video"
|
||||
className={`social-posting-video ${isHorizontalVideo ? 'horizontal' : 'vertical'}`}
|
||||
controls
|
||||
playsInline
|
||||
onLoadedMetadata={(e) => {
|
||||
const v = e.currentTarget;
|
||||
setIsHorizontalVideo(v.videoWidth > v.videoHeight);
|
||||
setVideoMeta({ width: v.videoWidth, height: v.videoHeight, duration: v.duration });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -307,16 +440,20 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
{/* Right: Form */}
|
||||
<div className="social-posting-form">
|
||||
{/* 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-add-btn">+</span>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className="social-posting-video-meta">
|
||||
<p className="social-posting-video-title">
|
||||
{video.store_name} {new Date(video.created_at).toLocaleString('ko-KR')}
|
||||
</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>
|
||||
|
||||
{/* Channel Selector - Custom Dropdown */}
|
||||
@@ -491,11 +628,105 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
value="schedule"
|
||||
checked={publishTime === 'schedule'}
|
||||
onChange={() => setPublishTime('schedule')}
|
||||
disabled
|
||||
/>
|
||||
<span className="radio-label disabled">{t('social.publishSchedule')}</span>
|
||||
<span className="radio-label">{t('social.publishSchedule')}</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{/* 시간 설정 UI */}
|
||||
{publishTime === 'schedule' && (() => {
|
||||
const now = new Date();
|
||||
const isTodaySelected = scheduledDate
|
||||
? scheduledDate.getFullYear() === now.getFullYear() &&
|
||||
scheduledDate.getMonth() === now.getMonth() &&
|
||||
scheduledDate.getDate() === now.getDate()
|
||||
: false;
|
||||
|
||||
// 오늘 선택 시: 현재 시각 기준으로 선택 가능한 최소 시간 계산
|
||||
// 현재 분을 10분 단위 올림하여 최소 분 결정
|
||||
const nowMinute = now.getMinutes();
|
||||
const minMinuteForCurrentHour = Math.ceil((nowMinute + 1) / 10) * 10;
|
||||
const minHour = isTodaySelected
|
||||
? (minMinuteForCurrentHour >= 60 ? now.getHours() + 1 : now.getHours())
|
||||
: 0;
|
||||
|
||||
// 선택된 시간이 오늘 최소 시간보다 작으면 분 옵션 제한
|
||||
const minMinuteForSelectedHour = isTodaySelected && scheduledHour === now.getHours()
|
||||
? minMinuteForCurrentHour >= 60 ? 0 : minMinuteForCurrentHour
|
||||
: 0;
|
||||
|
||||
const handleDateSelect = (date: Date) => {
|
||||
const selectedIsToday =
|
||||
date.getFullYear() === now.getFullYear() &&
|
||||
date.getMonth() === now.getMonth() &&
|
||||
date.getDate() === now.getDate();
|
||||
|
||||
setScheduledDate(date);
|
||||
|
||||
// 오늘을 선택했을 때 현재 설정된 시간이 과거라면 최솟값으로 보정
|
||||
if (selectedIsToday) {
|
||||
const minMin = Math.ceil((now.getMinutes() + 1) / 10) * 10;
|
||||
const minH = minMin >= 60 ? now.getHours() + 1 : now.getHours();
|
||||
const adjMin = minMin >= 60 ? 0 : minMin;
|
||||
if (scheduledHour < minH || (scheduledHour === minH && scheduledMinute < adjMin)) {
|
||||
setScheduledHour(minH);
|
||||
setScheduledMinute(adjMin);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const handleHourChange = (h: number) => {
|
||||
setScheduledHour(h);
|
||||
// 시간 변경 시 분이 과거가 되면 최솟값으로 보정
|
||||
if (isTodaySelected && h === now.getHours()) {
|
||||
const minMin = Math.ceil((now.getMinutes() + 1) / 10) * 10;
|
||||
const adjMin = minMin >= 60 ? 0 : minMin;
|
||||
if (scheduledMinute < adjMin) setScheduledMinute(adjMin);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="schedule-datetime-picker">
|
||||
<MiniCalendar
|
||||
selectedDate={scheduledDate}
|
||||
onSelect={handleDateSelect}
|
||||
minDate={new Date()}
|
||||
/>
|
||||
<div className="schedule-time-picker">
|
||||
<span className="schedule-time-label">시간 설정</span>
|
||||
<div className="schedule-time-selects">
|
||||
<select
|
||||
className="schedule-time-select"
|
||||
value={scheduledHour}
|
||||
onChange={(e) => handleHourChange(Number(e.target.value))}
|
||||
>
|
||||
{Array.from({ length: 24 }, (_, i) => (
|
||||
<option key={i} value={i} disabled={isTodaySelected && i < minHour}>
|
||||
{String(i).padStart(2, '0')}시
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<select
|
||||
className="schedule-time-select"
|
||||
value={scheduledMinute}
|
||||
onChange={(e) => setScheduledMinute(Number(e.target.value))}
|
||||
>
|
||||
{[0, 10, 20, 30, 40, 50].map(m => (
|
||||
<option key={m} value={m} disabled={isTodaySelected && m < minMinuteForSelectedHour}>
|
||||
{String(m).padStart(2, '0')}분
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
{scheduledDate && (
|
||||
<p className="schedule-datetime-preview">
|
||||
{scheduledDate.getFullYear()}.{String(scheduledDate.getMonth()+1).padStart(2,'0')}.{String(scheduledDate.getDate()).padStart(2,'0')} {String(scheduledHour).padStart(2,'0')}:{String(scheduledMinute).padStart(2,'0')} 예약
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})()}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -516,7 +747,12 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
||||
<button
|
||||
className="social-posting-btn submit"
|
||||
onClick={handlePost}
|
||||
disabled={isPosting || socialAccounts.length === 0 || !title.trim()}
|
||||
disabled={
|
||||
isPosting ||
|
||||
socialAccounts.length === 0 ||
|
||||
!title.trim() ||
|
||||
(publishTime === 'schedule' && !scheduledDate)
|
||||
}
|
||||
>
|
||||
{isPosting ? t('social.posting') : t('social.post')}
|
||||
</button>
|
||||
|
||||
@@ -13,6 +13,7 @@ interface UploadProgressModalProps {
|
||||
channelName: string;
|
||||
youtubeUrl?: string;
|
||||
errorMessage?: string;
|
||||
isScheduled?: boolean;
|
||||
}
|
||||
|
||||
const UploadProgressModal: React.FC<UploadProgressModalProps> = ({
|
||||
@@ -24,6 +25,7 @@ const UploadProgressModal: React.FC<UploadProgressModalProps> = ({
|
||||
channelName,
|
||||
youtubeUrl,
|
||||
errorMessage,
|
||||
isScheduled = false,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
if (!isOpen) return null;
|
||||
@@ -35,7 +37,7 @@ const UploadProgressModal: React.FC<UploadProgressModalProps> = ({
|
||||
case 'uploading':
|
||||
return t('upload.statusUploading');
|
||||
case 'completed':
|
||||
return t('upload.statusCompleted');
|
||||
return isScheduled ? t('upload.statusScheduled') : t('upload.statusCompleted');
|
||||
case 'failed':
|
||||
return t('upload.statusFailed');
|
||||
default:
|
||||
@@ -83,7 +85,7 @@ const UploadProgressModal: React.FC<UploadProgressModalProps> = ({
|
||||
<div className="upload-progress-modal">
|
||||
{/* Header */}
|
||||
<div className="upload-progress-header">
|
||||
<h2 className="upload-progress-title">{t('upload.title')}</h2>
|
||||
<h2 className="upload-progress-title">{isScheduled && status === 'completed' ? t('upload.titleScheduled') : t('upload.title')}</h2>
|
||||
{canClose && (
|
||||
<button className="upload-progress-close" onClick={onClose}>
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
|
||||
+9
-1
@@ -16,6 +16,7 @@
|
||||
"logout": "Log Out"
|
||||
},
|
||||
"footer": {
|
||||
"company":"O2O Inc.",
|
||||
"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",
|
||||
"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": {
|
||||
"title": "Social Media Posting",
|
||||
"postNumber": "Post 1",
|
||||
"videoSpecs": "1080x1920 · 10 sec",
|
||||
"videoSpecs": "720x1280 · 1:01",
|
||||
"channelLabel": "Post Channel",
|
||||
"loadingAccounts": "Loading accounts...",
|
||||
"noAccounts": "No connected social accounts.",
|
||||
@@ -60,9 +61,11 @@
|
||||
},
|
||||
"upload": {
|
||||
"title": "YouTube Upload",
|
||||
"titleScheduled": "YouTube Schedule",
|
||||
"statusPending": "Preparing upload...",
|
||||
"statusUploading": "Uploading...",
|
||||
"statusCompleted": "Upload complete!",
|
||||
"statusScheduled": "Scheduled!",
|
||||
"statusFailed": "Upload failed",
|
||||
"statusDefault": "Processing...",
|
||||
"videoTitleLabel": "Video Title",
|
||||
@@ -127,6 +130,11 @@
|
||||
"imageUpload": "Image Upload",
|
||||
"dragAndDrop": "Drag and drop\nimages to upload",
|
||||
"videoRatio": "Video Ratio",
|
||||
"minImages": "Min. 5 images",
|
||||
"youtubeShorts": "YouTube Shorts",
|
||||
"youtubeVideo": "YouTube Video",
|
||||
"back": "Go Back",
|
||||
"loadMore": "Load more",
|
||||
"uploadFailed": "Image upload failed.",
|
||||
"uploading": "Uploading...",
|
||||
"nextStep": "Next Step"
|
||||
|
||||
+13
-5
@@ -16,6 +16,7 @@
|
||||
"logout": "로그아웃"
|
||||
},
|
||||
"footer": {
|
||||
"company":"㈜에이아이오투오",
|
||||
"businessNumber": "사업자 등록번호 : 620-87-00810 | 대표 : 안성민",
|
||||
"headquarters": "본사 : 41593 대구광역시 북구 옥산로 111, 5층 유니콘랩 대구 A05호",
|
||||
"researchCenter": "연구소 : 13453 경기 성남시 수정구 금토로 32 (금토동) (주)KT 판교빌딩 504호~505호 (East)",
|
||||
@@ -25,7 +26,7 @@
|
||||
"social": {
|
||||
"title": "소셜 미디어 포스팅",
|
||||
"postNumber": "게시물 1",
|
||||
"videoSpecs": "1080x1920 · 10초",
|
||||
"videoSpecs": "720x1280 · 1:01",
|
||||
"channelLabel": "게시 채널",
|
||||
"loadingAccounts": "계정 로딩 중...",
|
||||
"noAccounts": "연결된 소셜 계정이 없습니다.",
|
||||
@@ -42,7 +43,7 @@
|
||||
"privacyPrivate": "비공개",
|
||||
"publishTimeLabel": "게시 시간",
|
||||
"publishNow": "지금 게시",
|
||||
"publishSchedule": "시간 설정 (준비 중)",
|
||||
"publishSchedule": "시간 설정",
|
||||
"footerNote": "",
|
||||
"footerNoteLink": "",
|
||||
"cancel": "취소",
|
||||
@@ -60,9 +61,11 @@
|
||||
},
|
||||
"upload": {
|
||||
"title": "YouTube 업로드",
|
||||
"titleScheduled": "YouTube 예약 등록",
|
||||
"statusPending": "업로드 준비 중...",
|
||||
"statusUploading": "업로드 중...",
|
||||
"statusCompleted": "업로드 완료!",
|
||||
"statusScheduled": "예약 완료!",
|
||||
"statusFailed": "업로드 실패",
|
||||
"statusDefault": "처리 중...",
|
||||
"videoTitleLabel": "영상 제목",
|
||||
@@ -127,6 +130,11 @@
|
||||
"imageUpload": "이미지 업로드",
|
||||
"dragAndDrop": "이미지를 드래그하여\n업로드",
|
||||
"videoRatio": "영상 비율",
|
||||
"minImages": "최소 5장",
|
||||
"youtubeShorts": "유튜브 쇼츠",
|
||||
"youtubeVideo": "유튜브 일반",
|
||||
"back": "뒤로가기",
|
||||
"loadMore": "더보기",
|
||||
"uploadFailed": "이미지 업로드에 실패했습니다.",
|
||||
"uploading": "업로드 중...",
|
||||
"nextStep": "다음 단계"
|
||||
@@ -338,11 +346,11 @@
|
||||
"conceptScalability": "컨셉 확장성",
|
||||
"noInfo": "정보 없음",
|
||||
"marketPositioning": "시장 포지셔닝",
|
||||
"coreValue": "핵심 가치 (Core Value)",
|
||||
"coreValue": "핵심 가치",
|
||||
"categoryDefinition": "카테고리 정의",
|
||||
"targetPersona": "타겟 페르소나",
|
||||
"targetPersona": "주요 고객 유형",
|
||||
"ageSuffix": "세",
|
||||
"sellingPoints": "주요 셀링 포인트 (USP)",
|
||||
"sellingPoints": "주요 셀링 포인트",
|
||||
"recommendedKeywords": "추천 타겟 키워드",
|
||||
"generateContent": "콘텐츠 생성",
|
||||
"pageDescBefore": "을 통해 도출된 ",
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { CrawlingResponse, TargetPersona, SellingPoint } from '../../types/api';
|
||||
import { CrawlingResponse, TargetPersona } from '../../types/api';
|
||||
import { GeometricChart } from './GeometricChart';
|
||||
|
||||
interface AnalysisResultSectionProps {
|
||||
onBack: () => void;
|
||||
@@ -9,200 +10,9 @@ interface AnalysisResultSectionProps {
|
||||
data: CrawlingResponse;
|
||||
}
|
||||
|
||||
// 레이더 차트 컴포넌트
|
||||
interface RadarChartProps {
|
||||
data: SellingPoint[];
|
||||
size?: number;
|
||||
}
|
||||
|
||||
const RadarChart: React.FC<RadarChartProps> = ({ data, size = 360 }) => {
|
||||
const [animatedScores, setAnimatedScores] = useState<number[]>(data.map(() => 0));
|
||||
const [isAnimating, setIsAnimating] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
const targetScores = data.map(item => item.score);
|
||||
const duration = 1500;
|
||||
const startTime = Date.now();
|
||||
|
||||
const animate = () => {
|
||||
const elapsed = Date.now() - startTime;
|
||||
const progress = Math.min(elapsed / duration, 1);
|
||||
const easeProgress = 1 - Math.pow(1 - progress, 3);
|
||||
|
||||
const newScores = targetScores.map(target => target * easeProgress);
|
||||
setAnimatedScores(newScores);
|
||||
|
||||
if (progress < 1) {
|
||||
requestAnimationFrame(animate);
|
||||
} else {
|
||||
setIsAnimating(false);
|
||||
}
|
||||
};
|
||||
|
||||
requestAnimationFrame(animate);
|
||||
}, [data]);
|
||||
|
||||
const padding = 80;
|
||||
const center = size / 2 + padding;
|
||||
const maxRadius = size / 2 - 20;
|
||||
const levels = 5;
|
||||
const angleStep = (2 * Math.PI) / data.length;
|
||||
|
||||
const getPoint = (index: number, score: number) => {
|
||||
const angle = angleStep * index - Math.PI / 2;
|
||||
const radius = (score / 100) * maxRadius;
|
||||
return {
|
||||
x: center + radius * Math.cos(angle),
|
||||
y: center + radius * Math.sin(angle),
|
||||
};
|
||||
};
|
||||
|
||||
const dataPoints = animatedScores.map((score, i) => getPoint(i, score));
|
||||
const dataPath = dataPoints.map((p, i) => (i === 0 ? `M ${p.x} ${p.y}` : `L ${p.x} ${p.y}`)).join(' ') + ' Z';
|
||||
|
||||
const levelPaths = Array.from({ length: levels }, (_, levelIndex) => {
|
||||
const levelRadius = ((levelIndex + 1) / levels) * maxRadius;
|
||||
const points = data.map((_, i) => {
|
||||
const angle = angleStep * i - Math.PI / 2;
|
||||
return {
|
||||
x: center + levelRadius * Math.cos(angle),
|
||||
y: center + levelRadius * Math.sin(angle),
|
||||
};
|
||||
});
|
||||
return points.map((p, i) => (i === 0 ? `M ${p.x} ${p.y}` : `L ${p.x} ${p.y}`)).join(' ') + ' Z';
|
||||
});
|
||||
|
||||
const axisLines = data.map((_, i) => {
|
||||
const angle = angleStep * i - Math.PI / 2;
|
||||
const endX = center + maxRadius * Math.cos(angle);
|
||||
const endY = center + maxRadius * Math.sin(angle);
|
||||
return `M ${center} ${center} L ${endX} ${endY}`;
|
||||
});
|
||||
|
||||
const svgSize = size + padding * 2;
|
||||
|
||||
// 순위별로 정렬하여 라벨 위치에 순위 번호 배치
|
||||
const sortedIndices = [...data]
|
||||
.map((item, i) => ({ index: i, score: item.score }))
|
||||
.sort((a, b) => b.score - a.score)
|
||||
.map((item, rank) => ({ ...item, rank: rank + 1 }));
|
||||
|
||||
const rankMap = new Map<number, number>();
|
||||
sortedIndices.forEach(item => rankMap.set(item.index, item.rank));
|
||||
|
||||
return (
|
||||
<div className="bi2-radar-container">
|
||||
<svg
|
||||
width={svgSize}
|
||||
height={svgSize}
|
||||
viewBox={`0 0 ${svgSize} ${svgSize}`}
|
||||
style={{ overflow: 'visible' }}
|
||||
>
|
||||
{levelPaths.map((path, i) => (
|
||||
<path
|
||||
key={`level-${i}`}
|
||||
d={path}
|
||||
fill="none"
|
||||
stroke="rgba(255,255,255,0.2)"
|
||||
strokeWidth="1"
|
||||
/>
|
||||
))}
|
||||
|
||||
{axisLines.map((path, i) => (
|
||||
<path
|
||||
key={`axis-${i}`}
|
||||
d={path}
|
||||
fill="none"
|
||||
stroke="rgba(255,255,255,0.2)"
|
||||
strokeWidth="1"
|
||||
/>
|
||||
))}
|
||||
|
||||
<path
|
||||
d={dataPath}
|
||||
fill="rgba(45, 212, 191, 0.2)"
|
||||
stroke="#2DD4BF"
|
||||
strokeWidth="2"
|
||||
style={{
|
||||
transition: isAnimating ? 'none' : 'd 0.3s ease-out',
|
||||
}}
|
||||
/>
|
||||
|
||||
{dataPoints.map((point, i) => (
|
||||
<circle
|
||||
key={`point-${i}`}
|
||||
cx={point.x}
|
||||
cy={point.y}
|
||||
r="4"
|
||||
fill="#2DD4BF"
|
||||
stroke="#1A1A2E"
|
||||
strokeWidth="2"
|
||||
/>
|
||||
))}
|
||||
|
||||
{data.map((item, i) => {
|
||||
const angle = angleStep * i - Math.PI / 2;
|
||||
const labelRadius = maxRadius + 40;
|
||||
const pos = {
|
||||
x: center + labelRadius * Math.cos(angle),
|
||||
y: center + labelRadius * Math.sin(angle),
|
||||
};
|
||||
const rank = rankMap.get(i) || i + 1;
|
||||
const isTopThree = rank <= 3;
|
||||
|
||||
return (
|
||||
<g key={`label-${i}`}>
|
||||
<g transform={`translate(${pos.x}, ${pos.y})`}>
|
||||
<rect
|
||||
x="-10"
|
||||
y="-10"
|
||||
width="20"
|
||||
height="20"
|
||||
rx="4"
|
||||
fill={isTopThree ? '#94FBE0' : '#206764'}
|
||||
/>
|
||||
<text
|
||||
x="0"
|
||||
y="0"
|
||||
textAnchor="middle"
|
||||
dominantBaseline="central"
|
||||
style={{
|
||||
fontSize: '12px',
|
||||
fontWeight: 600,
|
||||
fill: isTopThree ? '#002224' : '#94FBE0',
|
||||
fontFamily: 'Pretendard',
|
||||
}}
|
||||
>
|
||||
{rank}
|
||||
</text>
|
||||
<text
|
||||
x="16"
|
||||
y="0"
|
||||
textAnchor="start"
|
||||
dominantBaseline="central"
|
||||
style={{
|
||||
fontSize: '14px',
|
||||
fontWeight: 400,
|
||||
fill: '#E5F1F2',
|
||||
fontFamily: 'Pretendard',
|
||||
}}
|
||||
>
|
||||
{item.korean_category}
|
||||
</text>
|
||||
</g>
|
||||
</g>
|
||||
);
|
||||
})}
|
||||
</svg>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, onGenerate, data }) => {
|
||||
const { t } = useTranslation();
|
||||
const { processed_info, marketing_analysis } = data;
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const [buttonPosition, setButtonPosition] = useState({ left: 0, width: 0 });
|
||||
|
||||
const brandIdentity = marketing_analysis?.brand_identity;
|
||||
const marketPositioning = marketing_analysis?.market_positioning;
|
||||
@@ -213,26 +23,6 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
// 셀링 포인트를 score 내림차순으로 정렬
|
||||
const sortedSellingPoints = [...sellingPoints].sort((a, b) => b.score - a.score);
|
||||
|
||||
useEffect(() => {
|
||||
const updateButtonPosition = () => {
|
||||
if (containerRef.current) {
|
||||
const rect = containerRef.current.getBoundingClientRect();
|
||||
setButtonPosition({ left: rect.left, width: rect.width });
|
||||
}
|
||||
};
|
||||
|
||||
updateButtonPosition();
|
||||
window.addEventListener('resize', updateButtonPosition);
|
||||
|
||||
const observer = new MutationObserver(updateButtonPosition);
|
||||
observer.observe(document.body, { attributes: true, subtree: true, attributeFilter: ['class'] });
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('resize', updateButtonPosition);
|
||||
observer.disconnect();
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="bi2-page">
|
||||
{/* Header */}
|
||||
@@ -253,13 +43,15 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
<div className="bi2-title-text">
|
||||
<h1 className="bi2-main-title">{t('analysis.pageTitle')}</h1>
|
||||
<p className="bi2-subtitle">
|
||||
{t('analysis.pageDescHighlight')}{t('analysis.pageDescBefore')}{processed_info?.customer_name || t('analysis.defaultBrandName')}{t('analysis.pageDescAfter')}
|
||||
<span style={{ color: 'var(--Color-mint-500, #94FBE0)' }}>{t('analysis.pageDescHighlight')}</span>{t('analysis.pageDescBefore')}{processed_info?.customer_name || t('analysis.defaultBrandName')}{t('analysis.pageDescAfter')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr className="bi2-page-divider" />
|
||||
|
||||
{/* Main Content Container */}
|
||||
<div ref={containerRef} className="bi2-main-container">
|
||||
<div className="bi2-main-container">
|
||||
{/* 매장명 & 주소 */}
|
||||
<div className="bi2-store-header">
|
||||
<h2 className="bi2-store-name">{processed_info?.customer_name || t('analysis.brandNameFallback')}</h2>
|
||||
@@ -298,7 +90,7 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
{/* 레이더 차트 */}
|
||||
<div className="bi2-selling-chart">
|
||||
{sellingPoints.length > 0 && (
|
||||
<RadarChart data={sellingPoints} size={360} />
|
||||
<GeometricChart data={sellingPoints} />
|
||||
)}
|
||||
</div>
|
||||
{/* 셀링 포인트 리스트 */}
|
||||
@@ -340,9 +132,11 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
<div className="bi2-persona-divider"></div>
|
||||
<div className="bi2-persona-detail grow">
|
||||
<span className="bi2-label-xs">{t('analysis.favorKeywords', { defaultValue: '선호 키워드' })}</span>
|
||||
<p className="bi2-persona-detail-text">
|
||||
{persona.favor_target.join('\n')}
|
||||
</p>
|
||||
<div className="bi2-persona-detail-text">
|
||||
{persona.favor_target.map((item, i) => (
|
||||
<p key={i}>{item}</p>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="bi2-persona-divider"></div>
|
||||
<div className="bi2-persona-detail">
|
||||
@@ -369,13 +163,10 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
||||
</div>
|
||||
|
||||
{/* 콘텐츠 생성 버튼 */}
|
||||
<div
|
||||
className="fixed bottom-8 flex justify-center z-50 pointer-events-none"
|
||||
style={{ left: buttonPosition.left, width: buttonPosition.width }}
|
||||
>
|
||||
<div className="bi2-bottom-button-container">
|
||||
<button
|
||||
onClick={onGenerate}
|
||||
className="pointer-events-auto bg-brand-purple hover:bg-brand-purpleHover text-white font-bold py-3 px-12 rounded-full shadow-2xl shadow-brand-purple/40 transform hover:scale-105 transition-all duration-300 flex items-center gap-2"
|
||||
className="bi2-generate-btn"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden className="w-5 h-5">
|
||||
<path d="M12 2l2.4 6.8L22 12l-7.6 3.2L12 22l-2.4-6.8L2 12l7.6-3.2L12 2z" />
|
||||
|
||||
@@ -1,149 +1,208 @@
|
||||
import React from 'react';
|
||||
|
||||
export interface USP {
|
||||
label: string;
|
||||
subLabel: string;
|
||||
score: number;
|
||||
description: string;
|
||||
}
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { SellingPoint } from '../../types/api';
|
||||
|
||||
interface GeometricChartProps {
|
||||
data: USP[];
|
||||
data: SellingPoint[];
|
||||
}
|
||||
|
||||
export const GeometricChart: React.FC<GeometricChartProps> = ({ data }) => {
|
||||
const size = 500;
|
||||
const [animatedScores, setAnimatedScores] = useState<number[]>(data.map(() => 0));
|
||||
|
||||
useEffect(() => {
|
||||
const targetScores = data.map(item => item.score);
|
||||
const duration = 1500;
|
||||
const startTime = Date.now();
|
||||
|
||||
const animate = () => {
|
||||
const elapsed = Date.now() - startTime;
|
||||
const progress = Math.min(elapsed / duration, 1);
|
||||
const easeProgress = 1 - Math.pow(1 - progress, 3);
|
||||
setAnimatedScores(targetScores.map(t => t * easeProgress));
|
||||
if (progress < 1) requestAnimationFrame(animate);
|
||||
};
|
||||
|
||||
requestAnimationFrame(animate);
|
||||
}, [data]);
|
||||
|
||||
const size = 560;
|
||||
const center = size / 2;
|
||||
const radius = 110;
|
||||
const maxRadius = 160;
|
||||
const sides = data.length;
|
||||
const levels = 5;
|
||||
const angleStep = (Math.PI * 2) / sides;
|
||||
|
||||
const accentColor = "#94FBE0";
|
||||
|
||||
const getPoints = (r: number) => {
|
||||
return data.map((_, i) => {
|
||||
const angle = (Math.PI * 2 * i) / sides - Math.PI / 2;
|
||||
const x = center + r * Math.cos(angle);
|
||||
const y = center + r * Math.sin(angle);
|
||||
return `${x},${y}`;
|
||||
}).join(' ');
|
||||
};
|
||||
|
||||
const getDataPoints = () => {
|
||||
return data.map((item, i) => {
|
||||
const normalizedScore = item.score / 100;
|
||||
const r = radius * normalizedScore;
|
||||
const angle = (Math.PI * 2 * i) / sides - Math.PI / 2;
|
||||
const x = center + r * Math.cos(angle);
|
||||
const y = center + r * Math.sin(angle);
|
||||
return `${x},${y}`;
|
||||
}).join(' ');
|
||||
};
|
||||
|
||||
const labelRadius = radius + 55;
|
||||
const labels = data.map((item, i) => {
|
||||
const angle = (Math.PI * 2 * i) / sides - Math.PI / 2;
|
||||
const x = center + labelRadius * Math.cos(angle);
|
||||
const y = center + labelRadius * Math.sin(angle);
|
||||
|
||||
let anchor: 'start' | 'middle' | 'end' = 'middle';
|
||||
if (x < center - 20) anchor = 'end';
|
||||
if (x > center + 20) anchor = 'start';
|
||||
|
||||
return { x, y, text: item.label, sub: item.subLabel, anchor, score: item.score };
|
||||
const getAngle = (i: number) => angleStep * i - Math.PI / 2;
|
||||
const getPoint = (i: number, r: number) => ({
|
||||
x: center + r * Math.cos(getAngle(i)),
|
||||
y: center + r * Math.sin(getAngle(i)),
|
||||
});
|
||||
|
||||
// 순위 매핑
|
||||
const sortedIndices = [...data]
|
||||
.map((item, i) => ({ index: i, score: item.score }))
|
||||
.sort((a, b) => b.score - a.score)
|
||||
.map((item, rank) => ({ ...item, rank: rank + 1 }));
|
||||
const rankMap = new Map<number, number>();
|
||||
sortedIndices.forEach(item => rankMap.set(item.index, item.rank));
|
||||
|
||||
// 레벨 폴리곤
|
||||
const levelPolygons = Array.from({ length: levels }, (_, li) => {
|
||||
const r = ((li + 1) / levels) * maxRadius;
|
||||
return data.map((_, i) => {
|
||||
const p = getPoint(i, r);
|
||||
return `${p.x},${p.y}`;
|
||||
}).join(' ');
|
||||
});
|
||||
|
||||
// 데이터 폴리곤
|
||||
const dataPolygon = animatedScores.map((score, i) => {
|
||||
const r = (score / 100) * maxRadius;
|
||||
const p = getPoint(i, r);
|
||||
return `${p.x},${p.y}`;
|
||||
}).join(' ');
|
||||
|
||||
// 데이터 포인트
|
||||
const dataPoints = animatedScores.map((score, i) => {
|
||||
const r = (score / 100) * maxRadius;
|
||||
return getPoint(i, r);
|
||||
});
|
||||
|
||||
const labelRadius = maxRadius + 22;
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center py-2 relative w-full h-full">
|
||||
<svg viewBox={`0 0 ${size} ${size}`} className="w-full h-auto max-w-[500px]" style={{ overflow: 'visible' }}>
|
||||
<div className="bi2-radar-container">
|
||||
<svg
|
||||
viewBox={`0 0 ${size} ${size}`}
|
||||
style={{ overflow: 'visible', width: '440px', height: '440px' }}
|
||||
>
|
||||
<defs>
|
||||
<radialGradient id="polyGradient" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
|
||||
<stop offset="0%" stopColor={accentColor} stopOpacity="0.3" />
|
||||
<stop offset="100%" stopColor={accentColor} stopOpacity="0.05" />
|
||||
{/* 레이더 폴리곤 fill: radial gradient */}
|
||||
<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>
|
||||
<feMergeNode in="dropShadow" />
|
||||
<feMergeNode in="SourceGraphic" />
|
||||
<feMergeNode in="insetGlow" />
|
||||
</feMerge>
|
||||
</filter>
|
||||
<filter id="badge-glow" x="-50%" y="-50%" width="200%" height="200%">
|
||||
<feDropShadow dx="0" dy="0" stdDeviation="4" floodColor="#94FBE0" floodOpacity="0.4" />
|
||||
</filter>
|
||||
</defs>
|
||||
|
||||
{[1, 0.75, 0.5, 0.25].map((scale, i) => (
|
||||
{/* 그리드 레벨 */}
|
||||
{levelPolygons.map((points, i) => (
|
||||
<polygon
|
||||
key={i}
|
||||
points={getPoints(radius * scale)}
|
||||
key={`level-${i}`}
|
||||
points={points}
|
||||
fill="none"
|
||||
stroke={accentColor}
|
||||
strokeOpacity={0.25 - (0.02 * i)}
|
||||
stroke="rgba(255,255,255,0.2)"
|
||||
strokeWidth="1"
|
||||
strokeDasharray={i === 0 ? "0" : "4 2"}
|
||||
/>
|
||||
))}
|
||||
|
||||
{/* 축 선 */}
|
||||
{data.map((_, i) => {
|
||||
const angle = (Math.PI * 2 * i) / sides - Math.PI / 2;
|
||||
const x = center + radius * Math.cos(angle);
|
||||
const y = center + radius * Math.sin(angle);
|
||||
const p = getPoint(i, maxRadius);
|
||||
return (
|
||||
<line
|
||||
key={i}
|
||||
key={`axis-${i}`}
|
||||
x1={center}
|
||||
y1={center}
|
||||
x2={x}
|
||||
y2={y}
|
||||
stroke={accentColor}
|
||||
strokeOpacity="0.25"
|
||||
x2={p.x}
|
||||
y2={p.y}
|
||||
stroke="rgba(255,255,255,0.2)"
|
||||
strokeWidth="1"
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
||||
{/* 데이터 폴리곤 */}
|
||||
<polygon
|
||||
points={getDataPoints()}
|
||||
fill="url(#polyGradient)"
|
||||
stroke={accentColor}
|
||||
strokeWidth="2.5"
|
||||
points={dataPolygon}
|
||||
fill="url(#radar-fill-gradient)"
|
||||
stroke="var(--Color-mint-500, #94FBE0)"
|
||||
strokeWidth="2"
|
||||
strokeLinejoin="round"
|
||||
filter="url(#radar-polygon-filter)"
|
||||
/>
|
||||
|
||||
{/* 데이터 포인트 */}
|
||||
{dataPoints.map((point, i) => (
|
||||
<circle
|
||||
key={`point-${i}`}
|
||||
cx={point.x}
|
||||
cy={point.y}
|
||||
r="4"
|
||||
fill="#ffffff"
|
||||
stroke="#ffffff"
|
||||
strokeWidth="2"
|
||||
/>
|
||||
))}
|
||||
|
||||
{/* 라벨 */}
|
||||
{data.map((item, i) => {
|
||||
const normalizedScore = item.score / 100;
|
||||
const r = radius * normalizedScore;
|
||||
const angle = (Math.PI * 2 * i) / sides - Math.PI / 2;
|
||||
const x = center + r * Math.cos(angle);
|
||||
const y = center + r * Math.sin(angle);
|
||||
const isHigh = item.score >= 90;
|
||||
return (
|
||||
<g key={i}>
|
||||
{isHigh && (
|
||||
<circle cx={x} cy={y} r="10" fill={accentColor} fillOpacity="0.4" />
|
||||
)}
|
||||
<circle cx={x} cy={y} r={isHigh ? 5 : 4} fill="#fff" />
|
||||
</g>
|
||||
)
|
||||
})}
|
||||
const angle = getAngle(i);
|
||||
const pos = getPoint(i, labelRadius);
|
||||
const rank = rankMap.get(i) || i + 1;
|
||||
const isTopThree = rank <= 3;
|
||||
const isLeftSide = Math.cos(angle) < -0.1;
|
||||
const textX = isLeftSide ? -20 : 20;
|
||||
const textAnchor: 'start' | 'end' = isLeftSide ? 'end' : 'start';
|
||||
|
||||
{labels.map((l, i) => {
|
||||
const isHigh = l.score >= 90;
|
||||
return (
|
||||
<g key={i}>
|
||||
<text
|
||||
x={l.x}
|
||||
y={l.y - 7}
|
||||
textAnchor={l.anchor}
|
||||
fill={isHigh ? "#fff" : "#e2e8f0"}
|
||||
fontSize={isHigh ? "14" : "12"}
|
||||
fontWeight={isHigh ? "700" : "600"}
|
||||
className="tracking-tight"
|
||||
style={{ fontFamily: "sans-serif" }}
|
||||
>
|
||||
{l.text}
|
||||
</text>
|
||||
<text
|
||||
x={l.x}
|
||||
y={l.y + 9}
|
||||
textAnchor={l.anchor}
|
||||
fill={isHigh ? accentColor : "#94a3b8"}
|
||||
fontSize={isHigh ? "11" : "10"}
|
||||
fontWeight={isHigh ? "600" : "400"}
|
||||
className="uppercase tracking-wider"
|
||||
>
|
||||
{l.sub}
|
||||
</text>
|
||||
<g key={`label-${i}`}>
|
||||
<g transform={`translate(${pos.x}, ${pos.y})`}>
|
||||
{isLeftSide && (
|
||||
<text
|
||||
x={textX}
|
||||
y="0"
|
||||
textAnchor={textAnchor}
|
||||
dominantBaseline="central"
|
||||
className="bi2-radar-label-text"
|
||||
style={{ fontSize: '20px', fontWeight: 600, fill: '#E5F1F2', fontFamily: 'Pretendard' }}
|
||||
>
|
||||
{item.korean_category}
|
||||
</text>
|
||||
)}
|
||||
<g filter={isTopThree ? 'url(#badge-glow)' : undefined}>
|
||||
<rect x="-12.5" y="-12.5" width="25" height="25" rx="4" fill={isTopThree ? '#94FBE0' : '#206764'} />
|
||||
<text
|
||||
x="0" y="0"
|
||||
textAnchor="middle"
|
||||
dominantBaseline="central"
|
||||
style={{ fontSize: '16px', fontWeight: 600, fill: isTopThree ? '#002224' : '#94FBE0', fontFamily: 'Pretendard' }}
|
||||
>
|
||||
{rank}
|
||||
</text>
|
||||
</g>
|
||||
{!isLeftSide && (
|
||||
<text
|
||||
x={textX}
|
||||
y="0"
|
||||
textAnchor={textAnchor}
|
||||
dominantBaseline="central"
|
||||
className="bi2-radar-label-text"
|
||||
style={{ fontSize: '20px', fontWeight: 600, fill: '#E5F1F2', fontFamily: 'Pretendard' }}
|
||||
>
|
||||
{item.korean_category}
|
||||
</text>
|
||||
)}
|
||||
</g>
|
||||
</g>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -207,25 +207,25 @@ const ADO2ContentsPage: React.FC<ADO2ContentsPageProps> = ({ onBack }) => {
|
||||
<div className="content-card-actions">
|
||||
<button
|
||||
className="content-download-btn"
|
||||
onClick={() => handleDownload(video.result_movie_url, video.store_name)}
|
||||
disabled={!video.result_movie_url}
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.5">
|
||||
<path d="M10 3v10M10 13l-4-4M10 13l4-4"/>
|
||||
<path d="M3 15v2h14v-2"/>
|
||||
</svg>
|
||||
<span>{t('ado2Contents.download')}</span>
|
||||
</button>
|
||||
<button
|
||||
className="content-upload-btn"
|
||||
onClick={() => handleUploadClick(video)}
|
||||
disabled={!video.result_movie_url}
|
||||
title={t('ado2Contents.uploadToSocial')}
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.5">
|
||||
<path d="M10 13V3M10 3l-4 4M10 3l4 4"/>
|
||||
<path d="M3 15v2h14v-2"/>
|
||||
</svg>
|
||||
<span>{t('ado2Contents.uploadToSocial')}</span>
|
||||
</button>
|
||||
<button
|
||||
className="content-upload-btn"
|
||||
onClick={() => handleDownload(video.result_movie_url, video.store_name)}
|
||||
disabled={!video.result_movie_url}
|
||||
title={t('ado2Contents.download')}
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" strokeWidth="1.5">
|
||||
<path d="M10 3v10M10 13l-4-4M10 13l4-4"/>
|
||||
<path d="M3 15v2h14v-2"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
className="content-delete-btn"
|
||||
|
||||
@@ -6,6 +6,7 @@ import { uploadImages } from '../../utils/api';
|
||||
|
||||
interface AssetManagementContentProps {
|
||||
onNext: (imageTaskId: string) => void;
|
||||
onBack?: () => void;
|
||||
imageList: ImageItem[];
|
||||
onRemoveImage: (index: number) => void;
|
||||
onAddImages: (files: File[]) => void;
|
||||
@@ -13,20 +14,22 @@ interface AssetManagementContentProps {
|
||||
|
||||
type VideoRatio = 'vertical' | 'horizontal';
|
||||
|
||||
const IMAGES_PER_PAGE = 12;
|
||||
|
||||
const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
||||
onNext,
|
||||
onBack,
|
||||
imageList,
|
||||
onRemoveImage,
|
||||
onAddImages,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||
const imageListRef = useRef<HTMLDivElement>(null);
|
||||
const [isUploading, setIsUploading] = useState(false);
|
||||
const [uploadError, setUploadError] = useState<string | null>(null);
|
||||
const [videoRatio, setVideoRatio] = useState<VideoRatio>('vertical');
|
||||
const [displayCount, setDisplayCount] = useState(IMAGES_PER_PAGE);
|
||||
|
||||
// Load video ratio from localStorage on mount
|
||||
useEffect(() => {
|
||||
const savedRatio = localStorage.getItem('castad_video_ratio') as VideoRatio;
|
||||
if (savedRatio === 'vertical' || savedRatio === 'horizontal') {
|
||||
@@ -34,7 +37,6 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
||||
}
|
||||
}, []);
|
||||
|
||||
// Save video ratio to localStorage when it changes
|
||||
const handleVideoRatioChange = (ratio: VideoRatio) => {
|
||||
setVideoRatio(ratio);
|
||||
localStorage.setItem('castad_video_ratio', ratio);
|
||||
@@ -51,7 +53,6 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
||||
setUploadError(null);
|
||||
|
||||
try {
|
||||
// URL 이미지와 파일 이미지 분리
|
||||
const urlImages: ImageUrlItem[] = imageList
|
||||
.filter((item: ImageItem): item is ImageItem & { type: 'url' } => item.type === 'url')
|
||||
.map((item) => ({ url: item.url }));
|
||||
@@ -60,7 +61,6 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
||||
.filter((item: ImageItem): item is ImageItem & { type: 'file' } => item.type === 'file')
|
||||
.map((item) => item.file);
|
||||
|
||||
// 이미지가 하나라도 있으면 업로드
|
||||
if (urlImages.length > 0 || fileImages.length > 0) {
|
||||
const response = await uploadImages(urlImages, fileImages);
|
||||
onNext(response.task_id);
|
||||
@@ -73,11 +73,6 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const handleImageListWheel = (e: React.WheelEvent) => {
|
||||
// 이 영역 안에서는 항상 스크롤 이벤트 전파 차단
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
const handleDragOver = (e: React.DragEvent) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
@@ -86,14 +81,10 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
||||
const handleDrop = (e: React.DragEvent) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
const files = Array.from(e.dataTransfer.files).filter(file =>
|
||||
const files = Array.from(e.dataTransfer.files).filter((file: File) =>
|
||||
file.type.startsWith('image/')
|
||||
);
|
||||
|
||||
if (files.length > 0) {
|
||||
onAddImages(files);
|
||||
}
|
||||
if (files.length > 0) onAddImages(files);
|
||||
};
|
||||
|
||||
const handleFileSelect = () => {
|
||||
@@ -108,104 +99,132 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
||||
}
|
||||
};
|
||||
|
||||
const visibleImages = imageList.slice(0, displayCount);
|
||||
const hasMore = imageList.length > displayCount;
|
||||
|
||||
return (
|
||||
<main className="page-container">
|
||||
{/* Title */}
|
||||
<h1 className="asset-title">{t('assetManagement.title')}</h1>
|
||||
<main className="asset-page">
|
||||
{/* Fixed Header - 뒤로가기 버튼 */}
|
||||
<div className="asset-sticky-header">
|
||||
{onBack && (
|
||||
<button onClick={onBack} className="asset-back-btn">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polyline points="15 18 9 12 15 6"/>
|
||||
</svg>
|
||||
{t('assetManagement.back')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Main Content Container */}
|
||||
<div className="asset-container">
|
||||
{/* Left Column - Selected Images */}
|
||||
<div className="asset-column asset-column-left">
|
||||
<h3 className="asset-section-title">{t('assetManagement.selectedImages')}</h3>
|
||||
<div
|
||||
ref={imageListRef}
|
||||
onWheel={handleImageListWheel}
|
||||
className="asset-image-list"
|
||||
>
|
||||
{imageList.length > 0 ? (
|
||||
<div className="asset-image-grid">
|
||||
{imageList.map((item, i) => (
|
||||
<div key={i} className="asset-image-item">
|
||||
<img
|
||||
src={getImageSrc(item)}
|
||||
alt={`${t('assetManagement.imageAlt')} ${i + 1}`}
|
||||
/>
|
||||
{item.type === 'file' && (
|
||||
<div className="asset-image-badge">{t('assetManagement.uploadBadge')}</div>
|
||||
)}
|
||||
<button
|
||||
onClick={() => onRemoveImage(i)}
|
||||
className="asset-image-remove"
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/>
|
||||
<line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
{/* Single Scrollable Content Area */}
|
||||
<div className="asset-scroll-area">
|
||||
<h1 className="asset-title">{t('assetManagement.title')}</h1>
|
||||
|
||||
<div className="asset-container">
|
||||
{/* Left Column - Selected Images */}
|
||||
<div className="asset-column asset-column-left">
|
||||
<div className="asset-section-header">
|
||||
<div className="asset-section-header-left">
|
||||
<h3 className="asset-section-title">{t('assetManagement.selectedImages')}</h3>
|
||||
<span className="asset-section-subtitle">{t('assetManagement.minImages')}</span>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Right Column - Upload and Video Ratio */}
|
||||
<div className="asset-column asset-column-right">
|
||||
{/* Image Upload Section */}
|
||||
<div className="asset-upload-section">
|
||||
<h3 className="asset-section-title">{t('assetManagement.imageUpload')}</h3>
|
||||
<div
|
||||
onClick={handleFileSelect}
|
||||
onDragOver={handleDragOver}
|
||||
onDrop={handleDrop}
|
||||
className="asset-upload-zone"
|
||||
>
|
||||
<p className="asset-upload-text">
|
||||
{t('assetManagement.dragAndDrop').split('\n').map((line, i) => (
|
||||
<React.Fragment key={i}>{i > 0 && <br/>}{line}</React.Fragment>
|
||||
))}
|
||||
</p>
|
||||
<button onClick={handleFileSelect} className="asset-mobile-upload-btn">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
||||
<line x1="8" y1="2" x2="8" y2="14" stroke="currentColor" strokeWidth="2" strokeLinecap="round"/>
|
||||
<line x1="2" y1="8" x2="14" y2="8" stroke="currentColor" strokeWidth="2" strokeLinecap="round"/>
|
||||
</svg>
|
||||
{t('assetManagement.imageUpload')}
|
||||
</button>
|
||||
</div>
|
||||
<input
|
||||
ref={fileInputRef}
|
||||
type="file"
|
||||
accept="image/*"
|
||||
multiple
|
||||
onChange={handleFileChange}
|
||||
className="hidden"
|
||||
/>
|
||||
|
||||
<div className="asset-image-list">
|
||||
{visibleImages.length > 0 && (
|
||||
<div className="asset-image-grid">
|
||||
{visibleImages.map((item, i) => (
|
||||
<div key={i} className="asset-image-item">
|
||||
<img
|
||||
src={getImageSrc(item)}
|
||||
alt={`${t('assetManagement.imageAlt')} ${i + 1}`}
|
||||
/>
|
||||
{item.type === 'file' && (
|
||||
<div className="asset-image-badge">{t('assetManagement.uploadBadge')}</div>
|
||||
)}
|
||||
<button
|
||||
onClick={() => onRemoveImage(i)}
|
||||
className="asset-image-remove"
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
||||
<line x1="18" y1="6" x2="6" y2="18"/>
|
||||
<line x1="6" y1="6" x2="18" y2="18"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{hasMore && (
|
||||
<button
|
||||
className="asset-load-more"
|
||||
onClick={() => setDisplayCount(prev => prev + IMAGES_PER_PAGE)}
|
||||
>
|
||||
{t('assetManagement.loadMore')}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Video Ratio Section */}
|
||||
<div className="asset-ratio-section">
|
||||
<h3 className="asset-section-title">{t('assetManagement.videoRatio')}</h3>
|
||||
<div className="asset-ratio-buttons">
|
||||
<button
|
||||
onClick={() => handleVideoRatioChange('vertical')}
|
||||
className={`asset-ratio-button ${videoRatio === 'vertical' ? 'active' : ''}`}
|
||||
{/* Right Column - Upload and Video Ratio */}
|
||||
<div className="asset-column asset-column-right">
|
||||
{/* Image Upload Section (desktop only) */}
|
||||
<div className="asset-upload-section">
|
||||
<h3 className="asset-section-title">{t('assetManagement.imageUpload')}</h3>
|
||||
<div
|
||||
onClick={handleFileSelect}
|
||||
onDragOver={handleDragOver}
|
||||
onDrop={handleDrop}
|
||||
className="asset-upload-zone"
|
||||
>
|
||||
<div className="asset-ratio-icon asset-ratio-icon-vertical">
|
||||
<div className="asset-ratio-box"></div>
|
||||
</div>
|
||||
<span>9:16</span>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => handleVideoRatioChange('horizontal')}
|
||||
className={`asset-ratio-button ${videoRatio === 'horizontal' ? 'active' : ''}`}
|
||||
>
|
||||
<div className="asset-ratio-icon asset-ratio-icon-horizontal">
|
||||
<div className="asset-ratio-box"></div>
|
||||
</div>
|
||||
<span>16:9</span>
|
||||
</button>
|
||||
<p className="asset-upload-text">
|
||||
{t('assetManagement.dragAndDrop').split('\n').map((line, i) => (
|
||||
<React.Fragment key={i}>{i > 0 && <br/>}{line}</React.Fragment>
|
||||
))}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Video Ratio Section */}
|
||||
<div className="asset-ratio-section">
|
||||
<h3 className="asset-section-title">{t('assetManagement.videoRatio')}</h3>
|
||||
<div className="asset-ratio-buttons">
|
||||
<button
|
||||
onClick={() => handleVideoRatioChange('vertical')}
|
||||
className={`asset-ratio-button ${videoRatio === 'vertical' ? 'active' : ''}`}
|
||||
>
|
||||
<div className="asset-ratio-icon asset-ratio-icon-vertical">
|
||||
<div className="asset-ratio-box"></div>
|
||||
</div>
|
||||
<span className="asset-ratio-label">9:16</span>
|
||||
<span className="asset-ratio-subtitle">{t('assetManagement.youtubeShorts')}</span>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => handleVideoRatioChange('horizontal')}
|
||||
className={`asset-ratio-button ${videoRatio === 'horizontal' ? 'active' : ''}`}
|
||||
>
|
||||
<div className="asset-ratio-icon asset-ratio-icon-horizontal">
|
||||
<div className="asset-ratio-box"></div>
|
||||
</div>
|
||||
<span className="asset-ratio-label">16:9</span>
|
||||
<span className="asset-ratio-subtitle">{t('assetManagement.youtubeVideo')}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Bottom Button */}
|
||||
<div className="asset-bottom">
|
||||
{/* Fixed Footer - 다음 단계 버튼 */}
|
||||
<div className="asset-sticky-footer">
|
||||
{uploadError && (
|
||||
<p className="text-red-500 text-sm mb-2">{uploadError}</p>
|
||||
)}
|
||||
@@ -217,6 +236,15 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
||||
{isUploading ? t('assetManagement.uploading') : t('assetManagement.nextStep')}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<input
|
||||
ref={fileInputRef}
|
||||
type="file"
|
||||
accept="image/*"
|
||||
multiple
|
||||
onChange={handleFileChange}
|
||||
className="hidden"
|
||||
/>
|
||||
</main>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -37,12 +37,7 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
||||
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
||||
const [statusMessage, setStatusMessage] = useState('');
|
||||
const [renderProgress, setRenderProgress] = useState(0);
|
||||
const [isPlaying, setIsPlaying] = useState(false);
|
||||
const [progress, setProgress] = useState(0);
|
||||
const [showControls, setShowControls] = useState(true);
|
||||
const videoRef = useRef<HTMLVideoElement>(null);
|
||||
const hasStartedGeneration = useRef(false);
|
||||
const hideControlsTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
|
||||
// 소셜 미디어 포스팅 모달
|
||||
const [showSocialModal, setShowSocialModal] = useState(false);
|
||||
@@ -284,62 +279,6 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
||||
}
|
||||
}, []);
|
||||
|
||||
const togglePlayPause = () => {
|
||||
if (!videoRef.current || !videoUrl) return;
|
||||
if (isPlaying) {
|
||||
videoRef.current.pause();
|
||||
setShowControls(true);
|
||||
if (hideControlsTimer.current) clearTimeout(hideControlsTimer.current);
|
||||
} else {
|
||||
videoRef.current.play();
|
||||
hideControlsTimer.current = setTimeout(() => {
|
||||
setShowControls(false);
|
||||
}, 3000);
|
||||
}
|
||||
setIsPlaying(!isPlaying);
|
||||
};
|
||||
|
||||
const handleTimeUpdate = () => {
|
||||
if (videoRef.current && videoRef.current.duration > 0) {
|
||||
setProgress((videoRef.current.currentTime / videoRef.current.duration) * 100);
|
||||
}
|
||||
};
|
||||
|
||||
const handleVideoEnded = () => {
|
||||
setIsPlaying(false);
|
||||
setProgress(0);
|
||||
setShowControls(true);
|
||||
};
|
||||
|
||||
const resetHideControlsTimer = () => {
|
||||
if (hideControlsTimer.current) {
|
||||
clearTimeout(hideControlsTimer.current);
|
||||
}
|
||||
setShowControls(true);
|
||||
if (isPlaying) {
|
||||
hideControlsTimer.current = setTimeout(() => {
|
||||
setShowControls(false);
|
||||
}, 3000);
|
||||
}
|
||||
};
|
||||
|
||||
const handleVideoMouseEnter = () => {
|
||||
resetHideControlsTimer();
|
||||
};
|
||||
|
||||
const handleVideoMouseMove = () => {
|
||||
resetHideControlsTimer();
|
||||
};
|
||||
|
||||
const handleVideoMouseLeave = () => {
|
||||
if (isPlaying) {
|
||||
if (hideControlsTimer.current) clearTimeout(hideControlsTimer.current);
|
||||
hideControlsTimer.current = setTimeout(() => {
|
||||
setShowControls(false);
|
||||
}, 1000);
|
||||
}
|
||||
};
|
||||
|
||||
const handleDownload = () => {
|
||||
if (videoUrl) {
|
||||
const link = document.createElement('a');
|
||||
@@ -374,7 +313,7 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
||||
// 비디오 해상도 계산
|
||||
const getVideoResolution = () => {
|
||||
const savedRatio = localStorage.getItem('castad_video_ratio');
|
||||
return savedRatio === 'horizontal' ? '1234×720' : '720×1234';
|
||||
return savedRatio === 'horizontal' ? '1280×720' : '720×1280';
|
||||
};
|
||||
|
||||
// 파일명 생성
|
||||
@@ -392,6 +331,17 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
||||
</svg>
|
||||
<span>{t('completion.back')}</span>
|
||||
</button>
|
||||
<a
|
||||
href="https://forms.gle/4a8mGebBYtdesvby9"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="comp2-inquiry-btn"
|
||||
>
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<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>
|
||||
<span>문의하기</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="comp2-title-row">
|
||||
@@ -403,7 +353,7 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
||||
<div className="comp2-grid">
|
||||
{/* 왼쪽: 영상 */}
|
||||
<div className="comp2-video-section">
|
||||
<div className="comp2-video-wrapper" onMouseEnter={handleVideoMouseEnter} onMouseMove={handleVideoMouseMove} onMouseLeave={handleVideoMouseLeave}>
|
||||
<div className="comp2-video-wrapper">
|
||||
{isLoading ? (
|
||||
<div className="comp2-video-loading">
|
||||
<div className="loading-spinner">
|
||||
@@ -426,47 +376,12 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
||||
</button>
|
||||
</div>
|
||||
) : videoUrl ? (
|
||||
<>
|
||||
<video
|
||||
ref={videoRef}
|
||||
src={videoUrl}
|
||||
className="comp2-video-player"
|
||||
onTimeUpdate={handleTimeUpdate}
|
||||
onEnded={handleVideoEnded}
|
||||
onClick={togglePlayPause}
|
||||
/>
|
||||
<div className={`comp2-video-controls ${showControls ? 'visible' : 'hidden'}`}>
|
||||
<div className="comp2-progress-bar">
|
||||
<div className="comp2-progress-fill" style={{ width: `${progress}%` }}></div>
|
||||
</div>
|
||||
<div className="comp2-controls-row">
|
||||
<button className="comp2-play-btn" onClick={togglePlayPause}>
|
||||
{isPlaying ? (
|
||||
<svg width="32" height="32" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/>
|
||||
</svg>
|
||||
) : (
|
||||
<svg width="32" height="32" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M8 5v14l11-7z"/>
|
||||
</svg>
|
||||
)}
|
||||
</button>
|
||||
<div className="comp2-volume-control">
|
||||
<svg width="32" height="32" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/>
|
||||
</svg>
|
||||
<div className="comp2-volume-bar">
|
||||
<div className="comp2-volume-fill"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="comp2-time-display">
|
||||
<span className="comp2-time-current">00:04</span>
|
||||
<span className="comp2-time-divider">/</span>
|
||||
<span className="comp2-time-total">00:34</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
<video
|
||||
src={videoUrl}
|
||||
className="comp2-video-player"
|
||||
controls
|
||||
playsInline
|
||||
/>
|
||||
) : (
|
||||
<div className="comp2-video-placeholder"></div>
|
||||
)}
|
||||
@@ -481,7 +396,7 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
||||
<div className="comp2-info-content">
|
||||
<div className="comp2-file-info">
|
||||
<h3 className="comp2-filename">{getFileName()}</h3>
|
||||
<p className="comp2-filesize">19.6MB</p>
|
||||
{/* <p className="comp2-filesize">19.6MB</p> */}
|
||||
</div>
|
||||
<div className="comp2-meta-grid">
|
||||
<div className="comp2-meta-item">
|
||||
|
||||
@@ -0,0 +1,801 @@
|
||||
|
||||
import React, { useState, useEffect, useCallback, useRef } from 'react';
|
||||
import { UploadHistoryItem } from '../../types/api';
|
||||
import { getUploadHistory, cancelUpload, retryUpload } from '../../utils/api';
|
||||
|
||||
// 날짜 유틸리티
|
||||
const getDaysInMonth = (year: number, month: number) => new Date(year, month + 1, 0).getDate();
|
||||
const getFirstDayOfMonth = (year: number, month: number) => new Date(year, month, 1).getDay();
|
||||
|
||||
type TabType = '전체' | '완료' | '예약' | '실패';
|
||||
type UploadStatus = 'pending' | 'uploading' | 'completed' | 'failed' | 'scheduled' | 'cancelled';
|
||||
|
||||
const TAB_TO_API: Record<TabType, 'all' | 'completed' | 'scheduled' | 'failed'> = {
|
||||
'전체': 'all',
|
||||
'완료': 'completed',
|
||||
'예약': 'scheduled',
|
||||
'실패': 'failed',
|
||||
};
|
||||
|
||||
interface CalendarDay {
|
||||
date: number;
|
||||
month: 'prev' | 'current' | 'next';
|
||||
isToday?: boolean;
|
||||
fullDate: Date;
|
||||
}
|
||||
|
||||
interface DaySummary {
|
||||
completed: number;
|
||||
scheduled: number;
|
||||
failed: number;
|
||||
}
|
||||
|
||||
const MOBILE_BREAKPOINT = 768;
|
||||
|
||||
// 플랫폼 아이콘
|
||||
const PlatformIcon: React.FC<{ platform: string; size?: number }> = ({ platform, size = 20 }) => {
|
||||
const src = platform === 'youtube'
|
||||
? '/assets/images/social-youtube.png'
|
||||
: platform === 'instagram'
|
||||
? '/assets/images/social-instagram.png'
|
||||
: '/assets/images/social-youtube.png';
|
||||
return <img src={src} alt={platform} style={{ width: size, height: size, objectFit: 'contain', flexShrink: 0 }} />;
|
||||
};
|
||||
|
||||
// 상태 도트 색상
|
||||
const statusColor = (status: UploadStatus) => {
|
||||
switch (status) {
|
||||
case 'completed': return '#1ba64f';
|
||||
case 'scheduled':
|
||||
case 'pending': return '#2563eb';
|
||||
case 'failed': return '#e15252';
|
||||
default: return '#9bcacc';
|
||||
}
|
||||
};
|
||||
|
||||
// 상태 라벨
|
||||
const statusLabel = (status: UploadStatus) => {
|
||||
switch (status) {
|
||||
case 'completed': return '완료';
|
||||
case 'scheduled':
|
||||
case 'pending': return '예약';
|
||||
case 'failed': return '실패';
|
||||
default: return status;
|
||||
}
|
||||
};
|
||||
|
||||
interface ContentCalendarContentProps {
|
||||
onNavigate?: (id: string) => void;
|
||||
}
|
||||
|
||||
const ContentCalendarContent: React.FC<ContentCalendarContentProps> = ({ onNavigate }) => {
|
||||
const today = new Date();
|
||||
const [year, setYear] = useState(today.getFullYear());
|
||||
const [month, setMonth] = useState(today.getMonth());
|
||||
const [activeTab, setActiveTab] = useState<TabType>('전체');
|
||||
const [isMobile, setIsMobile] = useState(window.innerWidth < MOBILE_BREAKPOINT);
|
||||
const [sheetOpen, setSheetOpen] = useState(false);
|
||||
// allItems: 캘린더 도트용 (전체)
|
||||
// panelItems: 오른쪽 패널용 (탭 필터)
|
||||
const [allItems, setAllItems] = useState<UploadHistoryItem[]>([]);
|
||||
const [panelItems, setPanelItems] = useState<UploadHistoryItem[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [panelLoading, setPanelLoading] = useState(false);
|
||||
const [selectedDate, setSelectedDate] = useState<string | null>(null);
|
||||
const panelRef = useRef<HTMLDivElement>(null);
|
||||
const dateRefs = useRef<Record<string, HTMLDivElement | null>>({});
|
||||
|
||||
useEffect(() => {
|
||||
const handleResize = () => setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
||||
window.addEventListener('resize', handleResize);
|
||||
return () => window.removeEventListener('resize', handleResize);
|
||||
}, []);
|
||||
|
||||
const filterCancelled = (items: UploadHistoryItem[]) =>
|
||||
items.filter(i => i.status !== 'cancelled');
|
||||
|
||||
// 캘린더용 전체 데이터 (year/month 기준)
|
||||
const fetchAllHistory = useCallback(async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const res = await getUploadHistory('all', { year, month: month + 1, size: 100 });
|
||||
if (res.items) setAllItems(filterCancelled(res.items));
|
||||
} catch {
|
||||
// 에러 무시
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
}, [year, month]);
|
||||
|
||||
// 패널용 탭 필터 데이터 (year/month 기준)
|
||||
const fetchPanelHistory = useCallback(async (tab: TabType) => {
|
||||
setPanelLoading(true);
|
||||
try {
|
||||
const res = await getUploadHistory(TAB_TO_API[tab], { year, month: month + 1, size: 100 });
|
||||
if (res.items) setPanelItems(filterCancelled(res.items));
|
||||
} catch {
|
||||
// 에러 무시
|
||||
} finally {
|
||||
setPanelLoading(false);
|
||||
}
|
||||
}, [year, month]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchAllHistory();
|
||||
}, [fetchAllHistory]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchPanelHistory(activeTab);
|
||||
}, [activeTab, fetchPanelHistory]);
|
||||
|
||||
const refreshAll = useCallback(() => {
|
||||
fetchAllHistory();
|
||||
fetchPanelHistory(activeTab);
|
||||
}, [fetchAllHistory, fetchPanelHistory, activeTab]);
|
||||
|
||||
const handlePrevMonth = () => {
|
||||
if (month === 0) { setMonth(11); setYear(y => y - 1); }
|
||||
else setMonth(m => m - 1);
|
||||
};
|
||||
const handleNextMonth = () => {
|
||||
if (month === 11) { setMonth(0); setYear(y => y + 1); }
|
||||
else setMonth(m => m + 1);
|
||||
};
|
||||
|
||||
// 날짜 문자열 (YYYY-MM-DD)
|
||||
const toDateKey = (d: Date) =>
|
||||
`${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
|
||||
|
||||
// 아이템 날짜 키 추출 (scheduled_at 또는 created_at)
|
||||
const itemDateKey = (item: UploadHistoryItem) => {
|
||||
const dateStr = item.scheduled_at || item.uploaded_at || item.created_at;
|
||||
return dateStr ? dateStr.slice(0, 10) : '';
|
||||
};
|
||||
|
||||
// 날짜별 요약 맵 (캘린더용 — allItems 전체 기준)
|
||||
const daySummaryMap: Record<string, DaySummary> = {};
|
||||
allItems.forEach(item => {
|
||||
const key = itemDateKey(item);
|
||||
if (!key) return;
|
||||
if (!daySummaryMap[key]) daySummaryMap[key] = { completed: 0, scheduled: 0, failed: 0 };
|
||||
if (item.status === 'completed') daySummaryMap[key].completed++;
|
||||
else if (item.status === 'failed') daySummaryMap[key].failed++;
|
||||
else daySummaryMap[key].scheduled++;
|
||||
});
|
||||
|
||||
// 전체 통계 (allItems 기준)
|
||||
const totalStats = allItems.reduce(
|
||||
(acc: { scheduled: number; completed: number; failed: number }, item) => {
|
||||
if (item.status === 'completed') acc.completed++;
|
||||
else if (item.status === 'failed') acc.failed++;
|
||||
else acc.scheduled++;
|
||||
return acc;
|
||||
},
|
||||
{ scheduled: 0, completed: 0, failed: 0 }
|
||||
);
|
||||
|
||||
// 패널 아이템은 서버에서 탭별로 이미 필터링된 panelItems 사용
|
||||
// 날짜별로 그룹핑 (내림차순)
|
||||
const groupedByDate: Record<string, UploadHistoryItem[]> = {};
|
||||
panelItems.forEach(item => {
|
||||
const key = itemDateKey(item);
|
||||
if (!key) return;
|
||||
if (!groupedByDate[key]) groupedByDate[key] = [];
|
||||
groupedByDate[key].push(item);
|
||||
});
|
||||
const sortedDateKeys = Object.keys(groupedByDate).sort((a, b) => b.localeCompare(a));
|
||||
|
||||
// 날짜 클릭 시 패널 스크롤
|
||||
const handleDateClick = (dateKey: string) => {
|
||||
setSelectedDate(dateKey);
|
||||
// 패널 내부 스크롤: panelRef 기준으로 offsetTop 계산
|
||||
setTimeout(() => {
|
||||
const el = dateRefs.current[dateKey];
|
||||
const panel = panelRef.current;
|
||||
if (el && panel) {
|
||||
const panelTop = panel.getBoundingClientRect().top;
|
||||
const elTop = el.getBoundingClientRect().top;
|
||||
const offset = elTop - panelTop + panel.scrollTop - 12; // 12px 여백
|
||||
panel.scrollTo({ top: offset, behavior: 'smooth' });
|
||||
}
|
||||
}, 50);
|
||||
};
|
||||
|
||||
// 취소
|
||||
const handleCancel = async (uploadId: number) => {
|
||||
if (!window.confirm('예약을 취소하시겠습니까?')) return;
|
||||
// 낙관적 업데이트: 먼저 UI에서 제거
|
||||
setAllItems(prev => prev.filter(i => i.upload_id !== uploadId));
|
||||
setPanelItems(prev => prev.filter(i => i.upload_id !== uploadId));
|
||||
try {
|
||||
await cancelUpload(uploadId);
|
||||
} catch {
|
||||
// 실패 시 다시 불러오기
|
||||
refreshAll();
|
||||
alert('취소에 실패했습니다.');
|
||||
}
|
||||
};
|
||||
|
||||
// 재시도
|
||||
const handleRetry = async (uploadId: number) => {
|
||||
try {
|
||||
await retryUpload(uploadId);
|
||||
refreshAll();
|
||||
} catch {
|
||||
alert('재시도에 실패했습니다.');
|
||||
}
|
||||
};
|
||||
|
||||
// 시간 표시 (HH:MM)
|
||||
const formatTime = (item: UploadHistoryItem) => {
|
||||
const dateStr = item.scheduled_at || item.uploaded_at || item.created_at;
|
||||
if (!dateStr) return '';
|
||||
const d = new Date(dateStr);
|
||||
return `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}`;
|
||||
};
|
||||
|
||||
// 날짜 표시 (M월 D)
|
||||
const formatDateLabel = (key: string) => {
|
||||
const [, m, d] = key.split('-');
|
||||
return `${parseInt(m)}월 ${parseInt(d)}`;
|
||||
};
|
||||
|
||||
const buildCalendarDays = (): CalendarDay[] => {
|
||||
const days: CalendarDay[] = [];
|
||||
const firstDay = getFirstDayOfMonth(year, month);
|
||||
const daysInCurrent = getDaysInMonth(year, month);
|
||||
const daysInPrev = getDaysInMonth(year, month === 0 ? 11 : month - 1);
|
||||
const prevYear = month === 0 ? year - 1 : year;
|
||||
const prevMonth = month === 0 ? 11 : month - 1;
|
||||
const nextYear = month === 11 ? year + 1 : year;
|
||||
const nextMonth = month === 11 ? 0 : month + 1;
|
||||
|
||||
for (let i = firstDay - 1; i >= 0; i--) {
|
||||
const d = daysInPrev - i;
|
||||
days.push({ date: d, month: 'prev', fullDate: new Date(prevYear, prevMonth, d) });
|
||||
}
|
||||
for (let d = 1; d <= daysInCurrent; d++) {
|
||||
const isToday = d === today.getDate() && month === today.getMonth() && year === today.getFullYear();
|
||||
days.push({ date: d, month: 'current', isToday, fullDate: new Date(year, month, d) });
|
||||
}
|
||||
const remaining = 42 - days.length;
|
||||
for (let d = 1; d <= remaining; d++) {
|
||||
days.push({ date: d, month: 'next', fullDate: new Date(nextYear, nextMonth, d) });
|
||||
}
|
||||
return days;
|
||||
};
|
||||
|
||||
const calendarDays = buildCalendarDays();
|
||||
const monthNames = ['1월','2월','3월','4월','5월','6월','7월','8월','9월','10월','11월','12월'];
|
||||
const dayLabels = ['일','월','화','수','목','금','토'];
|
||||
const tabs: TabType[] = ['전체','완료','예약','실패'];
|
||||
|
||||
// ── 캘린더 그리드 ──────────────────────────────────────────────
|
||||
const renderCalendarGrid = () => {
|
||||
const getDateLabel = (day: CalendarDay) => {
|
||||
if (day.month === 'prev' && day.date === getDaysInMonth(year, month === 0 ? 11 : month - 1)) {
|
||||
return `${month === 0 ? 12 : month}월 ${day.date}`;
|
||||
}
|
||||
if (day.month === 'next' && day.date === 1) {
|
||||
return `${month === 11 ? 1 : month + 2}월 ${day.date}`;
|
||||
}
|
||||
return `${day.date}`;
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
border: '1px solid #379599',
|
||||
borderRadius: 12,
|
||||
overflow: 'hidden',
|
||||
display: 'grid',
|
||||
gridTemplateRows: '28px repeat(6, minmax(0, 1fr))',
|
||||
gridTemplateColumns: 'repeat(7, minmax(0, 1fr))',
|
||||
flex: 1,
|
||||
minHeight: isMobile ? 360 : 0,
|
||||
}}
|
||||
>
|
||||
{/* 요일 헤더 */}
|
||||
{dayLabels.map((day, idx) => (
|
||||
<div
|
||||
key={day}
|
||||
style={{
|
||||
backgroundColor: '#01393b',
|
||||
borderRight: idx < 6 ? '1px solid #379599' : 'none',
|
||||
borderBottom: '1px solid #379599',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
padding: '0 8px',
|
||||
boxSizing: 'border-box',
|
||||
}}
|
||||
>
|
||||
<span style={{
|
||||
flex: 1,
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 500,
|
||||
fontSize: 12, color: '#cee5e6',
|
||||
letterSpacing: '-0.072px', textAlign: 'right',
|
||||
}}>
|
||||
{day}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* 날짜 셀 */}
|
||||
{calendarDays.map((day, globalIdx) => {
|
||||
const colIdx = globalIdx % 7;
|
||||
const rowIdx = Math.floor(globalIdx / 7);
|
||||
const isLastRow = rowIdx === 5;
|
||||
const isLastCol = colIdx === 6;
|
||||
const isOtherMonth = day.month !== 'current';
|
||||
const bgColor = isOtherMonth ? '#6ab0b3' : '#9bcacc';
|
||||
const dateKey = toDateKey(day.fullDate);
|
||||
const summary = daySummaryMap[dateKey];
|
||||
const isSelected = selectedDate === dateKey;
|
||||
|
||||
const cellBorder = {
|
||||
borderRight: isLastCol ? 'none' : '1px solid #379599',
|
||||
borderBottom: isLastRow ? 'none' : '1px solid #379599',
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
key={globalIdx}
|
||||
onClick={() => !isOtherMonth && handleDateClick(dateKey)}
|
||||
style={{
|
||||
backgroundColor: isSelected ? '#046266' : bgColor,
|
||||
...cellBorder,
|
||||
position: 'relative',
|
||||
overflow: 'hidden',
|
||||
boxSizing: 'border-box',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
padding: 8,
|
||||
gap: 4,
|
||||
cursor: isOtherMonth ? 'default' : 'pointer',
|
||||
}}
|
||||
>
|
||||
{/* 날짜 숫자 */}
|
||||
{day.isToday ? (
|
||||
<div style={{ display: 'flex', justifyContent: 'flex-end', flexShrink: 0 }}>
|
||||
<div style={{
|
||||
width: 24, height: 24,
|
||||
backgroundColor: '#e15252', borderRadius: 8,
|
||||
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
||||
}}>
|
||||
<span style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 500,
|
||||
fontSize: 12, color: '#ffffff', letterSpacing: '-0.072px', lineHeight: 1,
|
||||
}}>
|
||||
{day.date}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<span style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 500,
|
||||
fontSize: 12,
|
||||
color: isOtherMonth ? '#067c80' : (isSelected ? '#e5f1f2' : '#01191a'),
|
||||
letterSpacing: '-0.072px', textAlign: 'right', lineHeight: 1, flexShrink: 0,
|
||||
}}>
|
||||
{getDateLabel(day)}
|
||||
</span>
|
||||
)}
|
||||
|
||||
{/* 상태 도트 요약 */}
|
||||
{summary && !isOtherMonth && (
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
|
||||
{summary.completed > 0 && (
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<div style={{ width: 8, height: 8, borderRadius: '50%', backgroundColor: '#1ba64f', flexShrink: 0 }} />
|
||||
<span style={{ fontFamily: 'Pretendard, sans-serif', fontWeight: 500, fontSize: 11, color: '#01191a', lineHeight: 1, whiteSpace: 'nowrap' }}>
|
||||
완료 {summary.completed}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
{summary.scheduled > 0 && (
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<div style={{ width: 8, height: 8, borderRadius: '50%', backgroundColor: '#2563eb', flexShrink: 0 }} />
|
||||
<span style={{ fontFamily: 'Pretendard, sans-serif', fontWeight: 500, fontSize: 11, color: '#01191a', lineHeight: 1, whiteSpace: 'nowrap' }}>
|
||||
예약 {summary.scheduled}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
{summary.failed > 0 && (
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 4 }}>
|
||||
<div style={{ width: 8, height: 8, borderRadius: '50%', backgroundColor: '#e15252', flexShrink: 0 }} />
|
||||
<span style={{ fontFamily: 'Pretendard, sans-serif', fontWeight: 500, fontSize: 11, color: '#01191a', lineHeight: 1, whiteSpace: 'nowrap' }}>
|
||||
실패 {summary.failed}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
// ── 탭 바 ────────────────────────────────────────────────────
|
||||
const renderTabs = () => (
|
||||
<div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
|
||||
{tabs.map(tab => (
|
||||
<button
|
||||
key={tab}
|
||||
onClick={() => setActiveTab(tab)}
|
||||
style={{
|
||||
padding: '6px 16px', borderRadius: 999, border: 'none', cursor: 'pointer',
|
||||
backgroundColor: activeTab === tab ? '#067c80' : 'transparent',
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 400, fontSize: 16,
|
||||
color: activeTab === tab ? '#ffffff' : '#9bcacc',
|
||||
letterSpacing: '-0.096px', lineHeight: '22px', whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
{tab}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
|
||||
// ── 통계 바 ────────────────────────────────────────────────
|
||||
const renderStats = () => (
|
||||
<div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>
|
||||
{[
|
||||
{ label: '예약', value: totalStats.scheduled },
|
||||
{ label: '완료', value: totalStats.completed },
|
||||
{ label: '실패', value: totalStats.failed },
|
||||
].map((item, idx) => (
|
||||
<React.Fragment key={item.label}>
|
||||
{idx > 0 && <div style={{ width: 0, height: 14, borderLeft: '1px solid #379599' }} />}
|
||||
<div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
|
||||
<span style={{ fontFamily: 'Pretendard, sans-serif', fontWeight: 400, fontSize: 14, color: '#9bcacc', lineHeight: '18px' }}>
|
||||
{item.label}
|
||||
</span>
|
||||
<span style={{ fontFamily: 'Pretendard, sans-serif', fontWeight: 700, fontSize: 14, color: '#ffffff', lineHeight: '18px' }}>
|
||||
{item.value}
|
||||
</span>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
|
||||
// ── 월 네비게이션 ────────────────────────────────────────────
|
||||
const renderMonthNav = () => (
|
||||
<div style={{ display: 'flex', gap: 20, alignItems: 'center' }}>
|
||||
<button
|
||||
onClick={handlePrevMonth}
|
||||
style={{
|
||||
width: 34, height: 34, borderRadius: 8,
|
||||
backgroundColor: 'rgba(148,251,224,0.11)',
|
||||
border: 'none', cursor: 'pointer',
|
||||
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
||||
padding: 8, flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M12.5 15L7.5 10L12.5 5" stroke="#e5f1f2" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
</button>
|
||||
<p style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 400, fontSize: 16,
|
||||
color: '#e5f1f2', letterSpacing: '-0.096px', lineHeight: '22px',
|
||||
margin: 0, whiteSpace: 'nowrap',
|
||||
}}>
|
||||
{year}년 {monthNames[month]}
|
||||
</p>
|
||||
<button
|
||||
onClick={handleNextMonth}
|
||||
style={{
|
||||
width: 34, height: 34, borderRadius: 8,
|
||||
backgroundColor: 'rgba(148,251,224,0.11)',
|
||||
border: 'none', cursor: 'pointer',
|
||||
display: 'flex', alignItems: 'center', justifyContent: 'center',
|
||||
padding: 8, flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
|
||||
<path d="M7.5 5L12.5 10L7.5 15" stroke="#e5f1f2" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
// ── 업로드 아이템 카드 ────────────────────────────────────────
|
||||
const renderItem = (item: UploadHistoryItem) => {
|
||||
const isScheduled = item.status !== 'completed' && item.status !== 'failed';
|
||||
const isFailed = item.status === 'failed';
|
||||
return (
|
||||
<div
|
||||
key={item.upload_id}
|
||||
style={{
|
||||
backgroundColor: isFailed ? 'rgba(225,82,82,0.08)' : 'rgba(55,149,153,0.12)',
|
||||
borderRadius: 12,
|
||||
padding: '12px 14px',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
gap: 8,
|
||||
borderLeft: isFailed ? '3px solid #e15252' : isScheduled ? '3px solid #2563eb' : '3px solid #1ba64f',
|
||||
}}
|
||||
>
|
||||
{/* 상단: 상태 + 시간 */}
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<div style={{
|
||||
width: 8, height: 8, borderRadius: '50%',
|
||||
backgroundColor: statusColor(item.status as UploadStatus), flexShrink: 0,
|
||||
}} />
|
||||
<span style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 500, fontSize: 13,
|
||||
color: statusColor(item.status as UploadStatus), lineHeight: 1,
|
||||
}}>
|
||||
{statusLabel(item.status as UploadStatus)}
|
||||
</span>
|
||||
<span style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 400, fontSize: 13,
|
||||
color: '#9bcacc', lineHeight: 1, marginLeft: 'auto',
|
||||
}}>
|
||||
{formatTime(item)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* 채널 아이콘 + 제목 */}
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<PlatformIcon platform={item.platform} size={18} />
|
||||
<span style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 600, fontSize: 14,
|
||||
color: '#e5f1f2', lineHeight: 1.4,
|
||||
overflow: 'hidden', display: '-webkit-box',
|
||||
WebkitLineClamp: 2, WebkitBoxOrient: 'vertical',
|
||||
}}>
|
||||
{item.title}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* 실패 메시지 */}
|
||||
{isFailed && item.error_message && (
|
||||
<p style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 400, fontSize: 12,
|
||||
color: '#e15252', lineHeight: 1.5, margin: 0,
|
||||
}}>
|
||||
{item.error_message}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{/* 액션 버튼 */}
|
||||
{(isScheduled || isFailed) && (
|
||||
<div style={{ display: 'flex', gap: 8, justifyContent: 'flex-end' }}>
|
||||
{isScheduled && (
|
||||
<button
|
||||
onClick={() => handleCancel(item.upload_id)}
|
||||
style={{
|
||||
height: 30, padding: '0 12px', borderRadius: 8,
|
||||
border: '1px solid #379599', backgroundColor: 'transparent',
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 500, fontSize: 13,
|
||||
color: '#9bcacc', cursor: 'pointer',
|
||||
}}
|
||||
>
|
||||
취소
|
||||
</button>
|
||||
)}
|
||||
{isFailed && (
|
||||
<button
|
||||
onClick={() => handleRetry(item.upload_id)}
|
||||
style={{
|
||||
height: 30, padding: '0 12px', borderRadius: 8,
|
||||
border: 'none', backgroundColor: '#a65eff',
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 500, fontSize: 13,
|
||||
color: '#ffffff', cursor: 'pointer',
|
||||
}}
|
||||
>
|
||||
재시도
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
// ── 패널 콘텐츠 ────────────────────────────────────────────
|
||||
const renderPanelContent = () => {
|
||||
if (panelLoading) {
|
||||
return (
|
||||
<div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<span style={{ color: '#9bcacc', fontFamily: 'Pretendard, sans-serif', fontSize: 14 }}>불러오는 중...</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
if (sortedDateKeys.length === 0) {
|
||||
return (
|
||||
<div style={{
|
||||
flex: 1, display: 'flex', flexDirection: 'column',
|
||||
alignItems: 'center', justifyContent: 'center', gap: 24, padding: 16,
|
||||
}}>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 8, alignItems: 'center', textAlign: 'center' }}>
|
||||
<p style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 700, fontSize: 16,
|
||||
color: '#e5f1f2', letterSpacing: '-0.096px', lineHeight: '22px', margin: 0,
|
||||
}}>
|
||||
최근 결과 없음
|
||||
</p>
|
||||
<p style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 500, fontSize: 12,
|
||||
color: '#9bcacc', letterSpacing: '-0.072px', lineHeight: 1, margin: 0,
|
||||
}}>
|
||||
제작한 콘텐츠를 소셜 채널에 업로드해 보세요
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => onNavigate?.('ADO2 콘텐츠')}
|
||||
style={{
|
||||
height: 34, padding: '0 10px', borderRadius: 8, border: 'none',
|
||||
backgroundColor: '#a65eff', cursor: 'pointer',
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 600, fontSize: 14,
|
||||
color: '#ffffff',
|
||||
}}
|
||||
>
|
||||
ADO2 콘텐츠
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div
|
||||
ref={panelRef}
|
||||
style={{ flex: 1, overflowY: 'auto', padding: '12px 16px', display: 'flex', flexDirection: 'column', gap: 20 }}
|
||||
>
|
||||
{sortedDateKeys.map(dateKey => (
|
||||
<div
|
||||
key={dateKey}
|
||||
ref={el => { dateRefs.current[dateKey] = el; }}
|
||||
>
|
||||
<p style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 700, fontSize: 14,
|
||||
color: '#9bcacc', margin: '0 0 8px 0', letterSpacing: '-0.084px',
|
||||
}}>
|
||||
{formatDateLabel(dateKey)}
|
||||
</p>
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||||
{groupedByDate[dateKey].map(item => renderItem(item))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
// ════════════════════════════════════════════════════════════════
|
||||
// 모바일 레이아웃
|
||||
// ════════════════════════════════════════════════════════════════
|
||||
if (isMobile) {
|
||||
return (
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'column', alignItems: 'center',
|
||||
paddingTop: 24, paddingBottom: 20, width: '100%',
|
||||
boxSizing: 'border-box', position: 'relative',
|
||||
}}>
|
||||
<div style={{ width: '100%', paddingBottom: 24, paddingLeft: 20, paddingRight: 20, boxSizing: 'border-box' }}>
|
||||
<p style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 700, fontSize: 30,
|
||||
color: '#ffffff', letterSpacing: '-0.18px', lineHeight: 1.3, margin: 0,
|
||||
}}>
|
||||
콘텐츠 캘린더
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'column', gap: 16,
|
||||
width: '100%', paddingLeft: 20, paddingRight: 20,
|
||||
marginBottom: 16, boxSizing: 'border-box',
|
||||
}}>
|
||||
{renderMonthNav()}
|
||||
{renderStats()}
|
||||
</div>
|
||||
|
||||
<div style={{ width: '100%', display: 'flex', flexDirection: 'column', flex: 1, minHeight: 360 }}>
|
||||
{renderCalendarGrid()}
|
||||
</div>
|
||||
|
||||
{/* 바텀시트 */}
|
||||
<div style={{ position: 'fixed', bottom: 0, left: 0, right: 0, zIndex: 100, display: 'flex', flexDirection: 'column' }}>
|
||||
<div style={{
|
||||
backgroundColor: '#01393b',
|
||||
borderTop: '1px solid #046266',
|
||||
borderRadius: '20px 20px 0 0',
|
||||
overflow: 'hidden',
|
||||
}}>
|
||||
<div
|
||||
onClick={() => setSheetOpen(o => !o)}
|
||||
style={{ display: 'flex', justifyContent: 'center', padding: '8px 0', cursor: 'pointer' }}
|
||||
>
|
||||
<div style={{ width: 49, height: 4, backgroundColor: '#9bcacc', borderRadius: 999 }} />
|
||||
</div>
|
||||
<div style={{
|
||||
borderBottom: sheetOpen ? '1px solid #046266' : 'none',
|
||||
height: 50, display: 'flex', alignItems: 'center', padding: '0 16px',
|
||||
}}>
|
||||
{renderTabs()}
|
||||
</div>
|
||||
{sheetOpen && (
|
||||
<div style={{ height: 400, overflowY: 'auto', backgroundColor: '#01393b', display: 'flex', flexDirection: 'column' }}>
|
||||
{renderPanelContent()}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ height: sheetOpen ? 516 : 116 }} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// ════════════════════════════════════════════════════════════════
|
||||
// 데스크탑 레이아웃
|
||||
// ════════════════════════════════════════════════════════════════
|
||||
return (
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'column', alignItems: 'center',
|
||||
padding: '80px 32px',
|
||||
width: '100%',
|
||||
minWidth: 1400,
|
||||
height: '100%', boxSizing: 'border-box',
|
||||
}}>
|
||||
<div style={{ width: '100%', maxWidth: 1440, paddingBottom: 32, flexShrink: 0 }}>
|
||||
<p style={{
|
||||
fontFamily: 'Pretendard, sans-serif', fontWeight: 700, fontSize: 30,
|
||||
color: '#ffffff', letterSpacing: '-0.18px', lineHeight: 1.3, margin: 0,
|
||||
}}>
|
||||
콘텐츠 캘린더
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
display: 'grid',
|
||||
gridTemplateColumns: 'minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) 340px',
|
||||
gap: 16,
|
||||
width: '100%', maxWidth: 1440,
|
||||
flex: 1, minHeight: 0,
|
||||
}}>
|
||||
{/* 캘린더 영역 */}
|
||||
<div style={{
|
||||
gridColumn: '1 / span 8',
|
||||
backgroundColor: '#01393b',
|
||||
borderRadius: 20, padding: 16,
|
||||
display: 'flex', flexDirection: 'column', gap: 24,
|
||||
overflow: 'hidden',
|
||||
}}>
|
||||
<div style={{
|
||||
display: 'flex', alignItems: 'center',
|
||||
justifyContent: 'space-between', flexShrink: 0, width: '100%',
|
||||
}}>
|
||||
{renderMonthNav()}
|
||||
{renderStats()}
|
||||
</div>
|
||||
{loading ? (
|
||||
<div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<span style={{ color: '#9bcacc', fontFamily: 'Pretendard, sans-serif', fontSize: 14 }}>불러오는 중...</span>
|
||||
</div>
|
||||
) : renderCalendarGrid()}
|
||||
</div>
|
||||
|
||||
{/* 오른쪽 패널 */}
|
||||
<div style={{
|
||||
gridColumn: '9 / span 1',
|
||||
backgroundColor: '#01393b', borderRadius: 20,
|
||||
display: 'flex', flexDirection: 'column', overflow: 'hidden',
|
||||
}}>
|
||||
<div style={{
|
||||
borderBottom: '1px solid #046266',
|
||||
height: 66, display: 'flex', alignItems: 'center',
|
||||
padding: '0 16px', flexShrink: 0,
|
||||
}}>
|
||||
{renderTabs()}
|
||||
</div>
|
||||
{renderPanelContent()}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ContentCalendarContent;
|
||||
@@ -618,21 +618,22 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
// 블러 조건: 1)계정 미연결 2)업로드 영상 없음 3)데이터 없음
|
||||
const isBlurred = accounts.length === 0 || isEmptyState || !dashboardData;
|
||||
|
||||
// API 데이터 우선 사용, 없거나 영상 없음(isEmptyState) 시 Mock 데이터로 폴백
|
||||
const contentMetrics = (!isEmptyState && dashboardData?.contentMetrics?.length) ? dashboardData.contentMetrics : MOCK_CONTENT_METRICS;
|
||||
const topContent = (!isEmptyState && dashboardData?.topContent?.length) ? dashboardData.topContent : MOCK_TOP_CONTENT;
|
||||
const hasRealAgeGroups = !isEmptyState && !!dashboardData?.audienceData?.ageGroups?.some(g => g.percentage > 0);
|
||||
const hasRealGender = !isEmptyState && ((dashboardData?.audienceData?.gender?.male ?? 0) + (dashboardData?.audienceData?.gender?.female ?? 0)) > 0;
|
||||
const hasRealTopRegions = !isEmptyState && !!dashboardData?.audienceData?.topRegions?.some(r => r.percentage > 0);
|
||||
// showMockData=true면 전체 mock 강제, 아니면 API 우선 / isEmptyState 시 mock 폴백
|
||||
const useReal = !showMockData && !isEmptyState;
|
||||
const contentMetrics = (useReal && dashboardData?.contentMetrics?.length) ? dashboardData.contentMetrics : MOCK_CONTENT_METRICS;
|
||||
const topContent = (useReal && dashboardData?.topContent?.length) ? dashboardData.topContent : MOCK_TOP_CONTENT;
|
||||
const hasRealAgeGroups = useReal && !!dashboardData?.audienceData?.ageGroups?.some(g => g.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 audienceData = hasRealAudienceData ? dashboardData!.audienceData : MOCK_AUDIENCE_DATA;
|
||||
|
||||
// mode별 차트 데이터를 ChartDataPoint 통합 형식으로 변환
|
||||
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 }))
|
||||
: 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 }))
|
||||
: MOCK_DAILY_DATA.map((d: DailyData) => ({ label: d.date, current: d.thisPeriod, previous: d.lastPeriod })));
|
||||
|
||||
@@ -657,8 +658,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" />
|
||||
</svg>
|
||||
<div>
|
||||
<p style={{ color: '#a6ffea', fontWeight: 600, marginBottom: '2px' }}>아직 업로드된 영상이 없습니다.</p>
|
||||
<p style={{ color: 'rgba(255,255,255,0.5)', fontSize: '13px' }}>ADO2에서 영상을 업로드하면 실제 통계가 표시됩니다.</p>
|
||||
<p style={{ color: '#a6ffea', fontSize: '20px', fontWeight: 600, marginBottom: '2px' }}>아직 업로드된 영상이 없습니다.</p>
|
||||
<p style={{ color: 'rgba(255,255,255,0.5)', fontSize: '16px' }}>ADO2에서 영상을 업로드하면 실제 통계가 표시됩니다.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -786,7 +787,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<div>
|
||||
<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 className="mode-toggle">
|
||||
<button
|
||||
@@ -860,7 +861,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
<AnimatedSection delay={1000} className="audience-section">
|
||||
<div style={{ marginBottom: '16px' }}>
|
||||
<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 style={{ position: 'relative' }}>
|
||||
<div className="audience-cards" style={!hasRealAudienceData && !showMockData ? { filter: 'blur(4px)', pointerEvents: 'none', userSelect: 'none' } : {}}>
|
||||
@@ -883,7 +884,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
</div>
|
||||
</AnimatedItem>
|
||||
</div>
|
||||
{dashboardData && !isEmptyState && !hasRealAudienceData && (
|
||||
{dashboardData && !isEmptyState && !hasRealAudienceData && !showMockData && (
|
||||
<div style={{ position: 'absolute', inset: 0, display: 'flex', alignItems: 'center', justifyContent: 'center', pointerEvents: 'none' }}>
|
||||
<div style={{
|
||||
display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '10px',
|
||||
@@ -892,7 +893,7 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
borderRadius: '12px',
|
||||
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>
|
||||
</div>
|
||||
@@ -901,38 +902,36 @@ const DashboardContent: React.FC<DashboardContentProps> = ({ onNavigate }) => {
|
||||
</div>
|
||||
</AnimatedSection>
|
||||
|
||||
{/* 개발자 모드 전용: mock 데이터 블러 해제 버튼 */}
|
||||
{isTestPage && isEmptyState && (
|
||||
<button
|
||||
onClick={() => setShowMockData(prev => !prev)}
|
||||
style={{
|
||||
position: 'fixed',
|
||||
bottom: '24px',
|
||||
right: '24px',
|
||||
zIndex: 9999,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '6px',
|
||||
background: showMockData ? 'rgba(255,100,100,0.15)' : 'rgba(166,255,234,0.12)',
|
||||
border: `1px solid ${showMockData ? 'rgba(255,100,100,0.4)' : 'rgba(166,255,234,0.4)'}`,
|
||||
borderRadius: '10px',
|
||||
color: showMockData ? 'rgba(255,150,150,0.9)' : '#a6ffea',
|
||||
padding: '8px 14px',
|
||||
fontSize: '12px',
|
||||
fontWeight: 600,
|
||||
cursor: 'pointer',
|
||||
backdropFilter: 'blur(8px)',
|
||||
}}
|
||||
>
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
{showMockData
|
||||
? <><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94"/><path d="M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19"/><line x1="1" y1="1" x2="23" y2="23"/></>
|
||||
: <><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>
|
||||
{showMockData ? 'Mock 숨기기' : 'Mock 보기'} [DEV]
|
||||
</button>
|
||||
)}
|
||||
{/* mock 데이터 보기 버튼 */}
|
||||
<button
|
||||
onClick={() => setShowMockData(prev => !prev)}
|
||||
style={{
|
||||
position: 'fixed',
|
||||
bottom: '24px',
|
||||
right: '24px',
|
||||
zIndex: 9999,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '6px',
|
||||
background: showMockData ? 'rgba(255,100,100,0.15)' : 'rgba(166,255,234,0.12)',
|
||||
border: `1px solid ${showMockData ? 'rgba(255,100,100,0.4)' : 'rgba(166,255,234,0.4)'}`,
|
||||
borderRadius: '10px',
|
||||
color: showMockData ? 'rgba(255,150,150,0.9)' : '#a6ffea',
|
||||
padding: '8px 14px',
|
||||
fontSize: '12px',
|
||||
fontWeight: 600,
|
||||
cursor: 'pointer',
|
||||
backdropFilter: 'blur(8px)',
|
||||
}}
|
||||
>
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
{showMockData
|
||||
? <><path d="M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94"/><path d="M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19"/><line x1="1" y1="1" x2="23" y2="23"/></>
|
||||
: <><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>
|
||||
{showMockData ? 'Sample 숨기기' : 'Sample 보기'}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import Sidebar from '../../components/Sidebar';
|
||||
import AssetManagementContent from './AssetManagementContent';
|
||||
@@ -10,6 +10,7 @@ import BusinessSettingsContent from './BusinessSettingsContent';
|
||||
import UrlInputContent from './UrlInputContent';
|
||||
import ADO2ContentsPage from './ADO2ContentsPage';
|
||||
import MyInfoContent from './MyInfoContent';
|
||||
import ContentCalendarContent from './ContentCalendarContent';
|
||||
import LoadingSection from '../Analysis/LoadingSection';
|
||||
import AnalysisResultSection from '../Analysis/AnalysisResultSection';
|
||||
import { ImageItem, CrawlingResponse, UserMeResponse } from '../../types/api';
|
||||
@@ -88,11 +89,17 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
||||
|
||||
// 초기 위저드 단계 결정
|
||||
const getInitialWizardStep = (): number => {
|
||||
// 저장된 단계가 있으면 사용
|
||||
if (savedWizardStep !== null) {
|
||||
return parseInt(savedWizardStep, 10);
|
||||
const step = parseInt(savedWizardStep, 10);
|
||||
// 분석 데이터가 있는데 URL 입력(-2) 또는 로딩(-1) 단계로 저장된 경우:
|
||||
// 로그인 후 재진입이므로 에셋 관리(1)부터 시작
|
||||
const hasAnalysisData = initialAnalysisData || savedAnalysisData;
|
||||
if (hasAnalysisData && step < 1) {
|
||||
return 1;
|
||||
}
|
||||
return step;
|
||||
}
|
||||
// 분석 데이터가 있으면 에셋 관리(1)부터, 없으면 URL 입력(-2)부터
|
||||
// 저장된 단계 없음: 분석 데이터가 있으면 에셋 관리(1), 없으면 URL 입력(-2)
|
||||
const hasAnalysisData = initialAnalysisData || savedAnalysisData;
|
||||
return hasAnalysisData ? 1 : -2;
|
||||
};
|
||||
@@ -141,13 +148,18 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
||||
};
|
||||
|
||||
const [imageList, setImageList] = useState<ImageItem[]>(getInitialImageList());
|
||||
const prevAnalysisMIdRef = useRef<number | null | undefined>(analysisData?.m_id);
|
||||
|
||||
// analysisData 변경 시 imageList 업데이트
|
||||
// analysisData 변경 시 m_id가 바뀐 경우(새로운 분석)에만 imageList 업데이트
|
||||
// m_id가 동일하면 언어 변경 등 기타 업데이트이므로 사용자가 수정한 이미지 목록 유지
|
||||
useEffect(() => {
|
||||
console.log('[GenerationFlow] analysisData updated, m_id:', analysisData?.m_id);
|
||||
if (analysisData?.image_list && analysisData.image_list.length > 0) {
|
||||
setImageList(analysisData.image_list.map(url => ({ type: 'url', url })));
|
||||
if (prevAnalysisMIdRef.current !== analysisData.m_id) {
|
||||
setImageList(analysisData.image_list.map(url => ({ type: 'url', url })));
|
||||
}
|
||||
}
|
||||
prevAnalysisMIdRef.current = analysisData?.m_id;
|
||||
}, [analysisData]);
|
||||
|
||||
const handleRemoveImage = (index: number) => {
|
||||
@@ -310,6 +322,8 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
||||
// 기존 프로젝트 데이터 초기화
|
||||
clearAllProjectStorage();
|
||||
localStorage.removeItem(ANALYSIS_DATA_KEY);
|
||||
// URL 입력 단계로 명시적 저장 (다음 진입 시 올바른 단계 복원)
|
||||
localStorage.setItem(WIZARD_STEP_KEY, '-2');
|
||||
setWizardStep(-2);
|
||||
setSongTaskId(null);
|
||||
setImageTaskId(null);
|
||||
@@ -354,6 +368,7 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
||||
case 1:
|
||||
return (
|
||||
<AssetManagementContent
|
||||
onBack={() => goToWizardStep(0)}
|
||||
onNext={(taskId: string) => {
|
||||
// Clear video generation state to start fresh
|
||||
localStorage.removeItem(VIDEO_GENERATION_KEY);
|
||||
@@ -420,6 +435,8 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
||||
onBack={() => setActiveItem('새 프로젝트 만들기')}
|
||||
/>
|
||||
);
|
||||
case '콘텐츠 캘린더':
|
||||
return <ContentCalendarContent onNavigate={handleNavigate} />;
|
||||
case '내 정보':
|
||||
return <MyInfoContent />;
|
||||
case '새 프로젝트 만들기':
|
||||
@@ -447,7 +464,7 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
||||
// 브랜드 분석(0)일 때는 전체 페이지 스크롤
|
||||
const isBrandAnalysis = activeItem === '새 프로젝트 만들기' && wizardStep === 0;
|
||||
// 스크롤이 필요한 페이지: 대시보드, 비즈니스 설정, 브랜드 분석(0), ADO2 콘텐츠, 내 정보
|
||||
const needsScroll = activeItem === '대시보드' || activeItem === '비즈니스 설정' || activeItem === 'ADO2 콘텐츠' || activeItem === '내 정보' || isBrandAnalysis;
|
||||
const needsScroll = activeItem === '대시보드' || activeItem === '비즈니스 설정' || activeItem === 'ADO2 콘텐츠' || activeItem === '내 정보' || activeItem === '콘텐츠 캘린더' || isBrandAnalysis;
|
||||
|
||||
// 브랜드 분석일 때는 전체 화면 스크롤
|
||||
if (isBrandAnalysis) {
|
||||
@@ -468,7 +485,7 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
||||
{showSidebar && (
|
||||
<Sidebar activeItem={activeItem} onNavigate={handleNavigate} onHome={handleHome} userInfo={userInfo} onLogout={handleLogout} />
|
||||
)}
|
||||
<div className={`flex-1 relative pl-0 md:pl-0 ${needsScroll ? 'overflow-y-auto' : 'h-full overflow-hidden'}`}>
|
||||
<div className={`flex-1 relative pl-0 md:pl-0 ${needsScroll ? 'overflow-auto' : 'h-full overflow-hidden'}`}>
|
||||
{renderContent()}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -286,6 +286,9 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
||||
setErrorMessage(null);
|
||||
setStatusMessage(t('soundStudio.generatingLyrics'));
|
||||
|
||||
const savedRatio = localStorage.getItem('castad_video_ratio');
|
||||
const orientation = (savedRatio === 'horizontal' || savedRatio === 'vertical') ? savedRatio : 'vertical';
|
||||
|
||||
try {
|
||||
const language = LANGUAGE_MAP[selectedLang] || 'Korean';
|
||||
|
||||
@@ -298,6 +301,7 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
||||
m_id: mId,
|
||||
region: businessInfo.region,
|
||||
task_id: imageTaskId,
|
||||
orientation,
|
||||
});
|
||||
|
||||
if (!lyricResponse.success || !lyricResponse.task_id) {
|
||||
@@ -386,7 +390,7 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
||||
const isGenerating = status === 'generating_lyric' || status === 'generating_song' || status === 'polling';
|
||||
|
||||
return (
|
||||
<main className="page-container">
|
||||
<main className="sound-studio-page">
|
||||
{audioUrl && (
|
||||
<audio ref={audioRef} src={audioUrl} preload="metadata" />
|
||||
)}
|
||||
@@ -517,6 +521,31 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Generate Button / Status Message (교체) */}
|
||||
{isGenerating && statusMessage ? (
|
||||
<div className="status-message-new">
|
||||
<svg className="animate-spin h-4 w-4" viewBox="0 0 24 24">
|
||||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none"/>
|
||||
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"/>
|
||||
</svg>
|
||||
{statusMessage}
|
||||
</div>
|
||||
) : (
|
||||
<button
|
||||
onClick={handleGenerateMusic}
|
||||
disabled={isGenerating}
|
||||
className={`btn-generate-sound ${isGenerating ? 'disabled' : ''}`}
|
||||
>
|
||||
{t('soundStudio.generateButton')}
|
||||
</button>
|
||||
)}
|
||||
|
||||
{errorMessage && (
|
||||
<div className="error-message-new">
|
||||
{errorMessage}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Right Column - Lyrics */}
|
||||
@@ -578,41 +607,6 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Generate Button */}
|
||||
<button
|
||||
onClick={handleGenerateMusic}
|
||||
disabled={isGenerating}
|
||||
className={`btn-generate-sound ${isGenerating ? 'disabled' : ''}`}
|
||||
>
|
||||
{isGenerating ? (
|
||||
<>
|
||||
<svg className="animate-spin h-4 w-4" viewBox="0 0 24 24">
|
||||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none"/>
|
||||
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"/>
|
||||
</svg>
|
||||
{t('soundStudio.generating')}
|
||||
</>
|
||||
) : (
|
||||
t('soundStudio.generateButton')
|
||||
)}
|
||||
</button>
|
||||
|
||||
{errorMessage && (
|
||||
<div className="error-message-new">
|
||||
{errorMessage}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{isGenerating && statusMessage && (
|
||||
<div className="status-message-new">
|
||||
<svg className="animate-spin h-4 w-4" viewBox="0 0 24 24">
|
||||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none"/>
|
||||
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"/>
|
||||
</svg>
|
||||
{statusMessage}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Bottom Button */}
|
||||
@@ -653,3 +647,4 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
||||
};
|
||||
|
||||
export default SoundStudioContent;
|
||||
|
||||
@@ -124,6 +124,17 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
||||
}
|
||||
};
|
||||
|
||||
// 붙여넣기 시 URL만 추출
|
||||
const handlePaste = (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]);
|
||||
}
|
||||
};
|
||||
|
||||
// 폼 제출 처리
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
@@ -196,10 +207,19 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
||||
{/* 입력 필드 */}
|
||||
<div className="url-input-field-container" ref={autocompleteRef}>
|
||||
<input
|
||||
type={searchType === 'url' ? 'url' : 'text'}
|
||||
type="text"
|
||||
value={inputValue}
|
||||
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);
|
||||
|
||||
// 업체명 검색일 때 자동완성 검색 (디바운스)
|
||||
@@ -212,6 +232,7 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
||||
}, 300);
|
||||
}
|
||||
}}
|
||||
onPaste={handlePaste}
|
||||
onFocus={() => {
|
||||
if (searchType === 'name' && autocompleteResults.length > 0) {
|
||||
setShowAutocomplete(true);
|
||||
@@ -245,13 +266,13 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 검색 버튼 */}
|
||||
<button type="submit" className="url-input-button">
|
||||
{t('urlInput.searchButton')}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* 검색 버튼 */}
|
||||
<button type="submit" className="url-input-button">
|
||||
{t('urlInput.searchButton')}
|
||||
</button>
|
||||
|
||||
{/* 에러 메시지 */}
|
||||
{error && (
|
||||
<p className="url-input-error">{error}</p>
|
||||
|
||||
@@ -376,7 +376,16 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
|
||||
type="text"
|
||||
value={inputValue}
|
||||
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);
|
||||
setHighlightedIndex(-1); // 입력 시 하이라이트 초기화
|
||||
if (localError) setLocalError('');
|
||||
@@ -391,6 +400,16 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
|
||||
}, 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={() => {
|
||||
setIsFocused(true);
|
||||
if (searchType === 'name' && autocompleteResults.length > 0) {
|
||||
|
||||
@@ -67,6 +67,7 @@ export interface LyricGenerateRequest {
|
||||
m_id: number;
|
||||
region: string;
|
||||
task_id: string;
|
||||
orientation?: 'vertical' | 'horizontal';
|
||||
}
|
||||
|
||||
// 가사 생성 응답
|
||||
@@ -366,6 +367,30 @@ export interface SocialUploadStatusResponse {
|
||||
uploaded_at?: string;
|
||||
}
|
||||
|
||||
// 업로드 히스토리 아이템
|
||||
export interface UploadHistoryItem {
|
||||
upload_id: number;
|
||||
video_id: number;
|
||||
platform: string;
|
||||
status: 'pending' | 'uploading' | 'completed' | 'failed' | 'scheduled' | 'cancelled';
|
||||
title: string;
|
||||
channel_name: string;
|
||||
scheduled_at: string | null;
|
||||
uploaded_at: string | null;
|
||||
created_at: string;
|
||||
platform_url: string | null;
|
||||
error_message: string | null;
|
||||
}
|
||||
|
||||
// 업로드 히스토리 응답
|
||||
export interface UploadHistoryResponse {
|
||||
success: boolean;
|
||||
items: UploadHistoryItem[];
|
||||
total?: number;
|
||||
page?: number;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
// Social OAuth 토큰 만료 에러 응답
|
||||
export interface TokenExpiredErrorResponse {
|
||||
detail: string;
|
||||
|
||||
+57
-4
@@ -596,14 +596,28 @@ export async function refreshAccessToken(): Promise<TokenRefreshResponse> {
|
||||
return data;
|
||||
}
|
||||
|
||||
// 로컬 스토리지 전체 정리
|
||||
function clearAllLocalData() {
|
||||
clearTokens();
|
||||
localStorage.removeItem('castad_view_mode');
|
||||
localStorage.removeItem('castad_analysis_data');
|
||||
localStorage.removeItem('castad_wizard_step');
|
||||
localStorage.removeItem('castad_active_item');
|
||||
localStorage.removeItem('castad_song_task_id');
|
||||
localStorage.removeItem('castad_image_task_id');
|
||||
localStorage.removeItem('castad_song_generation');
|
||||
localStorage.removeItem('castad_video_generation');
|
||||
localStorage.removeItem('castad_video_ratio');
|
||||
}
|
||||
|
||||
// 로그아웃
|
||||
export async function logout(): Promise<void> {
|
||||
const response = await authenticatedFetch(`${API_URL}/user/auth/logout`, {
|
||||
method: 'POST',
|
||||
});
|
||||
|
||||
// 응답과 관계없이 로컬 토큰 삭제
|
||||
clearTokens();
|
||||
// 응답과 관계없이 로컬 데이터 전체 삭제
|
||||
clearAllLocalData();
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
@@ -616,8 +630,8 @@ export async function logoutAll(): Promise<void> {
|
||||
method: 'POST',
|
||||
});
|
||||
|
||||
// 응답과 관계없이 로컬 토큰 삭제
|
||||
clearTokens();
|
||||
// 응답과 관계없이 로컬 데이터 전체 삭제
|
||||
clearAllLocalData();
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
@@ -877,3 +891,42 @@ export async function waitForUploadComplete(
|
||||
|
||||
return poll();
|
||||
}
|
||||
|
||||
// 업로드 히스토리 조회
|
||||
export async function getUploadHistory(
|
||||
tab: 'all' | 'completed' | 'scheduled' | 'failed' = 'all',
|
||||
options?: { year?: number; month?: number; platform?: string; page?: number; size?: number }
|
||||
): Promise<import('../types/api').UploadHistoryResponse> {
|
||||
const params = new URLSearchParams({ tab });
|
||||
if (options?.year) params.set('year', String(options.year));
|
||||
if (options?.month) params.set('month', String(options.month));
|
||||
if (options?.platform) params.set('platform', options.platform);
|
||||
if (options?.page) params.set('page', String(options.page));
|
||||
if (options?.size) params.set('size', String(options.size));
|
||||
const response = await authenticatedFetch(
|
||||
`${API_URL}/social/upload/history?${params.toString()}`,
|
||||
{ method: 'GET' }
|
||||
);
|
||||
if (!response.ok) throw new Error('히스토리 조회 실패');
|
||||
return response.json();
|
||||
}
|
||||
|
||||
// 예약 업로드 취소
|
||||
export async function cancelUpload(uploadId: number): Promise<{ success: boolean; message: string }> {
|
||||
const response = await authenticatedFetch(
|
||||
`${API_URL}/social/upload/${uploadId}`,
|
||||
{ method: 'DELETE' }
|
||||
);
|
||||
if (!response.ok) throw new Error('취소 실패');
|
||||
return response.json();
|
||||
}
|
||||
|
||||
// 업로드 재시도
|
||||
export async function retryUpload(uploadId: number): Promise<{ success: boolean; message: string }> {
|
||||
const response = await authenticatedFetch(
|
||||
`${API_URL}/social/upload/${uploadId}/retry`,
|
||||
{ method: 'POST' }
|
||||
);
|
||||
if (!response.ok) throw new Error('재시도 실패');
|
||||
return response.json();
|
||||
}
|
||||
@@ -150,7 +150,7 @@
|
||||
<div class="toast" id="toast"></div>
|
||||
|
||||
<script>
|
||||
const koData = {"header":{"loginFailedAlert":"로그인 URL을 가져오는데 실패했습니다. 다시 시도해주세요.","start":"시작하기","loading":"로딩...","login":"로그인"},"sidebar":{"dashboard":"대시보드","newProject":"새 프로젝트 만들기","ado2Contents":"ADO2 콘텐츠","myContents":"내 콘텐츠","myInfo":"내 정보","defaultUser":"사용자","loggingOut":"로그아웃 중...","logout":"로그아웃"},"footer":{"businessNumber":"사업자 등록번호 : 620-87-00810 | 대표 : 안성민","headquarters":"본사 : 41593 대구광역시 북구 옥산로 111, 5층 유니콘랩 대구 A05호","researchCenter":"연구소 : 13453 경기 성남시 수정구 금토로 32 (금토동) (주)KT 판교빌딩 504호~505호 (East)","phone":"전화 : 070-4260-8310 | 010-2755-6463","email":"이메일 : o2oteam@o2o.kr"},"social":{"title":"소셜 미디어 포스팅","postNumber":"게시물 1","videoSpecs":"1080x1920 · 10초","channelLabel":"게시 채널","loadingAccounts":"계정 로딩 중...","noAccounts":"연결된 소셜 계정이 없습니다.","noAccountsHint":"내 정보에서 계정을 연결해주세요.","postTitleLabel":"게시물 제목","postTitlePlaceholder":"게시물 제목을 입력하세요.","postContentLabel":"게시물 내용","postContentPlaceholder":"게시물 내용을 입력하세요.","tagsLabel":"태그","tagsPlaceholder":"태그를 입력하세요. (쉼표로 구분)","privacyLabel":"게시물 공개 범위","privacyPublic":"공개","privacyUnlisted":"미등록 (링크로만 접근)","privacyPrivate":"비공개","publishTimeLabel":"게시 시간","publishNow":"지금 게시","publishSchedule":"시간 설정 (준비 중)","footerNote":"게시는 {link} 후 가능합니다.","footerNoteLink":"요금제 업그레이드","cancel":"취소","posting":"게시 중...","post":"게시","youtubeExpiredAlert":"YouTube 인증이 만료되었습니다. 재연동 페이지로 이동합니다.","channelAndTitleRequired":"채널과 제목을 입력해주세요.","selectChannel":"채널을 선택해주세요.","invalidVideoInfo":"영상 정보가 올바르지 않습니다. (video_id 누락)","uploadStartFailed":"업로드 시작에 실패했습니다.","uploadFailed":"업로드에 실패했습니다."},"upload":{"title":"YouTube 업로드","statusPending":"업로드 준비 중...","statusUploading":"업로드 중...","statusCompleted":"업로드 완료!","statusFailed":"업로드 실패","statusDefault":"처리 중...","videoTitleLabel":"영상 제목","channelLabel":"채널","viewOnYoutube":"YouTube에서 보기","confirm":"확인","close":"닫기","doNotClose":"업로드가 진행 중입니다. 창을 닫지 마세요."},"landing":{"hero":{"searchTypeBusinessName":"업체명","placeholderBusinessName":"업체명을 입력하세요","guideUrl":"URL에서 가져온 정보로 영상이 자동 생성됩니다.","guideBusinessName":"업체명으로 검색하여 정보를 가져옵니다.","errorUrlRequired":"URL을 입력해주세요.","errorNameRequired":"업체명을 입력해주세요.","errorInvalidUrl":"올바른 URL 형식이 아닙니다. (예: https://example.com)","analyzeButton":"브랜드 분석","scrollMore":"스크롤하여 더 보기","testDataLoading":"로딩 중...","testData":"테스트 데이터","testDataLoadFailed":"테스트 데이터를 불러오는데 실패했습니다.","searching":"검색 중..."},"welcome":{"title":"ADO2.AI에 오신 것을 환영합니다.","subtitle":"분석, 제작, 배포까지 콘텐츠 마케팅의 전과정을 자동화","feature1Title":"비즈니스 핵심 정보 분석","feature1Desc":"홈페이지, 네이버 지도, 블로그 등의\nURL을 입력하세요","feature2Title":"홍보 콘텐츠 자동 제작","feature2Desc":"분석된 정보를 바탕으로\n비즈니스에 맞는 음악, 자막, 노래, 영상을\n자동으로 제작해요","feature3Title":"멀티채널 자동 배포","feature3Desc":"완성된 영상은 다운로드하거나\n바로 SNS에 업로드 할 수 있어요"},"display":{"startButton":"시작하기"}},"login":{"back":"뒤로가기","kakaoLoginFailed":"카카오 로그인에 실패했습니다. 다시 시도해주세요.","loginUrlFailed":"로그인 URL을 가져오는데 실패했습니다. 다시 시도해주세요.","loggingIn":"로그인 중...","kakaoStart":"카카오로 시작하기"},"urlInput":{"searchTypeBusinessName":"업체명","placeholderBusinessName":"업체명을 입력하세요","guideUrl":"URL에서 가져온 정보로 영상이 자동 생성됩니다.","guideBusinessName":"업체명으로 검색하여 정보를 가져옵니다.","searchButton":"검색하기","searching":"검색 중...","testDataLoading":"로딩 중...","testData":"테스트 데이터"},"assetManagement":{"title":"브랜드 에셋","selectedImages":"선택된 이미지","imageAlt":"이미지","uploadBadge":"업로드","imageUpload":"이미지 업로드","dragAndDrop":"이미지를 드래그하여\n업로드","videoRatio":Line truncated
|
||||
const koData = {"header":{"loginFailedAlert":"로그인 URL을 가져오는데 실패했습니다. 다시 시도해주세요.","start":"시작하기","loading":"로딩...","login":"로그인"},"sidebar":{"dashboard":"대시보드","newProject":"새 프로젝트 만들기","ado2Contents":"ADO2 콘텐츠","myContents":"내 콘텐츠","myInfo":"내 정보","defaultUser":"사용자","loggingOut":"로그아웃 중...","logout":"로그아웃"},"footer":{"businessNumber":"사업자 등록번호 : 620-87-00810 | 대표 : 안성민","headquarters":"본사 : 41593 대구광역시 북구 옥산로 111, 5층 유니콘랩 대구 A05호","researchCenter":"연구소 : 13453 경기 성남시 수정구 금토로 32 (금토동) (주)KT 판교빌딩 504호~505호 (East)","phone":"전화 : 070-4260-8310 | 010-2755-6463","email":"이메일 : o2oteam@o2o.kr"},"social":{"title":"소셜 미디어 포스팅","postNumber":"게시물 1","videoSpecs":"1080x1920 · 10초","channelLabel":"게시 채널","loadingAccounts":"계정 로딩 중...","noAccounts":"연결된 소셜 계정이 없습니다.","noAccountsHint":"내 정보에서 계정을 연결해주세요.","postTitleLabel":"게시물 제목","postTitlePlaceholder":"게시물 제목을 입력하세요.","postContentLabel":"게시물 내용","postContentPlaceholder":"게시물 내용을 입력하세요.","tagsLabel":"태그","tagsPlaceholder":"태그를 입력하세요. (쉼표로 구분)","privacyLabel":"게시물 공개 범위","privacyPublic":"공개","privacyUnlisted":"미등록 (링크로만 접근)","privacyPrivate":"비공개","publishTimeLabel":"게시 시간","publishNow":"지금 게시","publishSchedule":"시간 설정","footerNote":"게시는 {link} 후 가능합니다.","footerNoteLink":"요금제 업그레이드","cancel":"취소","posting":"게시 중...","post":"게시","youtubeExpiredAlert":"YouTube 인증이 만료되었습니다. 재연동 페이지로 이동합니다.","channelAndTitleRequired":"채널과 제목을 입력해주세요.","selectChannel":"채널을 선택해주세요.","invalidVideoInfo":"영상 정보가 올바르지 않습니다. (video_id 누락)","uploadStartFailed":"업로드 시작에 실패했습니다.","uploadFailed":"업로드에 실패했습니다."},"upload":{"title":"YouTube 업로드","statusPending":"업로드 준비 중...","statusUploading":"업로드 중...","statusCompleted":"업로드 완료!","statusFailed":"업로드 실패","statusDefault":"처리 중...","videoTitleLabel":"영상 제목","channelLabel":"채널","viewOnYoutube":"YouTube에서 보기","confirm":"확인","close":"닫기","doNotClose":"업로드가 진행 중입니다. 창을 닫지 마세요."},"landing":{"hero":{"searchTypeBusinessName":"업체명","placeholderBusinessName":"업체명을 입력하세요","guideUrl":"URL에서 가져온 정보로 영상이 자동 생성됩니다.","guideBusinessName":"업체명으로 검색하여 정보를 가져옵니다.","errorUrlRequired":"URL을 입력해주세요.","errorNameRequired":"업체명을 입력해주세요.","errorInvalidUrl":"올바른 URL 형식이 아닙니다. (예: https://example.com)","analyzeButton":"브랜드 분석","scrollMore":"스크롤하여 더 보기","testDataLoading":"로딩 중...","testData":"테스트 데이터","testDataLoadFailed":"테스트 데이터를 불러오는데 실패했습니다.","searching":"검색 중..."},"welcome":{"title":"ADO2.AI에 오신 것을 환영합니다.","subtitle":"분석, 제작, 배포까지 콘텐츠 마케팅의 전과정을 자동화","feature1Title":"비즈니스 핵심 정보 분석","feature1Desc":"홈페이지, 네이버 지도, 블로그 등의\nURL을 입력하세요","feature2Title":"홍보 콘텐츠 자동 제작","feature2Desc":"분석된 정보를 바탕으로\n비즈니스에 맞는 음악, 자막, 노래, 영상을\n자동으로 제작해요","feature3Title":"멀티채널 자동 배포","feature3Desc":"완성된 영상은 다운로드하거나\n바로 SNS에 업로드 할 수 있어요"},"display":{"startButton":"시작하기"}},"login":{"back":"뒤로가기","kakaoLoginFailed":"카카오 로그인에 실패했습니다. 다시 시도해주세요.","loginUrlFailed":"로그인 URL을 가져오는데 실패했습니다. 다시 시도해주세요.","loggingIn":"로그인 중...","kakaoStart":"카카오로 시작하기"},"urlInput":{"searchTypeBusinessName":"업체명","placeholderBusinessName":"업체명을 입력하세요","guideUrl":"URL에서 가져온 정보로 영상이 자동 생성됩니다.","guideBusinessName":"업체명으로 검색하여 정보를 가져옵니다.","searchButton":"검색하기","searching":"검색 중...","testDataLoading":"로딩 중...","testData":"테스트 데이터"},"assetManagement":{"title":"브랜드 에셋","selectedImages":"선택된 이미지","imageAlt":"이미지","uploadBadge":"업로드","imageUpload":"이미지 업로드","dragAndDrop":"이미지를 드래그하여\n업로드","videoRatio":"영상 비Line truncated
|
||||
|
||||
const enData = {"header":{"loginFailedAlert":"Failed to get login URL. Please try again.","start":"Get Started","loading":"Loading...","login":"Log In"},"sidebar":{"dashboard":"Dashboard","newProject":"Create New Project","ado2Contents":"ADO2 Contents","myContents":"My Contents","myInfo":"My Info","defaultUser":"User","loggingOut":"Logging out...","logout":"Log Out"},"footer":{"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","researchCenter":"R&D : 13453 Rooms 504-505 (East), KT Pangyo Bldg, 32 Geumto-ro, Sujeong-gu, Seongnam-si, Gyeonggi-do, Korea","phone":"Tel : 070-4260-8310 | 010-2755-6463","email":"Email : o2oteam@o2o.kr"},"social":{"title":"Social Media Posting","postNumber":"Post 1","videoSpecs":"1080x1920 · 10 sec","channelLabel":"Post Channel","loadingAccounts":"Loading accounts...","noAccounts":"No connected social accounts.","noAccountsHint":"Please connect an account in My Info.","postTitleLabel":"Post Title","postTitlePlaceholder":"Enter a post title.","postContentLabel":"Post Content","postContentPlaceholder":"Enter post content.","tagsLabel":"Tags","tagsPlaceholder":"Enter tags. (separated by commas)","privacyLabel":"Post Visibility","privacyPublic":"Public","privacyUnlisted":"Unlisted (accessible by link only)","privacyPrivate":"Private","publishTimeLabel":"Publish Time","publishNow":"Publish Now","publishSchedule":"Schedule (Coming Soon)","footerNote":"Posting is available after {link}.","footerNoteLink":"plan upgrade","cancel":"Cancel","posting":"Posting...","post":"Post","youtubeExpiredAlert":"YouTube authentication has expired. Redirecting to reconnect page.","channelAndTitleRequired":"Please enter a channel and title.","selectChannel":"Please select a channel.","invalidVideoInfo":"Video information is invalid. (missing video_id)","uploadStartFailed":"Failed to start upload.","uploadFailed":"Upload failed."},"upload":{"title":"YouTube Upload","statusPending":"Preparing upload...","statusUploading":"Uploading...","statusCompleted":"Upload complete!","statusFailed":"Upload failed","statusDefault":"Processing...","videoTitleLabel":"Video Title","channelLabel":"Channel","viewOnYoutube":"View on YouTube","confirm":"OK","close":"Close","doNotClose":"Upload is in progress. Do not close this window."},"landing":{"hero":{"searchTypeBusinessName":"Business Name","placeholderBusinessName":"Enter a business name","guideUrl":"A video will be automatically generated from the information gathered from the URL.","guideBusinessName":"Search by business name to retrieve information.","errorUrlRequired":"Please enter a URL.","errorNameRequired":"Please enter a business name.","errorInvalidUrl":"Invalid URL format. (e.g., https://example.com)","analyzeButton":"Brand Analysis","scrollMore":"Scroll to see more","testDataLoading":"Loading...","testData":"Test Data","testDataLoadFailed":"Failed to load test data.","searching":"Searching..."},"welcome":{"title":"Welcome to ADO2.AI","subtitle":"Automate the entire content marketing process from analysis, creation, to distribution","feature1Title":"Business Core Information Analysis","feature1Desc":"Enter the URL of your homepage,\nNaver Map, blog, etc.","feature2Title":"Automated Promotional Content Creation","feature2Desc":"Based on analyzed information,\nautomatically create music, subtitles, songs,\nand videos tailored to your business","feature3Title":"Multi-Channel Auto Distribution","feature3Desc":"Completed videos can be downloaded\nor uploaded directly to social media"},"display":{"startButton":"Get Started"}},"login":{"back":"Go Back","kakaoLoginFailed":"Kakao login failed. Please try again.","loginUrlFailed":"Failed to get login URL. Please try again.","loggingIn":"Logging in...","kakaoStart":"Start with Kakao"},"urlInput":{"searchTypeBusinessName":"Business Name","placeholderBusinessName":"Enter a business name","guideUrl":"A video will be automatically generated from the information gathered from the URL.","guideBusinessName":"Search by business name to retrieve information.","searchButton":"Search","searching":"Searching...","testDataLoading":"Loading...","testData":"Test Data"},"assetManagement":{"title":"Brand Assets","selectedImages":"Selected Images","imageAlt":"Image","uploadBadge":"Uploaded","imageUpload":"Image Upload","dragAndDrop":"Drag and drop\nimages to upload","videoRatio":"Video Ratio","uploadFailed":"Image upload failed.","uploading":"Uploading...","nextStep":"Next Step"},"soundStudio":{"back":"Go Back","title":"Sound Studio","soundColumn":"Sound","soundTypeLabel":"Select AI Sound Type","soundTypeVocal":"Vocal","soundTypeBGM":"Background Music","soundTypeNarration":"Voice Narration","genreLabel":"Select Genre","genreAuto":"Auto Select","genreBallad":"Ballad","languageLabel":"Language","languageKorean":"Korean","lyricsColumn":"Lyrics","lyricsHint":"Select the lyrics area to edit","lyricsPlaceholder":"Lyrics will be Line truncated
|
||||
|
||||
|
||||
Reference in new issue
Block a user