Compare commits
34
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd1f873a6e | ||
|
|
1daf6b0eb2 | ||
|
|
8734d3388d | ||
|
|
f0d9106860 | ||
|
|
5407812889 | ||
|
|
faaca0f4fb | ||
|
|
d7cb0167ec | ||
|
|
e7814742e5 | ||
|
|
7c3c0b4508 | ||
|
|
5b6fab8ef4 | ||
|
|
eceea6a5a4 | ||
|
|
a7c1d1ec76 | ||
|
|
5ec50e66de | ||
|
|
eb55383de5 | ||
|
|
3f3f8bb159 | ||
|
|
7aedf07203 | ||
|
|
65ea09ffd5 | ||
|
|
388351e6d4 | ||
|
|
fa4864e9ef | ||
|
|
1d868627e4 | ||
|
|
8086e28908 | ||
|
|
dc3d128b22 | ||
|
|
937ef7a576 | ||
|
|
9fe03a66cb | ||
|
|
8be7b7adcf | ||
|
|
3cbc48181b | ||
|
|
b05c7bd080 | ||
|
|
cd4114f74d | ||
|
|
ed13c83ae0 | ||
|
|
be32a04dd0 | ||
|
|
cab67c711a | ||
|
|
440a6c8b72 | ||
|
|
ba4d143189 | ||
|
|
1a4155da9b |
No files matched your search
@@ -1,6 +0,0 @@
|
|||||||
# Local server
|
|
||||||
VITE_PORT=3000
|
|
||||||
VITE_HOST=localhost
|
|
||||||
|
|
||||||
# API server
|
|
||||||
VITE_API_URL=http://40.82.133.44
|
|
||||||
@@ -38,6 +38,9 @@ CASTAD 프론트엔드 프로젝트 입니다.
|
|||||||
# 의존성 설치
|
# 의존성 설치
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
|
# recharts 설치 (대시보드용 차트 라이브러리)
|
||||||
|
npm install recharts
|
||||||
|
|
||||||
# 개발 서버 실행 (http://localhost:3000)
|
# 개발 서버 실행 (http://localhost:3000)
|
||||||
npm run dev
|
npm run dev
|
||||||
|
|
||||||
|
|||||||
Generated
+399
-9
@@ -11,7 +11,8 @@
|
|||||||
"i18next": "^25.8.4",
|
"i18next": "^25.8.4",
|
||||||
"react": "^19.2.3",
|
"react": "^19.2.3",
|
||||||
"react-dom": "^19.2.3",
|
"react-dom": "^19.2.3",
|
||||||
"react-i18next": "^16.5.4"
|
"react-i18next": "^16.5.4",
|
||||||
|
"recharts": "^3.8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.14.0",
|
"@types/node": "^22.14.0",
|
||||||
@@ -51,7 +52,6 @@
|
|||||||
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
|
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.27.1",
|
"@babel/code-frame": "^7.27.1",
|
||||||
"@babel/generator": "^7.28.5",
|
"@babel/generator": "^7.28.5",
|
||||||
@@ -804,6 +804,42 @@
|
|||||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@reduxjs/toolkit": {
|
||||||
|
"version": "2.11.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.11.2.tgz",
|
||||||
|
"integrity": "sha512-Kd6kAHTA6/nUpp8mySPqj3en3dm0tdMIgbttnQ1xFMVpufoj+ADi8pXLBsd4xzTRHQa7t/Jv8W5UnCuW4kuWMQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@standard-schema/spec": "^1.0.0",
|
||||||
|
"@standard-schema/utils": "^0.3.0",
|
||||||
|
"immer": "^11.0.0",
|
||||||
|
"redux": "^5.0.1",
|
||||||
|
"redux-thunk": "^3.1.0",
|
||||||
|
"reselect": "^5.1.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^16.9.0 || ^17.0.0 || ^18 || ^19",
|
||||||
|
"react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"react": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"react-redux": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@reduxjs/toolkit/node_modules/immer": {
|
||||||
|
"version": "11.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/immer/-/immer-11.1.4.tgz",
|
||||||
|
"integrity": "sha512-XREFCPo6ksxVzP4E0ekD5aMdf8WMwmdNaz6vuvxgI40UaEiu6q3p8X52aU6GdyvLY3XXX/8R7JOTXStz/nBbRw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/immer"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@rolldown/pluginutils": {
|
"node_modules/@rolldown/pluginutils": {
|
||||||
"version": "1.0.0-beta.53",
|
"version": "1.0.0-beta.53",
|
||||||
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.53.tgz",
|
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.53.tgz",
|
||||||
@@ -1119,6 +1155,18 @@
|
|||||||
"win32"
|
"win32"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"node_modules/@standard-schema/spec": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@standard-schema/utils": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz",
|
||||||
|
"integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/babel__core": {
|
"node_modules/@types/babel__core": {
|
||||||
"version": "7.20.5",
|
"version": "7.20.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
|
||||||
@@ -1164,6 +1212,69 @@
|
|||||||
"@babel/types": "^7.28.2"
|
"@babel/types": "^7.28.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/d3-array": {
|
||||||
|
"version": "3.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz",
|
||||||
|
"integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/d3-color": {
|
||||||
|
"version": "3.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz",
|
||||||
|
"integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/d3-ease": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/d3-interpolate": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/d3-color": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/d3-path": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/d3-scale": {
|
||||||
|
"version": "4.0.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz",
|
||||||
|
"integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/d3-time": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/d3-shape": {
|
||||||
|
"version": "3.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz",
|
||||||
|
"integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/d3-path": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/d3-time": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/@types/d3-timer": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/estree": {
|
"node_modules/@types/estree": {
|
||||||
"version": "1.0.8",
|
"version": "1.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
|
||||||
@@ -1177,11 +1288,16 @@
|
|||||||
"integrity": "sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA==",
|
"integrity": "sha512-1N9SBnWYOJTrNZCdh/yJE+t910Y128BoyY+zBLWhL3r0TYzlTmFdXrPwHL9DyFZmlEXNQQolTZh3KHV31QDhyA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~6.21.0"
|
"undici-types": "~6.21.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/use-sync-external-store": {
|
||||||
|
"version": "0.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz",
|
||||||
|
"integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@vitejs/plugin-react": {
|
"node_modules/@vitejs/plugin-react": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.1.2.tgz",
|
||||||
@@ -1233,7 +1349,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"baseline-browser-mapping": "^2.9.0",
|
"baseline-browser-mapping": "^2.9.0",
|
||||||
"caniuse-lite": "^1.0.30001759",
|
"caniuse-lite": "^1.0.30001759",
|
||||||
@@ -1269,6 +1384,15 @@
|
|||||||
],
|
],
|
||||||
"license": "CC-BY-4.0"
|
"license": "CC-BY-4.0"
|
||||||
},
|
},
|
||||||
|
"node_modules/clsx": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/convert-source-map": {
|
"node_modules/convert-source-map": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
|
||||||
@@ -1276,6 +1400,127 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/d3-array": {
|
||||||
|
"version": "3.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz",
|
||||||
|
"integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"internmap": "1 - 2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/d3-color": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==",
|
||||||
|
"license": "ISC",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/d3-ease": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/d3-format": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==",
|
||||||
|
"license": "ISC",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/d3-interpolate": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"d3-color": "1 - 3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/d3-path": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==",
|
||||||
|
"license": "ISC",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/d3-scale": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"d3-array": "2.10.0 - 3",
|
||||||
|
"d3-format": "1 - 3",
|
||||||
|
"d3-interpolate": "1.2.0 - 3",
|
||||||
|
"d3-time": "2.1.1 - 3",
|
||||||
|
"d3-time-format": "2 - 4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/d3-shape": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"d3-path": "^3.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/d3-time": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"d3-array": "2 - 3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/d3-time-format": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"d3-time": "1 - 3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/d3-timer": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==",
|
||||||
|
"license": "ISC",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/debug": {
|
"node_modules/debug": {
|
||||||
"version": "4.4.3",
|
"version": "4.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
||||||
@@ -1294,6 +1539,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/decimal.js-light": {
|
||||||
|
"version": "2.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz",
|
||||||
|
"integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.267",
|
"version": "1.5.267",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz",
|
||||||
@@ -1301,6 +1552,16 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
|
"node_modules/es-toolkit": {
|
||||||
|
"version": "1.44.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.44.0.tgz",
|
||||||
|
"integrity": "sha512-6penXeZalaV88MM3cGkFZZfOoLGWshWWfdy0tWw/RlVVyhvMaWSBTOvXNeiW3e5FwdS5ePW0LGEu17zT139ktg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"workspaces": [
|
||||||
|
"docs",
|
||||||
|
"benchmarks"
|
||||||
|
]
|
||||||
|
},
|
||||||
"node_modules/esbuild": {
|
"node_modules/esbuild": {
|
||||||
"version": "0.25.12",
|
"version": "0.25.12",
|
||||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",
|
||||||
@@ -1353,6 +1614,12 @@
|
|||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/eventemitter3": {
|
||||||
|
"version": "5.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz",
|
||||||
|
"integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/fdir": {
|
"node_modules/fdir": {
|
||||||
"version": "6.5.0",
|
"version": "6.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||||
@@ -1424,7 +1691,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.28.4"
|
"@babel/runtime": "^7.28.4"
|
||||||
},
|
},
|
||||||
@@ -1437,6 +1703,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/immer": {
|
||||||
|
"version": "10.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz",
|
||||||
|
"integrity": "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/immer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/internmap": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==",
|
||||||
|
"license": "ISC",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/js-tokens": {
|
"node_modules/js-tokens": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||||
@@ -1526,7 +1811,6 @@
|
|||||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
},
|
},
|
||||||
@@ -1568,7 +1852,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz",
|
||||||
"integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==",
|
"integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@@ -1612,6 +1895,36 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/react-is": {
|
||||||
|
"version": "19.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.4.tgz",
|
||||||
|
"integrity": "sha512-W+EWGn2v0ApPKgKKCy/7s7WHXkboGcsrXE+2joLyVxkbyVQfO3MUEaUQDHoSmb8TFFrSKYa9mw64WZHNHSDzYA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/react-redux": {
|
||||||
|
"version": "9.2.0",
|
||||||
|
"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",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/use-sync-external-store": "^0.0.6",
|
||||||
|
"use-sync-external-store": "^1.4.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@types/react": "^18.2.25 || ^19",
|
||||||
|
"react": "^18.0 || ^19",
|
||||||
|
"redux": "^5.0.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@types/react": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"redux": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/react-refresh": {
|
"node_modules/react-refresh": {
|
||||||
"version": "0.18.0",
|
"version": "0.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz",
|
||||||
@@ -1622,6 +1935,57 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/recharts": {
|
||||||
|
"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.9.0 || 2.x.x",
|
||||||
|
"clsx": "^2.1.1",
|
||||||
|
"decimal.js-light": "^2.5.1",
|
||||||
|
"es-toolkit": "^1.39.3",
|
||||||
|
"eventemitter3": "^5.0.1",
|
||||||
|
"immer": "^10.1.1",
|
||||||
|
"react-redux": "8.x.x || 9.x.x",
|
||||||
|
"reselect": "5.1.1",
|
||||||
|
"tiny-invariant": "^1.3.3",
|
||||||
|
"use-sync-external-store": "^1.2.2",
|
||||||
|
"victory-vendor": "^37.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||||
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||||
|
"react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/redux": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/redux-thunk": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"redux": "^5.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/reselect": {
|
||||||
|
"version": "5.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/rollup": {
|
"node_modules/rollup": {
|
||||||
"version": "4.54.0",
|
"version": "4.54.0",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.54.0.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.54.0.tgz",
|
||||||
@@ -1690,6 +2054,12 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/tiny-invariant": {
|
||||||
|
"version": "1.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz",
|
||||||
|
"integrity": "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/tinyglobby": {
|
"node_modules/tinyglobby": {
|
||||||
"version": "0.2.15",
|
"version": "0.2.15",
|
||||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
|
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
|
||||||
@@ -1713,7 +2083,6 @@
|
|||||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"peer": true,
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
"tsserver": "bin/tsserver"
|
"tsserver": "bin/tsserver"
|
||||||
@@ -1769,13 +2138,34 @@
|
|||||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/victory-vendor": {
|
||||||
|
"version": "37.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz",
|
||||||
|
"integrity": "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==",
|
||||||
|
"license": "MIT AND ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/d3-array": "^3.0.3",
|
||||||
|
"@types/d3-ease": "^3.0.0",
|
||||||
|
"@types/d3-interpolate": "^3.0.1",
|
||||||
|
"@types/d3-scale": "^4.0.2",
|
||||||
|
"@types/d3-shape": "^3.1.0",
|
||||||
|
"@types/d3-time": "^3.0.0",
|
||||||
|
"@types/d3-timer": "^3.0.0",
|
||||||
|
"d3-array": "^3.1.6",
|
||||||
|
"d3-ease": "^3.0.1",
|
||||||
|
"d3-interpolate": "^3.0.1",
|
||||||
|
"d3-scale": "^4.0.2",
|
||||||
|
"d3-shape": "^3.1.0",
|
||||||
|
"d3-time": "^3.0.0",
|
||||||
|
"d3-timer": "^3.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "6.4.1",
|
"version": "6.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz",
|
||||||
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
|
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.25.0",
|
"esbuild": "^0.25.0",
|
||||||
"fdir": "^6.4.4",
|
"fdir": "^6.4.4",
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,8 @@
|
|||||||
"i18next": "^25.8.4",
|
"i18next": "^25.8.4",
|
||||||
"react": "^19.2.3",
|
"react": "^19.2.3",
|
||||||
"react-dom": "^19.2.3",
|
"react-dom": "^19.2.3",
|
||||||
"react-i18next": "^16.5.4"
|
"react-i18next": "^16.5.4",
|
||||||
|
"recharts": "^3.8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^22.14.0",
|
"@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">
|
<svg width="118" height="118" viewBox="0 0 118 118" 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"/>
|
<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>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.6 KiB |
@@ -8,10 +8,11 @@ const Footer: React.FC = () => {
|
|||||||
<footer className="landing-footer">
|
<footer className="landing-footer">
|
||||||
<div className="footer-content">
|
<div className="footer-content">
|
||||||
<div className="footer-left">
|
<div className="footer-left">
|
||||||
<img src="/assets/images/logo.svg" alt="CASTAD" className="footer-logo" />
|
<img src="/assets/images/ado2-sidebar-logo.svg" alt="ADO2" className="footer-logo" />
|
||||||
<p className="footer-copyright">Copyright ⓒ O2O Inc. All rights reserved</p>
|
<p className="footer-copyright">Copyright ⓒ O2O Inc. All rights reserved</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="footer-right">
|
<div className="footer-right">
|
||||||
|
<p className="footer-info">{t('footer.company')}</p>
|
||||||
<p className="footer-info">{t('footer.businessNumber')}</p>
|
<p className="footer-info">{t('footer.businessNumber')}</p>
|
||||||
<p className="footer-info">{t('footer.headquarters')}</p>
|
<p className="footer-info">{t('footer.headquarters')}</p>
|
||||||
<p className="footer-info">{t('footer.researchCenter')}</p>
|
<p className="footer-info">{t('footer.researchCenter')}</p>
|
||||||
|
|||||||
@@ -12,11 +12,13 @@ interface SidebarItemProps {
|
|||||||
isCollapsed: boolean;
|
isCollapsed: boolean;
|
||||||
isDisabled?: boolean;
|
isDisabled?: boolean;
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
|
id?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SidebarItem: React.FC<SidebarItemProps> = ({ icon, label, isActive, isCollapsed, isDisabled, onClick }) => {
|
const SidebarItem: React.FC<SidebarItemProps> = ({ icon, label, isActive, isCollapsed, isDisabled, onClick, id }) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
id={id}
|
||||||
onClick={isDisabled ? undefined : onClick}
|
onClick={isDisabled ? undefined : onClick}
|
||||||
className={`sidebar-item ${isActive ? 'active' : ''} ${isCollapsed ? 'collapsed' : ''} ${isDisabled ? 'disabled' : ''}`}
|
className={`sidebar-item ${isActive ? 'active' : ''} ${isCollapsed ? 'collapsed' : ''} ${isDisabled ? 'disabled' : ''}`}
|
||||||
title={isCollapsed ? label : ""}
|
title={isCollapsed ? label : ""}
|
||||||
@@ -138,6 +140,13 @@ const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, onHome, userI
|
|||||||
{menuItems.map(item => (
|
{menuItems.map(item => (
|
||||||
<SidebarItem
|
<SidebarItem
|
||||||
key={item.id}
|
key={item.id}
|
||||||
|
id={
|
||||||
|
item.id === '내 정보'
|
||||||
|
? 'sidebar-my-info'
|
||||||
|
: item.id === 'ADO2 콘텐츠'
|
||||||
|
? 'sidebar-ado2-contents'
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
icon={item.icon}
|
icon={item.icon}
|
||||||
label={item.label}
|
label={item.label}
|
||||||
isCollapsed={isCollapsed}
|
isCollapsed={isCollapsed}
|
||||||
@@ -175,6 +184,7 @@ const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, onHome, userI
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="sidebar-footer-actions">
|
||||||
<button
|
<button
|
||||||
className={`logout-btn ${isCollapsed ? 'collapsed' : ''}`}
|
className={`logout-btn ${isCollapsed ? 'collapsed' : ''}`}
|
||||||
onClick={handleLogout}
|
onClick={handleLogout}
|
||||||
@@ -185,6 +195,19 @@ const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, onHome, userI
|
|||||||
</svg>
|
</svg>
|
||||||
{!isCollapsed && <span className="logout-btn-label">{isLoggingOut ? t('sidebar.loggingOut') : t('sidebar.logout')}</span>}
|
{!isCollapsed && <span className="logout-btn-label">{isLoggingOut ? t('sidebar.loggingOut') : t('sidebar.logout')}</span>}
|
||||||
</button>
|
</button>
|
||||||
|
<a
|
||||||
|
href="https://forms.gle/4a8mGebBYtdesvby9"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className={`sidebar-inquiry-btn ${isCollapsed ? 'collapsed' : ''}`}
|
||||||
|
title="고객의견"
|
||||||
|
>
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
||||||
|
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
|
||||||
|
</svg>
|
||||||
|
{!isCollapsed && <span>고객의견</span>}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ import { useTranslation } from 'react-i18next';
|
|||||||
import { getSocialAccounts, uploadToSocial, waitForUploadComplete, TokenExpiredError, handleSocialReconnect, getAutoSeoYoutube } from '../utils/api';
|
import { getSocialAccounts, uploadToSocial, waitForUploadComplete, TokenExpiredError, handleSocialReconnect, getAutoSeoYoutube } from '../utils/api';
|
||||||
import { SocialAccount, VideoListItem, SocialUploadStatusResponse } from '../types/api';
|
import { SocialAccount, VideoListItem, SocialUploadStatusResponse } from '../types/api';
|
||||||
import UploadProgressModal, { UploadStatus } from './UploadProgressModal';
|
import UploadProgressModal, { UploadStatus } from './UploadProgressModal';
|
||||||
|
import { useTutorial } from './Tutorial/useTutorial';
|
||||||
|
import { TUTORIAL_KEYS } from './Tutorial/tutorialSteps';
|
||||||
|
import TutorialOverlay from './Tutorial/TutorialOverlay';
|
||||||
|
|
||||||
interface SocialPostingModalProps {
|
interface SocialPostingModalProps {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
@@ -116,6 +119,7 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
video
|
video
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const tutorial = useTutorial();
|
||||||
const [socialAccounts, setSocialAccounts] = useState<SocialAccount[]>([]);
|
const [socialAccounts, setSocialAccounts] = useState<SocialAccount[]>([]);
|
||||||
const [selectedChannel, setSelectedChannel] = useState<string>('');
|
const [selectedChannel, setSelectedChannel] = useState<string>('');
|
||||||
const [title, setTitle] = useState('');
|
const [title, setTitle] = useState('');
|
||||||
@@ -131,8 +135,11 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
const [isChannelDropdownOpen, setIsChannelDropdownOpen] = useState(false);
|
const [isChannelDropdownOpen, setIsChannelDropdownOpen] = useState(false);
|
||||||
const [isPrivacyDropdownOpen, setIsPrivacyDropdownOpen] = useState(false);
|
const [isPrivacyDropdownOpen, setIsPrivacyDropdownOpen] = useState(false);
|
||||||
const [isLoadingAutoDescription, setIsLoadingAutoDescription] = useState(false);
|
const [isLoadingAutoDescription, setIsLoadingAutoDescription] = useState(false);
|
||||||
|
const [isHorizontalVideo, setIsHorizontalVideo] = useState(false);
|
||||||
|
const [videoMeta, setVideoMeta] = useState<{ width: number; height: number; duration: number } | null>(null);
|
||||||
const channelDropdownRef = useRef<HTMLDivElement>(null);
|
const channelDropdownRef = useRef<HTMLDivElement>(null);
|
||||||
const privacyDropdownRef = useRef<HTMLDivElement>(null);
|
const privacyDropdownRef = useRef<HTMLDivElement>(null);
|
||||||
|
const hasBeenOpenedRef = useRef(false);
|
||||||
|
|
||||||
// Upload progress modal state
|
// Upload progress modal state
|
||||||
const [showUploadProgress, setShowUploadProgress] = useState(false);
|
const [showUploadProgress, setShowUploadProgress] = useState(false);
|
||||||
@@ -159,17 +166,47 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
return () => document.removeEventListener('mousedown', handleClickOutside);
|
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) {
|
||||||
|
hasBeenOpenedRef.current = true;
|
||||||
|
if (!tutorial.hasSeen(TUTORIAL_KEYS.UPLOAD_MODAL)) {
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.UPLOAD_MODAL);
|
||||||
|
}, 400);
|
||||||
|
return () => clearTimeout(timer);
|
||||||
|
}
|
||||||
|
} else if (hasBeenOpenedRef.current && !tutorial.hasSeen(TUTORIAL_KEYS.FEEDBACK)) {
|
||||||
|
hasBeenOpenedRef.current = false;
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.FEEDBACK);
|
||||||
|
}
|
||||||
|
}, [isOpen]);
|
||||||
|
|
||||||
|
// SEO 생성 완료 시 UPLOAD_FORM 튜토리얼 트리거
|
||||||
|
useEffect(() => {
|
||||||
|
if (!isLoadingAutoDescription && isOpen && !tutorial.hasSeen(TUTORIAL_KEYS.UPLOAD_FORM)) {
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.UPLOAD_FORM);
|
||||||
|
}, 400);
|
||||||
|
return () => clearTimeout(timer);
|
||||||
|
}
|
||||||
|
}, [isLoadingAutoDescription]);
|
||||||
|
|
||||||
// 소셜 계정 로드
|
// 소셜 계정 로드
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
loadSocialAccounts();
|
loadSocialAccounts();
|
||||||
loadAutocomplete();
|
loadAutocomplete();
|
||||||
// // 비디오 정보로 기본 제목 설정
|
|
||||||
// if (video) {
|
|
||||||
// const date = new Date(video.created_at);
|
|
||||||
// const formattedDate = `${date.getFullYear()}.${String(date.getMonth() + 1).padStart(2, '0')}.${String(date.getDate()).padStart(2, '0')}`;
|
|
||||||
// setTitle(`${video.store_name} ${formattedDate}`);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}, [isOpen, video]);
|
}, [isOpen, video]);
|
||||||
|
|
||||||
@@ -393,8 +430,21 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!isOpen || !video) {
|
if (!isOpen || !video) {
|
||||||
// Still render upload progress modal even when main modal is closed
|
return (
|
||||||
return showUploadProgress ? uploadProgressModalElement : null;
|
<>
|
||||||
|
{showUploadProgress && uploadProgressModalElement}
|
||||||
|
{tutorial.isActive && (
|
||||||
|
<TutorialOverlay
|
||||||
|
hints={tutorial.hints}
|
||||||
|
currentIndex={tutorial.currentHintIndex}
|
||||||
|
onNext={tutorial.nextHint}
|
||||||
|
onPrev={tutorial.prevHint}
|
||||||
|
onSkip={tutorial.skipTutorial}
|
||||||
|
groupProgress={tutorial.groupProgress}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -419,9 +469,14 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
<div className="social-posting-video-container">
|
<div className="social-posting-video-container">
|
||||||
<video
|
<video
|
||||||
src={video.result_movie_url}
|
src={video.result_movie_url}
|
||||||
className="social-posting-video"
|
className={`social-posting-video ${isHorizontalVideo ? 'horizontal' : 'vertical'}`}
|
||||||
controls
|
controls
|
||||||
playsInline
|
playsInline
|
||||||
|
onLoadedMetadata={(e) => {
|
||||||
|
const v = e.currentTarget;
|
||||||
|
setIsHorizontalVideo(v.videoWidth > v.videoHeight);
|
||||||
|
setVideoMeta({ width: v.videoWidth, height: v.videoHeight, duration: v.duration });
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -429,16 +484,20 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
{/* Right: Form */}
|
{/* Right: Form */}
|
||||||
<div className="social-posting-form">
|
<div className="social-posting-form">
|
||||||
{/* Video Info */}
|
{/* Video Info */}
|
||||||
<div className="social-posting-video-info">
|
{/* <div className="social-posting-video-info">
|
||||||
<span className="social-posting-label-badge">{t('social.postNumber')}</span>
|
<span className="social-posting-label-badge">{t('social.postNumber')}</span>
|
||||||
<span className="social-posting-add-btn">+</span>
|
<span className="social-posting-add-btn">+</span>
|
||||||
</div>
|
</div> */}
|
||||||
|
|
||||||
<div className="social-posting-video-meta">
|
<div className="social-posting-video-meta">
|
||||||
<p className="social-posting-video-title">
|
<p className="social-posting-video-title">
|
||||||
{video.store_name} {new Date(video.created_at).toLocaleString('ko-KR')}
|
{video.store_name} {new Date(video.created_at).toLocaleString('ko-KR')}
|
||||||
</p>
|
</p>
|
||||||
<p className="social-posting-video-specs">{t('social.videoSpecs')}</p>
|
<p className="social-posting-video-specs">
|
||||||
|
{videoMeta
|
||||||
|
? `${videoMeta.width}×${videoMeta.height} · ${Math.floor(videoMeta.duration / 60)}:${String(Math.floor(videoMeta.duration % 60)).padStart(2, '0')}`
|
||||||
|
: t('social.videoSpecs')}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Channel Selector - Custom Dropdown */}
|
{/* Channel Selector - Custom Dropdown */}
|
||||||
@@ -507,48 +566,60 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
<label className="social-posting-label">
|
<label className="social-posting-label">
|
||||||
{t('social.postTitleLabel')} <span className="required">*</span>
|
{t('social.postTitleLabel')} <span className="required">*</span>
|
||||||
</label>
|
</label>
|
||||||
|
<div className="seo-input-wrapper">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value={title}
|
value={title}
|
||||||
onChange={(e) => setTitle(e.target.value)}
|
onChange={(e) => setTitle(e.target.value)}
|
||||||
placeholder={isLoadingAutoDescription ? t('social.autoSeoTitle') : t('social.postTitlePlaceholder')}
|
placeholder={isLoadingAutoDescription ? '' : t('social.postTitlePlaceholder')}
|
||||||
// placeholder={t('social.postTitlePlaceholder')}
|
|
||||||
className="social-posting-input"
|
className="social-posting-input"
|
||||||
maxLength={100}
|
maxLength={100}
|
||||||
disabled={isLoadingAutoDescription}
|
disabled={isLoadingAutoDescription}
|
||||||
/>
|
/>
|
||||||
|
{isLoadingAutoDescription && (
|
||||||
|
<span className="seo-shimmer-text">{t('social.autoSeoTitle')}</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<span className="social-posting-char-count">{title.length}/100</span>
|
<span className="social-posting-char-count">{title.length}/100</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Description */}
|
{/* Description */}
|
||||||
<div className="social-posting-field">
|
<div className="social-posting-field">
|
||||||
<label className="social-posting-label">{t('social.postContentLabel')}</label>
|
<label className="social-posting-label">{t('social.postContentLabel')}</label>
|
||||||
|
<div className="seo-input-wrapper">
|
||||||
<textarea
|
<textarea
|
||||||
value={description}
|
value={description}
|
||||||
onChange={(e) => setDescription(e.target.value)}
|
onChange={(e) => setDescription(e.target.value)}
|
||||||
placeholder={t(isLoadingAutoDescription ? t('social.autoSeoDescription') : t('social.postContentPlaceholder'))}
|
placeholder={isLoadingAutoDescription ? '' : t('social.postContentPlaceholder')}
|
||||||
// placeholder={t('social.postContentPlaceholder')}
|
|
||||||
className="social-posting-textarea"
|
className="social-posting-textarea"
|
||||||
maxLength={5000}
|
maxLength={5000}
|
||||||
rows={4}
|
rows={4}
|
||||||
disabled={isLoadingAutoDescription}
|
disabled={isLoadingAutoDescription}
|
||||||
/>
|
/>
|
||||||
|
{isLoadingAutoDescription && (
|
||||||
|
<span className="seo-shimmer-text">{t('social.autoSeoDescription')}</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<span className="social-posting-char-count">{description.length}/5,000</span>
|
<span className="social-posting-char-count">{description.length}/5,000</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Tags */}
|
{/* Tags */}
|
||||||
<div className="social-posting-field">
|
<div className="social-posting-field">
|
||||||
<label className="social-posting-label">{t('social.tagsLabel')}</label>
|
<label className="social-posting-label">{t('social.tagsLabel')}</label>
|
||||||
|
<div className="seo-input-wrapper">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value={tags}
|
value={tags}
|
||||||
onChange={(e) => setTags(e.target.value)}
|
onChange={(e) => setTags(e.target.value)}
|
||||||
placeholder={t(isLoadingAutoDescription ? t('social.autoSeoTags') : t('social.tagsPlaceholder'))}
|
placeholder={isLoadingAutoDescription ? '' : t('social.tagsPlaceholder')}
|
||||||
// placeholder={t('social.tagsPlaceholder')}
|
|
||||||
className="social-posting-input"
|
className="social-posting-input"
|
||||||
maxLength={500}
|
maxLength={500}
|
||||||
disabled={isLoadingAutoDescription}
|
disabled={isLoadingAutoDescription}
|
||||||
/>
|
/>
|
||||||
|
{isLoadingAutoDescription && (
|
||||||
|
<span className="seo-shimmer-text">{t('social.autoSeoTags')}</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<span className="social-posting-char-count">{tags.length}/500</span>
|
<span className="social-posting-char-count">{tags.length}/500</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -746,6 +817,16 @@ const SocialPostingModal: React.FC<SocialPostingModalProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{uploadProgressModalElement}
|
{uploadProgressModalElement}
|
||||||
|
{tutorial.isActive && (
|
||||||
|
<TutorialOverlay
|
||||||
|
hints={tutorial.hints}
|
||||||
|
currentIndex={tutorial.currentHintIndex}
|
||||||
|
onNext={tutorial.nextHint}
|
||||||
|
onPrev={tutorial.prevHint}
|
||||||
|
onSkip={tutorial.skipTutorial}
|
||||||
|
groupProgress={tutorial.groupProgress}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,298 @@
|
|||||||
|
import React, { useEffect, useState, useCallback } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { TutorialHint } from './tutorialSteps';
|
||||||
|
|
||||||
|
interface Rect {
|
||||||
|
top: number;
|
||||||
|
left: number;
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface TooltipPos {
|
||||||
|
top: number;
|
||||||
|
left: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface TutorialOverlayProps {
|
||||||
|
hints: TutorialHint[];
|
||||||
|
currentIndex: number;
|
||||||
|
onNext: () => void;
|
||||||
|
onPrev: () => void;
|
||||||
|
onSkip: () => void;
|
||||||
|
groupProgress?: { groupTotal: number; groupOffset: number; isLastKeyInGroup: boolean } | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const PADDING = 8;
|
||||||
|
|
||||||
|
function getTargetRect(selector: string): Rect | null {
|
||||||
|
const el = document.querySelector(selector);
|
||||||
|
if (!el) return null;
|
||||||
|
const r = el.getBoundingClientRect();
|
||||||
|
return { top: r.top, left: r.left, width: r.width, height: r.height };
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSpotlightRect(
|
||||||
|
rect: Rect,
|
||||||
|
padding: number,
|
||||||
|
override?: { top?: number; right?: number; bottom?: number; left?: number }
|
||||||
|
): Rect {
|
||||||
|
const pTop = override?.top ?? padding;
|
||||||
|
const pRight = override?.right ?? padding;
|
||||||
|
const pBottom = override?.bottom ?? padding;
|
||||||
|
const pLeft = override?.left ?? padding;
|
||||||
|
const left = Math.max(0, Math.floor(rect.left - pLeft));
|
||||||
|
const top = Math.max(0, Math.floor(rect.top - pTop));
|
||||||
|
const right = Math.min(window.innerWidth, Math.ceil(rect.left + rect.width + pRight));
|
||||||
|
const bottom = Math.min(window.innerHeight, Math.ceil(rect.top + rect.height + pBottom));
|
||||||
|
|
||||||
|
return {
|
||||||
|
top,
|
||||||
|
left,
|
||||||
|
width: Math.max(0, right - left),
|
||||||
|
height: Math.max(0, bottom - top),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function calcTooltipPos(rect: Rect, position: TutorialHint['position'], tooltipW = 300, tooltipH = 160): TooltipPos {
|
||||||
|
|
||||||
|
switch (position) {
|
||||||
|
case 'bottom':
|
||||||
|
return {
|
||||||
|
top: Math.min(rect.top + rect.height + PADDING, window.innerHeight - tooltipH - 8),
|
||||||
|
left: Math.min(Math.max(rect.left + rect.width / 2 - tooltipW / 2, 8), window.innerWidth - tooltipW - 8),
|
||||||
|
};
|
||||||
|
case 'top':
|
||||||
|
return {
|
||||||
|
top: Math.max(rect.top - tooltipH - PADDING, 8),
|
||||||
|
left: Math.min(Math.max(rect.left + rect.width / 2 - tooltipW / 2, 8), window.innerWidth - tooltipW - 8),
|
||||||
|
};
|
||||||
|
case 'right':
|
||||||
|
return {
|
||||||
|
top: Math.min(Math.max(rect.top + rect.height / 2 - tooltipH / 2, 8), window.innerHeight - tooltipH - 8),
|
||||||
|
left: Math.min(rect.left + rect.width + PADDING, window.innerWidth - tooltipW - 8),
|
||||||
|
};
|
||||||
|
case 'left':
|
||||||
|
return {
|
||||||
|
top: Math.min(Math.max(rect.top + rect.height / 2 - tooltipH / 2, 8), window.innerHeight - tooltipH - 8),
|
||||||
|
left: Math.max(rect.left - tooltipW - PADDING, 8),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const TutorialOverlay: React.FC<TutorialOverlayProps> = ({
|
||||||
|
hints,
|
||||||
|
currentIndex,
|
||||||
|
onNext,
|
||||||
|
onPrev,
|
||||||
|
onSkip,
|
||||||
|
groupProgress,
|
||||||
|
}) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [targetRect, setTargetRect] = useState<Rect | null>(null);
|
||||||
|
const tooltipRef = React.useRef<HTMLDivElement>(null);
|
||||||
|
const [tooltipSize, setTooltipSize] = useState({ w: 300, h: 160 });
|
||||||
|
|
||||||
|
const hint = hints[currentIndex];
|
||||||
|
const isLast = currentIndex === hints.length - 1;
|
||||||
|
// 그룹이 있으면 그룹의 마지막 키 + 마지막 힌트일 때만 완료, 그룹 없으면 기존대로
|
||||||
|
const isFinish = isLast && (groupProgress ? groupProgress.isLastKeyInGroup : true);
|
||||||
|
|
||||||
|
const updateRect = useCallback(() => {
|
||||||
|
if (!hint) return;
|
||||||
|
setTargetRect(getTargetRect(hint.targetSelector));
|
||||||
|
}, [hint]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
updateRect();
|
||||||
|
window.addEventListener('resize', updateRect);
|
||||||
|
window.addEventListener('scroll', updateRect, true);
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener('resize', updateRect);
|
||||||
|
window.removeEventListener('scroll', updateRect, true);
|
||||||
|
};
|
||||||
|
}, [updateRect]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!hint) return;
|
||||||
|
let retryTimer: number | undefined;
|
||||||
|
let rectTimer: number | undefined;
|
||||||
|
let cleanupTarget: (() => void) | undefined;
|
||||||
|
|
||||||
|
const bindToTarget = (el: HTMLElement) => {
|
||||||
|
el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
|
rectTimer = window.setTimeout(updateRect, 200);
|
||||||
|
|
||||||
|
const shouldClickAdvance = hint.clickToAdvance !== false;
|
||||||
|
if (shouldClickAdvance) {
|
||||||
|
el.style.cursor = 'pointer';
|
||||||
|
el.addEventListener('click', onNext);
|
||||||
|
cleanupTarget = () => {
|
||||||
|
el.style.cursor = '';
|
||||||
|
el.removeEventListener('click', onNext);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
cleanupTarget = () => {};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const tryBind = (): boolean => {
|
||||||
|
const el = document.querySelector(hint.targetSelector) as HTMLElement | null;
|
||||||
|
if (!el) return false;
|
||||||
|
bindToTarget(el);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!tryBind()) {
|
||||||
|
retryTimer = window.setInterval(() => {
|
||||||
|
if (tryBind() && retryTimer) {
|
||||||
|
window.clearInterval(retryTimer);
|
||||||
|
retryTimer = undefined;
|
||||||
|
}
|
||||||
|
}, 80);
|
||||||
|
}
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
if (retryTimer) window.clearInterval(retryTimer);
|
||||||
|
if (rectTimer) window.clearTimeout(rectTimer);
|
||||||
|
cleanupTarget?.();
|
||||||
|
};
|
||||||
|
}, [hint, updateRect, onNext]);
|
||||||
|
|
||||||
|
// 툴팁 DOM 크기 측정 — 힌트가 바뀔 때만 재측정
|
||||||
|
useEffect(() => {
|
||||||
|
const el = tooltipRef.current;
|
||||||
|
if (!el) return;
|
||||||
|
const { offsetWidth, offsetHeight } = el;
|
||||||
|
if (offsetWidth && offsetHeight) {
|
||||||
|
setTooltipSize(prev =>
|
||||||
|
prev.w === offsetWidth && prev.h === offsetHeight
|
||||||
|
? prev
|
||||||
|
: { w: offsetWidth, h: offsetHeight }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, [currentIndex, hints]);
|
||||||
|
|
||||||
|
if (!hint) return null;
|
||||||
|
|
||||||
|
const spotlightPadding = hint.spotlightPadding ?? PADDING;
|
||||||
|
const spotlightRect = (targetRect && !hint.noSpotlight) ? getSpotlightRect(targetRect, spotlightPadding, hint.spotlightPaddingOverride) : null;
|
||||||
|
|
||||||
|
// 툴팁은 spotlightRect 기준으로 배치해야 스포트라이트와 겹치지 않음
|
||||||
|
const tooltipPos: TooltipPos = (spotlightRect ?? targetRect)
|
||||||
|
? calcTooltipPos((spotlightRect ?? targetRect)!, hint.position, tooltipSize.w, tooltipSize.h)
|
||||||
|
: {
|
||||||
|
top: window.innerHeight / 2 - tooltipSize.h / 2,
|
||||||
|
left: window.innerWidth / 2 - tooltipSize.w / 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="tutorial-overlay-root">
|
||||||
|
{spotlightRect ? (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
className="tutorial-overlay-blocker"
|
||||||
|
style={{ top: 0, left: 0, right: 0, height: spotlightRect.top }}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
className="tutorial-overlay-blocker"
|
||||||
|
style={{
|
||||||
|
top: spotlightRect.top,
|
||||||
|
left: 0,
|
||||||
|
width: spotlightRect.left,
|
||||||
|
height: spotlightRect.height,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
className="tutorial-overlay-blocker"
|
||||||
|
style={{
|
||||||
|
top: spotlightRect.top,
|
||||||
|
left: spotlightRect.left + spotlightRect.width,
|
||||||
|
right: 0,
|
||||||
|
height: spotlightRect.height,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
className="tutorial-overlay-blocker"
|
||||||
|
style={{
|
||||||
|
top: spotlightRect.top + spotlightRect.height,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
className="tutorial-spotlight-ring"
|
||||||
|
style={{
|
||||||
|
top: spotlightRect.top,
|
||||||
|
left: spotlightRect.left,
|
||||||
|
width: spotlightRect.width,
|
||||||
|
height: spotlightRect.height,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
|
||||||
|
<div
|
||||||
|
ref={tooltipRef}
|
||||||
|
className={`tutorial-tooltip${hint.variant === 'bubble' ? ` tutorial-tooltip-bubble tutorial-tooltip-bubble--${hint.position}` : ''}`}
|
||||||
|
style={{ top: tooltipPos.top, left: tooltipPos.left }}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
<p className="tutorial-tooltip-title">{t(hint.titleKey)}</p>
|
||||||
|
<p className="tutorial-tooltip-desc">{t(hint.descriptionKey)}</p>
|
||||||
|
{hint.noteKey && (
|
||||||
|
<p className="tutorial-tooltip-note">{t(hint.noteKey)}</p>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="tutorial-tooltip-footer">
|
||||||
|
<span className="tutorial-tooltip-counter">
|
||||||
|
{groupProgress ? groupProgress.groupOffset + 1 : currentIndex + 1} / {groupProgress ? groupProgress.groupTotal : hints.length}
|
||||||
|
</span>
|
||||||
|
<div className="tutorial-tooltip-actions">
|
||||||
|
<button className="tutorial-btn-skip" onClick={onSkip}>
|
||||||
|
{t('tutorial.skip')}
|
||||||
|
</button>
|
||||||
|
{currentIndex > 0 && (
|
||||||
|
<button className="tutorial-btn-prev" onClick={onPrev}>
|
||||||
|
{t('tutorial.prev')}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
{(hint.clickToAdvance !== true || isFinish) && (
|
||||||
|
<button className="tutorial-btn-next" onClick={onNext}>
|
||||||
|
{isFinish ? t('tutorial.finish') : t('tutorial.next')}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TutorialOverlay;
|
||||||
|
|
||||||
|
interface TutorialRestartPopupProps {
|
||||||
|
onConfirm: () => void;
|
||||||
|
onCancel: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const TutorialRestartPopup: React.FC<TutorialRestartPopupProps> = ({ onConfirm, onCancel }) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
return (
|
||||||
|
<div className="tutorial-restart-backdrop">
|
||||||
|
<div className="tutorial-restart-popup" onClick={(e) => e.stopPropagation()}>
|
||||||
|
<p className="tutorial-restart-title">{t('tutorial.restart.title')}</p>
|
||||||
|
<p className="tutorial-restart-desc">{t('tutorial.restart.desc')}</p>
|
||||||
|
<div className="tutorial-restart-actions">
|
||||||
|
<button className="tutorial-restart-cancel" onClick={onCancel}>
|
||||||
|
{t('tutorial.restart.cancel')}
|
||||||
|
</button>
|
||||||
|
<button className="tutorial-restart-confirm" onClick={onConfirm}>
|
||||||
|
{t('tutorial.restart.confirm')}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,425 @@
|
|||||||
|
export interface TutorialHint {
|
||||||
|
targetSelector: string;
|
||||||
|
titleKey: string;
|
||||||
|
descriptionKey: string;
|
||||||
|
position: 'top' | 'bottom' | 'left' | 'right';
|
||||||
|
noteKey?: string;
|
||||||
|
variant?: 'bubble';
|
||||||
|
clickToAdvance?: boolean;
|
||||||
|
advanceSelector?: string;
|
||||||
|
noSpotlight?: boolean;
|
||||||
|
spotlightPadding?: number;
|
||||||
|
spotlightPaddingOverride?: { top?: number; right?: number; bottom?: number; left?: number };
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TutorialStepDef {
|
||||||
|
key: string;
|
||||||
|
hints: TutorialHint[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export const TUTORIAL_KEYS = {
|
||||||
|
LANDING: 'landing',
|
||||||
|
ANALYSIS: 'analysis',
|
||||||
|
ASSET: 'asset',
|
||||||
|
SOUND: 'sound',
|
||||||
|
SOUND_LYRICS: 'soundLyrics',
|
||||||
|
SOUND_AUDIO: 'soundAudio',
|
||||||
|
GENERATING:'generating',
|
||||||
|
COMPLETION: 'completion',
|
||||||
|
MY_INFO: 'myInfo',
|
||||||
|
ADO2_CONTENTS: 'ado2Contents',
|
||||||
|
UPLOAD_MODAL: 'uploadModal',
|
||||||
|
UPLOAD_FORM: 'uploadForm',
|
||||||
|
DASHBOARD: 'dashboard',
|
||||||
|
CONTENT_CALENDAR: 'contentCalendar',
|
||||||
|
FEEDBACK: 'feedback',
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
// 같은 페이지에 속하는 튜토리얼 키 그룹 — 진행 카운터를 합산해서 표시
|
||||||
|
export const TUTORIAL_PAGE_GROUPS: string[][] = [
|
||||||
|
[TUTORIAL_KEYS.SOUND, TUTORIAL_KEYS.SOUND_LYRICS, TUTORIAL_KEYS.SOUND_AUDIO],
|
||||||
|
[TUTORIAL_KEYS.GENERATING, TUTORIAL_KEYS.COMPLETION],
|
||||||
|
[TUTORIAL_KEYS.UPLOAD_MODAL, TUTORIAL_KEYS.UPLOAD_FORM],
|
||||||
|
];
|
||||||
|
|
||||||
|
export const tutorialSteps: TutorialStepDef[] = [
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.LANDING,
|
||||||
|
hints: [
|
||||||
|
// {
|
||||||
|
// targetSelector: '.tutorial-center-anchor',
|
||||||
|
// titleKey: 'tutorial.landing.intro.title',
|
||||||
|
// descriptionKey: 'tutorial.landing.intro.desc',
|
||||||
|
// position: 'bottom',
|
||||||
|
// clickToAdvance: false,
|
||||||
|
// noSpotlight: true,
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
targetSelector: '.hero-dropdown-trigger',
|
||||||
|
titleKey: 'tutorial.landing.dropdown.title',
|
||||||
|
descriptionKey: 'tutorial.landing.dropdown.desc',
|
||||||
|
position: 'left',
|
||||||
|
clickToAdvance: false,
|
||||||
|
noSpotlight: true,
|
||||||
|
variant: 'bubble',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.hero-input-wrapper',
|
||||||
|
titleKey: 'tutorial.landing.field.title',
|
||||||
|
descriptionKey: 'tutorial.landing.field.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: false,
|
||||||
|
noSpotlight: true,
|
||||||
|
variant: 'bubble',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.hero-button',
|
||||||
|
titleKey: 'tutorial.landing.button.title',
|
||||||
|
descriptionKey: 'tutorial.landing.button.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: false,
|
||||||
|
noSpotlight: true,
|
||||||
|
variant: 'bubble',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// key: TUTORIAL_KEYS.ANALYSIS,
|
||||||
|
// hints: [
|
||||||
|
// {
|
||||||
|
// targetSelector: '.bi2-identity-card',
|
||||||
|
// titleKey: 'tutorial.analysis.identity.title',
|
||||||
|
// descriptionKey: 'tutorial.analysis.identity.desc',
|
||||||
|
// position: 'top',
|
||||||
|
// clickToAdvance: false,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// targetSelector: '.bi2-selling-card',
|
||||||
|
// titleKey: 'tutorial.analysis.selling.title',
|
||||||
|
// descriptionKey: 'tutorial.analysis.selling.desc',
|
||||||
|
// position: 'top',
|
||||||
|
// clickToAdvance: false,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// targetSelector: '.bi2-persona-grid',
|
||||||
|
// titleKey: 'tutorial.analysis.persona.title',
|
||||||
|
// descriptionKey: 'tutorial.analysis.persona.desc',
|
||||||
|
// position: 'top',
|
||||||
|
// clickToAdvance: false,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// targetSelector: '.bi2-keyword-tags',
|
||||||
|
// titleKey: 'tutorial.analysis.keywords.title',
|
||||||
|
// descriptionKey: 'tutorial.analysis.keywords.desc',
|
||||||
|
// position: 'top',
|
||||||
|
// clickToAdvance: false,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// targetSelector: '.bi2-generate-btn',
|
||||||
|
// titleKey: 'tutorial.analysis.generate.title',
|
||||||
|
// descriptionKey: 'tutorial.analysis.generate.desc',
|
||||||
|
// position: 'right',
|
||||||
|
// clickToAdvance: true,
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.ASSET,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.asset-column.asset-column-left',
|
||||||
|
titleKey: 'tutorial.asset.image.title',
|
||||||
|
descriptionKey: 'tutorial.asset.image.desc',
|
||||||
|
position: 'left',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.asset-upload-zone',
|
||||||
|
titleKey: 'tutorial.asset.upload.title',
|
||||||
|
descriptionKey: 'tutorial.asset.upload.desc',
|
||||||
|
position: 'left',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.asset-ratio-section',
|
||||||
|
titleKey: 'tutorial.asset.ratio.title',
|
||||||
|
descriptionKey: 'tutorial.asset.ratio.desc',
|
||||||
|
position: 'left',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.asset-next-button',
|
||||||
|
titleKey: 'tutorial.asset.next.title',
|
||||||
|
descriptionKey: 'tutorial.asset.next.desc',
|
||||||
|
position: 'top',
|
||||||
|
clickToAdvance: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.SOUND,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.genre-grid',
|
||||||
|
titleKey: 'tutorial.sound.genre.title',
|
||||||
|
descriptionKey: 'tutorial.sound.genre.desc',
|
||||||
|
position: 'top',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.language-selector-wrapper',
|
||||||
|
titleKey: 'tutorial.sound.language.title',
|
||||||
|
descriptionKey: 'tutorial.sound.language.desc',
|
||||||
|
position: 'top',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.btn-generate-sound',
|
||||||
|
titleKey: 'tutorial.sound.generate.title',
|
||||||
|
descriptionKey: 'tutorial.sound.generate.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.SOUND_LYRICS,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.lyrics-display',
|
||||||
|
titleKey: 'tutorial.sound.lyrics.title',
|
||||||
|
descriptionKey: 'tutorial.sound.lyrics.desc',
|
||||||
|
position: 'left',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.status-message-new',
|
||||||
|
titleKey: 'tutorial.sound.lyricsWait.title',
|
||||||
|
descriptionKey: 'tutorial.sound.lyricsWait.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.SOUND_AUDIO,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.audio-player',
|
||||||
|
titleKey: 'tutorial.sound.audioPlayer.title',
|
||||||
|
descriptionKey: 'tutorial.sound.audioPlayer.desc',
|
||||||
|
position: 'left',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.btn-video-generate',
|
||||||
|
titleKey: 'tutorial.sound.video.title',
|
||||||
|
descriptionKey: 'tutorial.sound.video.desc',
|
||||||
|
position: 'top',
|
||||||
|
clickToAdvance: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.MY_INFO,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.youtube-connect-section',
|
||||||
|
titleKey: 'tutorial.myInfo.myInfo.title',
|
||||||
|
descriptionKey: 'tutorial.myInfo.myInfo.desc',
|
||||||
|
position: 'top',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.myinfo-social-btn',
|
||||||
|
titleKey: 'tutorial.myInfo.connect.title',
|
||||||
|
descriptionKey: 'tutorial.myInfo.connect.desc',
|
||||||
|
noteKey: 'tutorial.myInfo.connect.note',
|
||||||
|
position: 'top',
|
||||||
|
clickToAdvance: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.myinfo-connected-accounts',
|
||||||
|
titleKey: 'tutorial.myInfo.connected.title',
|
||||||
|
descriptionKey: 'tutorial.myInfo.connected.desc',
|
||||||
|
position: 'top',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '#sidebar-ado2-contents',
|
||||||
|
titleKey: 'tutorial.myInfo.ado2.title',
|
||||||
|
descriptionKey: 'tutorial.myInfo.ado2.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.ADO2_CONTENTS,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.ado2-content-card',
|
||||||
|
titleKey: 'tutorial.ado2.list.title',
|
||||||
|
descriptionKey: 'tutorial.ado2.list.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.content-upload-btn',
|
||||||
|
titleKey: 'tutorial.ado2.download.title',
|
||||||
|
descriptionKey: 'tutorial.ado2.download.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.content-delete-btn',
|
||||||
|
titleKey: 'tutorial.ado2.delete.title',
|
||||||
|
descriptionKey: 'tutorial.ado2.delete.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.content-download-btn',
|
||||||
|
titleKey: 'tutorial.ado2.upload.title',
|
||||||
|
descriptionKey: 'tutorial.ado2.upload.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.GENERATING,
|
||||||
|
hints:[
|
||||||
|
{
|
||||||
|
targetSelector: '.comp2-info-section',
|
||||||
|
titleKey: 'tutorial.completion.contentInfo.title',
|
||||||
|
descriptionKey: 'tutorial.completion.contentInfo.desc',
|
||||||
|
position: 'left',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.comp2-video-section',
|
||||||
|
titleKey: 'tutorial.completion.generating.title',
|
||||||
|
descriptionKey: 'tutorial.completion.generating.desc',
|
||||||
|
position: 'right',
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.COMPLETION,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.comp2-video-section',
|
||||||
|
titleKey: 'tutorial.completion.completion.title',
|
||||||
|
descriptionKey: 'tutorial.completion.completion.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '#sidebar-my-info',
|
||||||
|
titleKey: 'tutorial.completion.myInfo.title',
|
||||||
|
descriptionKey: 'tutorial.completion.myInfo.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.UPLOAD_MODAL,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.social-posting-content',
|
||||||
|
titleKey: 'tutorial.upload.seo.title',
|
||||||
|
descriptionKey: 'tutorial.upload.seo.desc',
|
||||||
|
position: 'right',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.UPLOAD_FORM,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.social-posting-form',
|
||||||
|
titleKey: 'tutorial.upload.required.title',
|
||||||
|
descriptionKey: 'tutorial.upload.required.desc',
|
||||||
|
position: 'left',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.social-posting-radio-group',
|
||||||
|
titleKey: 'tutorial.upload.schedule.title',
|
||||||
|
descriptionKey: 'tutorial.upload.schedule.desc',
|
||||||
|
position: 'left',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.social-posting-btn:not(.cancel)',
|
||||||
|
titleKey: 'tutorial.upload.submit.title',
|
||||||
|
descriptionKey: 'tutorial.upload.submit.desc',
|
||||||
|
position: 'top',
|
||||||
|
clickToAdvance: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.DASHBOARD,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.stats-grid-8',
|
||||||
|
titleKey: 'tutorial.dashboard.metrics.title',
|
||||||
|
descriptionKey: 'tutorial.dashboard.metrics.desc',
|
||||||
|
position: 'bottom',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.yoy-chart-card',
|
||||||
|
titleKey: 'tutorial.dashboard.chart.title',
|
||||||
|
descriptionKey: 'tutorial.dashboard.chart.desc',
|
||||||
|
position: 'right',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.tutorial-center-anchor',
|
||||||
|
titleKey: 'tutorial.dashboard.more.title',
|
||||||
|
descriptionKey: 'tutorial.dashboard.more.desc',
|
||||||
|
position: 'bottom',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.CONTENT_CALENDAR,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.calendar-grid-area',
|
||||||
|
titleKey: 'tutorial.contentCalendar.grid.title',
|
||||||
|
descriptionKey: 'tutorial.contentCalendar.grid.desc',
|
||||||
|
position: 'top',
|
||||||
|
clickToAdvance: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.calendar-side-panel',
|
||||||
|
titleKey: 'tutorial.contentCalendar.panel.title',
|
||||||
|
descriptionKey: 'tutorial.contentCalendar.panel.desc',
|
||||||
|
position: 'left',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: TUTORIAL_KEYS.FEEDBACK,
|
||||||
|
hints: [
|
||||||
|
{
|
||||||
|
targetSelector: '.tutorial-center-anchor',
|
||||||
|
titleKey: 'tutorial.feedback.complete.title',
|
||||||
|
descriptionKey: 'tutorial.feedback.complete.desc',
|
||||||
|
position: 'bottom',
|
||||||
|
clickToAdvance: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetSelector: '.sidebar-inquiry-btn',
|
||||||
|
titleKey: 'tutorial.feedback.title',
|
||||||
|
descriptionKey: 'tutorial.feedback.desc',
|
||||||
|
position: 'right',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -0,0 +1,185 @@
|
|||||||
|
import React, { useState, useCallback } from 'react';
|
||||||
|
import { tutorialSteps, TutorialHint, TUTORIAL_PAGE_GROUPS } from './tutorialSteps';
|
||||||
|
|
||||||
|
// 현재 키가 속한 그룹의 전체 힌트 수와 현재까지의 offset 반환
|
||||||
|
function getGroupProgress(key: string, currentIndex: number): { groupTotal: number; groupOffset: number; isLastKeyInGroup: boolean } | null {
|
||||||
|
const group = TUTORIAL_PAGE_GROUPS.find(g => g.includes(key));
|
||||||
|
if (!group) return null;
|
||||||
|
let offset = 0;
|
||||||
|
let total = 0;
|
||||||
|
for (const k of group) {
|
||||||
|
const step = tutorialSteps.find(s => s.key === k);
|
||||||
|
const count = step?.hints.length ?? 0;
|
||||||
|
if (k === key) offset = total;
|
||||||
|
total += count;
|
||||||
|
}
|
||||||
|
const isLastKeyInGroup = group[group.length - 1] === key;
|
||||||
|
return { groupTotal: total, groupOffset: offset + currentIndex, isLastKeyInGroup };
|
||||||
|
}
|
||||||
|
|
||||||
|
const SEEN_KEY = 'ado2_tutorial_seen';
|
||||||
|
const PROGRESS_KEY = 'ado2_tutorial_progress';
|
||||||
|
|
||||||
|
// 전역 단일 활성 튜토리얼 관리 — 새 튜토리얼 시작 시 이전 것을 skip 처리
|
||||||
|
let globalSkip: (() => void) | null = null;
|
||||||
|
|
||||||
|
function getSeenKeys(): string[] {
|
||||||
|
try {
|
||||||
|
return JSON.parse(localStorage.getItem(SEEN_KEY) || '[]');
|
||||||
|
} catch {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function markSeen(key: string) {
|
||||||
|
const seen = getSeenKeys();
|
||||||
|
if (!seen.includes(key)) {
|
||||||
|
localStorage.setItem(SEEN_KEY, JSON.stringify([...seen, key]));
|
||||||
|
}
|
||||||
|
clearProgress(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveProgress(key: string, index: number) {
|
||||||
|
try {
|
||||||
|
const progress = JSON.parse(localStorage.getItem(PROGRESS_KEY) || '{}');
|
||||||
|
progress[key] = index;
|
||||||
|
localStorage.setItem(PROGRESS_KEY, JSON.stringify(progress));
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadProgress(key: string): number {
|
||||||
|
try {
|
||||||
|
const progress = JSON.parse(localStorage.getItem(PROGRESS_KEY) || '{}');
|
||||||
|
return progress[key] ?? 0;
|
||||||
|
} catch {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearProgress(key: string) {
|
||||||
|
try {
|
||||||
|
const progress = JSON.parse(localStorage.getItem(PROGRESS_KEY) || '{}');
|
||||||
|
delete progress[key];
|
||||||
|
localStorage.setItem(PROGRESS_KEY, JSON.stringify(progress));
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface UseTutorialReturn {
|
||||||
|
isActive: boolean;
|
||||||
|
isRestartPopupVisible: boolean;
|
||||||
|
currentHintIndex: number;
|
||||||
|
hints: TutorialHint[];
|
||||||
|
tutorialKey: string | null;
|
||||||
|
groupProgress: { groupTotal: number; groupOffset: number; isLastKeyInGroup: boolean } | null;
|
||||||
|
startTutorial: (key: string, onComplete?: () => void, forceFromStart?: boolean) => void;
|
||||||
|
nextHint: () => void;
|
||||||
|
prevHint: () => void;
|
||||||
|
skipTutorial: () => void;
|
||||||
|
showRestartPopup: (key: string) => void;
|
||||||
|
confirmRestart: () => void;
|
||||||
|
cancelRestart: () => void;
|
||||||
|
hasSeen: (key: string) => boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function useTutorial(): UseTutorialReturn {
|
||||||
|
const [isActive, setIsActive] = useState(false);
|
||||||
|
const [isRestartPopupVisible, setIsRestartPopupVisible] = useState(false);
|
||||||
|
const [pendingRestartKey, setPendingRestartKey] = useState<string | null>(null);
|
||||||
|
const [currentHintIndex, setCurrentHintIndex] = useState(0);
|
||||||
|
const [hints, setHints] = useState<TutorialHint[]>([]);
|
||||||
|
const [tutorialKey, setTutorialKey] = useState<string | null>(null);
|
||||||
|
const onCompleteRef = React.useRef<(() => void) | undefined>(undefined);
|
||||||
|
|
||||||
|
const startTutorial = useCallback((key: string, onComplete?: () => void, forceFromStart?: boolean) => {
|
||||||
|
const step = tutorialSteps.find(s => s.key === key);
|
||||||
|
if (!step || step.hints.length === 0) return;
|
||||||
|
// 다른 인스턴스에서 활성화된 튜토리얼이 있으면 skip 처리
|
||||||
|
globalSkip?.();
|
||||||
|
const savedIndex = forceFromStart ? 0 : loadProgress(key);
|
||||||
|
const resumeIndex = savedIndex < step.hints.length ? savedIndex : 0;
|
||||||
|
onCompleteRef.current = onComplete;
|
||||||
|
setHints(step.hints);
|
||||||
|
setTutorialKey(key);
|
||||||
|
setCurrentHintIndex(resumeIndex);
|
||||||
|
setIsActive(true);
|
||||||
|
// 이 인스턴스의 skip을 전역에 등록
|
||||||
|
globalSkip = () => {
|
||||||
|
if (key) saveProgress(key, resumeIndex);
|
||||||
|
setIsActive(false);
|
||||||
|
setCurrentHintIndex(0);
|
||||||
|
globalSkip = null;
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const nextHint = useCallback(() => {
|
||||||
|
setCurrentHintIndex(prev => {
|
||||||
|
if (prev < hints.length - 1) {
|
||||||
|
const next = prev + 1;
|
||||||
|
if (tutorialKey) saveProgress(tutorialKey, next);
|
||||||
|
return next;
|
||||||
|
}
|
||||||
|
// 마지막 힌트 완료 → seen 기록 + 진행 상태 삭제
|
||||||
|
setIsActive(false);
|
||||||
|
if (tutorialKey) markSeen(tutorialKey);
|
||||||
|
globalSkip = null; // 완료된 튜토리얼은 globalSkip 해제
|
||||||
|
onCompleteRef.current?.();
|
||||||
|
onCompleteRef.current = undefined;
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
}, [hints.length, tutorialKey]);
|
||||||
|
|
||||||
|
const prevHint = useCallback(() => {
|
||||||
|
setCurrentHintIndex(prev => Math.max(0, prev - 1));
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// 건너뛰기: 현재 진행 인덱스 저장 후 오버레이 닫기 → 다음 방문 시 이어서 표시
|
||||||
|
const skipTutorial = useCallback(() => {
|
||||||
|
if (tutorialKey) saveProgress(tutorialKey, currentHintIndex);
|
||||||
|
setIsActive(false);
|
||||||
|
setCurrentHintIndex(0);
|
||||||
|
}, [tutorialKey, currentHintIndex]);
|
||||||
|
|
||||||
|
// 튜토리얼 다시 보기: 팝업 표시만
|
||||||
|
const showRestartPopup = useCallback((key: string) => {
|
||||||
|
setPendingRestartKey(key);
|
||||||
|
setIsRestartPopupVisible(true);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// 팝업에서 확인 → seen/progress 초기화 후 튜토리얼 시작
|
||||||
|
const confirmRestart = useCallback(() => {
|
||||||
|
setIsRestartPopupVisible(false);
|
||||||
|
if (pendingRestartKey) {
|
||||||
|
localStorage.removeItem(SEEN_KEY);
|
||||||
|
localStorage.removeItem(PROGRESS_KEY);
|
||||||
|
startTutorial(pendingRestartKey, undefined, true);
|
||||||
|
}
|
||||||
|
setPendingRestartKey(null);
|
||||||
|
}, [pendingRestartKey, startTutorial]);
|
||||||
|
|
||||||
|
// 팝업에서 취소
|
||||||
|
const cancelRestart = useCallback(() => {
|
||||||
|
setIsRestartPopupVisible(false);
|
||||||
|
setPendingRestartKey(null);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const hasSeen = useCallback((key: string) => {
|
||||||
|
return getSeenKeys().includes(key);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return {
|
||||||
|
isActive,
|
||||||
|
isRestartPopupVisible,
|
||||||
|
currentHintIndex,
|
||||||
|
hints,
|
||||||
|
tutorialKey,
|
||||||
|
groupProgress: tutorialKey ? getGroupProgress(tutorialKey, currentHintIndex) : null,
|
||||||
|
startTutorial,
|
||||||
|
nextHint,
|
||||||
|
prevHint,
|
||||||
|
skipTutorial,
|
||||||
|
showRestartPopup,
|
||||||
|
confirmRestart,
|
||||||
|
cancelRestart,
|
||||||
|
hasSeen,
|
||||||
|
};
|
||||||
|
}
|
||||||
+97
-12
@@ -13,9 +13,89 @@
|
|||||||
"myInfo": "My Info",
|
"myInfo": "My Info",
|
||||||
"defaultUser": "User",
|
"defaultUser": "User",
|
||||||
"loggingOut": "Logging out...",
|
"loggingOut": "Logging out...",
|
||||||
"logout": "Log Out"
|
"logout": "Log Out",
|
||||||
|
"tutorialRestart": "Restart Tutorial"
|
||||||
|
},
|
||||||
|
"tutorial": {
|
||||||
|
"skip": "Skip",
|
||||||
|
"next": "Next",
|
||||||
|
"prev": "Back",
|
||||||
|
"finish": "Done",
|
||||||
|
"landing": {
|
||||||
|
"intro": { "title": "Welcome to ADO2 Tutorial", "desc": "We'll guide you through ADO2 step by step." },
|
||||||
|
"dropdown": { "title": "Choose Search Type", "desc": "Select URL or business name from the dropdown." },
|
||||||
|
"field": { "title": "Enter Search Term", "desc": "For URL, paste a Naver Maps share URL.\nFor business name, type the name and select from the list." },
|
||||||
|
"button": { "title": "Start Brand Analysis", "desc": "Click the button to let AI start analyzing your brand." }
|
||||||
|
},
|
||||||
|
"analysis": {
|
||||||
|
"identity": { "title": "Brand Identity", "desc": "Check the core values and market positioning AI analyzed for your brand." },
|
||||||
|
"selling": { "title": "Key Selling Points", "desc": "See your brand's strengths." },
|
||||||
|
"persona": { "title": "Target Customer Types", "desc": "AI analyzed what kind of customers visit this brand." },
|
||||||
|
"keywords": { "title": "Recommended Keywords", "desc": "Keywords your customers are likely to search for." },
|
||||||
|
"generate": { "title": "Generate Content", "desc": "Create video content based on the analysis.\nClick to sign in with Kakao and continue." }
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"image": { "title": "Image List", "desc": "Photos from Naver Place. Tap 'Show more' to see the rest, or X to remove any." },
|
||||||
|
"upload": { "title": "Add Images", "desc": "You can freely add more images." },
|
||||||
|
"ratio": { "title": "Select Video Ratio", "desc": "Choose the ratio for the video to be generated." },
|
||||||
|
"next": { "title": "Next Step", "desc": "Proceed to the next step when ready." }
|
||||||
|
},
|
||||||
|
"sound": {
|
||||||
|
"genre": { "title": "Select Genre", "desc": "Pick a music genre that fits your brand." },
|
||||||
|
"language": { "title": "Select Language", "desc": "You can choose the language for the sound.\nWant to continue with Korean?" },
|
||||||
|
"generate": { "title": "Generate Sound", "desc": "Click the button and AI will generate lyrics and music in your chosen genre and language." },
|
||||||
|
"lyrics": { "title": "Lyrics Complete", "desc": "AI wrote lyrics in your selected language.\nCheck the generated lyrics." },
|
||||||
|
"lyricsWait": { "title": "Generating Music", "desc": "AI is composing music based on the lyrics.\nPlease wait a moment." },
|
||||||
|
"audioPlayer": { "title": "Preview the Music", "desc": "Music generation is complete.\nPress play to listen to the generated music." },
|
||||||
|
"video": { "title": "Generate Video", "desc": "Click the button to start generating your video." }
|
||||||
|
},
|
||||||
|
"myInfo": {
|
||||||
|
"myInfo": { "title": "My Info", "desc": "In My Info, you can manage your social connections and view connected accounts." },
|
||||||
|
"connect": { "title": "Connect Now", "desc": "Click the YouTube connect button to go to the connection page.", "note": "Instagram connection is coming soon." },
|
||||||
|
"connected": { "title": "Connected Accounts", "desc": "Your linked social accounts appear here.\nCheck after connecting." },
|
||||||
|
"ado2": { "title": "ADO2 Contents", "desc": "You can now upload the generated video.\nClick to navigate." }
|
||||||
|
},
|
||||||
|
"ado2": {
|
||||||
|
"list": { "title": "Generated Videos", "desc": "View all AI-created videos here." },
|
||||||
|
"download": { "title": "Download", "desc": "Download the video to your device." },
|
||||||
|
"delete": { "title": "Delete", "desc": "Remove videos you no longer need." },
|
||||||
|
"upload": { "title": "Upload to Social Media", "desc": "Select a video and upload it to social media." }
|
||||||
|
},
|
||||||
|
"completion": {
|
||||||
|
"contentInfo": { "title": "Content Info", "desc": "Check the title, genre, resolution, and lyrics of the generated content." },
|
||||||
|
"generating": { "title": "Generating Video", "desc": "AI is creating your video.\nPlease wait a moment." },
|
||||||
|
"completion": { "title": "Video Complete!", "desc": "Your video is ready. Want to take a look?" },
|
||||||
|
"myInfo": { "title": "Connect Social Account", "desc": "To upload your video to YouTube, connect your social account in My Info. Click to go there." }
|
||||||
|
},
|
||||||
|
"upload": {
|
||||||
|
"seo": { "title": "Title & Description", "desc": "AI is generating the title and description for your video. Please wait a moment." },
|
||||||
|
"required": { "title": "Required Fields", "desc": "Fields marked with * are required.\nPlease check them before uploading." },
|
||||||
|
"schedule": { "title": "Schedule Upload", "desc": "Post now or schedule for a specific time." },
|
||||||
|
"submit": { "title": "Start Upload", "desc": "Click the Post button to start uploading." }
|
||||||
|
},
|
||||||
|
"dashboard": {
|
||||||
|
"metrics": { "title": "Key Metrics", "desc": "Check views, subscribers, and other stats for content uploaded via ADO2." },
|
||||||
|
"chart": { "title": "Growth Chart", "desc": "Track your channel's growth over time." },
|
||||||
|
"more": { "title": "More Analytics", "desc": "Even more statistics are available at a glance on the dashboard." }
|
||||||
|
},
|
||||||
|
"contentCalendar": {
|
||||||
|
"grid": { "title": "Content Calendar", "desc": "View your content schedule by date.\nWhy not select today?" },
|
||||||
|
"panel": { "title": "Content List", "desc": "Check the detailed content schedule here." }
|
||||||
|
},
|
||||||
|
"feedback": {
|
||||||
|
"complete": { "title": "Tutorial Complete 🎉", "desc": "You've completed the full flow from brand analysis to YouTube upload.\nTo replay the tutorial, click the button in the top right." },
|
||||||
|
"title": "Customer Feedback",
|
||||||
|
"desc": "Share any issues or suggestions to help us improve."
|
||||||
|
},
|
||||||
|
"restart": {
|
||||||
|
"title": "Restart Tutorial?",
|
||||||
|
"desc": "The tutorial will restart from the current screen.",
|
||||||
|
"confirm": "Start",
|
||||||
|
"cancel": "Cancel"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"footer": {
|
"footer": {
|
||||||
|
"company":"O2O Inc.",
|
||||||
"businessNumber": "Business Registration No. : 620-87-00810 | CEO : Ahn Sungmin",
|
"businessNumber": "Business Registration No. : 620-87-00810 | CEO : Ahn Sungmin",
|
||||||
"headquarters": "HQ : 41593 Unicorn Lab Daegu A05, 5F, 111 Oksan-ro, Buk-gu, Daegu, Korea",
|
"headquarters": "HQ : 41593 Unicorn Lab Daegu A05, 5F, 111 Oksan-ro, Buk-gu, Daegu, Korea",
|
||||||
"researchCenter": "R&D : 13453 Rooms 504-505 (East), KT Pangyo Bldg, 32 Geumto-ro, Sujeong-gu, Seongnam-si, Gyeonggi-do, Korea",
|
"researchCenter": "R&D : 13453 Rooms 504-505 (East), KT Pangyo Bldg, 32 Geumto-ro, Sujeong-gu, Seongnam-si, Gyeonggi-do, Korea",
|
||||||
@@ -25,7 +105,7 @@
|
|||||||
"social": {
|
"social": {
|
||||||
"title": "Social Media Posting",
|
"title": "Social Media Posting",
|
||||||
"postNumber": "Post 1",
|
"postNumber": "Post 1",
|
||||||
"videoSpecs": "1080x1920 · 10 sec",
|
"videoSpecs": "720x1280 · 1:01",
|
||||||
"channelLabel": "Post Channel",
|
"channelLabel": "Post Channel",
|
||||||
"loadingAccounts": "Loading accounts...",
|
"loadingAccounts": "Loading accounts...",
|
||||||
"noAccounts": "No connected social accounts.",
|
"noAccounts": "No connected social accounts.",
|
||||||
@@ -54,9 +134,9 @@
|
|||||||
"invalidVideoInfo": "Video information is invalid. (missing video_id)",
|
"invalidVideoInfo": "Video information is invalid. (missing video_id)",
|
||||||
"uploadStartFailed": "Failed to start upload.",
|
"uploadStartFailed": "Failed to start upload.",
|
||||||
"uploadFailed": "Upload failed.",
|
"uploadFailed": "Upload failed.",
|
||||||
"autoSeoTitle": "This will be automatically generated. please wait.",
|
"autoSeoTitle": "Auto-generating... (30–60 sec)",
|
||||||
"autoSeoDescription": "This will be automatically generated. please wait.",
|
"autoSeoDescription": "Auto-generating... (30–60 sec)",
|
||||||
"autoSeoTags": "This will be automatically generated. please wait."
|
"autoSeoTags": "Auto-generating... (30–60 sec)"
|
||||||
},
|
},
|
||||||
"upload": {
|
"upload": {
|
||||||
"title": "YouTube Upload",
|
"title": "YouTube Upload",
|
||||||
@@ -78,7 +158,7 @@
|
|||||||
"hero": {
|
"hero": {
|
||||||
"searchTypeBusinessName": "Business Name",
|
"searchTypeBusinessName": "Business Name",
|
||||||
"placeholderBusinessName": "Enter a business name",
|
"placeholderBusinessName": "Enter a business name",
|
||||||
"guideUrl": "A video will be automatically generated from the information gathered from the URL.",
|
"guideUrl": "Search for a place on Naver Maps, tap Share,\nthen paste the URL here.",
|
||||||
"guideBusinessName": "Search by business name to retrieve information.",
|
"guideBusinessName": "Search by business name to retrieve information.",
|
||||||
"errorUrlRequired": "Please enter a URL.",
|
"errorUrlRequired": "Please enter a URL.",
|
||||||
"errorNameRequired": "Please enter a business name.",
|
"errorNameRequired": "Please enter a business name.",
|
||||||
@@ -96,7 +176,7 @@
|
|||||||
"feature1Title": "Business Core Information Analysis",
|
"feature1Title": "Business Core Information Analysis",
|
||||||
"feature1Desc": "Enter the URL of your homepage,\nNaver Map, blog, etc.",
|
"feature1Desc": "Enter the URL of your homepage,\nNaver Map, blog, etc.",
|
||||||
"feature2Title": "Automated Promotional Content Creation",
|
"feature2Title": "Automated Promotional Content Creation",
|
||||||
"feature2Desc": "Based on analyzed information,\nautomatically create music, subtitles, songs,\nand videos tailored to your business",
|
"feature2Desc": "Based on analyzed information,\nautomatically create music, subtitles,\nand videos tailored to your business",
|
||||||
"feature3Title": "Multi-Channel Auto Distribution",
|
"feature3Title": "Multi-Channel Auto Distribution",
|
||||||
"feature3Desc": "Completed videos can be downloaded\nor uploaded directly to social media"
|
"feature3Desc": "Completed videos can be downloaded\nor uploaded directly to social media"
|
||||||
},
|
},
|
||||||
@@ -114,7 +194,7 @@
|
|||||||
"urlInput": {
|
"urlInput": {
|
||||||
"searchTypeBusinessName": "Business Name",
|
"searchTypeBusinessName": "Business Name",
|
||||||
"placeholderBusinessName": "Enter a business name",
|
"placeholderBusinessName": "Enter a business name",
|
||||||
"guideUrl": "A video will be automatically generated from the information gathered from the URL.",
|
"guideUrl": "Search for a place on Naver Maps, tap Share, then paste the URL here.",
|
||||||
"guideBusinessName": "Search by business name to retrieve information.",
|
"guideBusinessName": "Search by business name to retrieve information.",
|
||||||
"searchButton": "Search",
|
"searchButton": "Search",
|
||||||
"searching": "Searching...",
|
"searching": "Searching...",
|
||||||
@@ -129,8 +209,13 @@
|
|||||||
"imageUpload": "Image Upload",
|
"imageUpload": "Image Upload",
|
||||||
"dragAndDrop": "Drag and drop\nimages to upload",
|
"dragAndDrop": "Drag and drop\nimages to upload",
|
||||||
"videoRatio": "Video Ratio",
|
"videoRatio": "Video Ratio",
|
||||||
|
"minImages": "Min. 5 images",
|
||||||
|
"youtubeShorts": "YouTube Shorts",
|
||||||
|
"youtubeVideo": "YouTube Video",
|
||||||
|
"back": "Go Back",
|
||||||
|
"loadMore": "Load more",
|
||||||
"uploadFailed": "Image upload failed.",
|
"uploadFailed": "Image upload failed.",
|
||||||
"uploading": "Uploading...",
|
"uploading": "Uploading... (30 sec – 2 min)",
|
||||||
"nextStep": "Next Step"
|
"nextStep": "Next Step"
|
||||||
},
|
},
|
||||||
"soundStudio": {
|
"soundStudio": {
|
||||||
@@ -154,8 +239,8 @@
|
|||||||
"videoGenerating": "Generating Video",
|
"videoGenerating": "Generating Video",
|
||||||
"noBusinessInfo": "No business information. Please try again.",
|
"noBusinessInfo": "No business information. Please try again.",
|
||||||
"noImageUploadInfo": "No image upload information. Please go back to the previous step and try again.",
|
"noImageUploadInfo": "No image upload information. Please go back to the previous step and try again.",
|
||||||
"generatingLyrics": "Generating lyrics...",
|
"generatingLyrics": "Generating lyrics...\n(30–60 sec)",
|
||||||
"generatingSong": "Generating song...",
|
"generatingSong": "Generating music...\n(1–2 min)",
|
||||||
"songQueued": "Song generation queued...",
|
"songQueued": "Song generation queued...",
|
||||||
"retryMessage": "Regenerating due to timeout... ({{count}}/{{max}})",
|
"retryMessage": "Regenerating due to timeout... ({{count}}/{{max}})",
|
||||||
"lyricGenerationFailed": "Lyrics generation request failed.",
|
"lyricGenerationFailed": "Lyrics generation request failed.",
|
||||||
@@ -185,7 +270,7 @@
|
|||||||
"statusPlanned": "Scheduled",
|
"statusPlanned": "Scheduled",
|
||||||
"statusWaiting": "Waiting",
|
"statusWaiting": "Waiting",
|
||||||
"statusTranscribing": "Transcribing",
|
"statusTranscribing": "Transcribing",
|
||||||
"statusRendering": "Rendering",
|
"statusRendering": "Rendering (2–3 min)",
|
||||||
"statusSucceeded": "Completed",
|
"statusSucceeded": "Completed",
|
||||||
"statusDefault": "Processing...",
|
"statusDefault": "Processing...",
|
||||||
"aiOptimization": "AI Optimization",
|
"aiOptimization": "AI Optimization",
|
||||||
|
|||||||
+105
-20
@@ -13,9 +13,89 @@
|
|||||||
"myInfo": "내 정보",
|
"myInfo": "내 정보",
|
||||||
"defaultUser": "사용자",
|
"defaultUser": "사용자",
|
||||||
"loggingOut": "로그아웃 중...",
|
"loggingOut": "로그아웃 중...",
|
||||||
"logout": "로그아웃"
|
"logout": "로그아웃",
|
||||||
|
"tutorialRestart": "튜토리얼 다시 보기"
|
||||||
|
},
|
||||||
|
"tutorial": {
|
||||||
|
"skip": "건너뛰기",
|
||||||
|
"next": "다음",
|
||||||
|
"prev": "이전",
|
||||||
|
"finish": "완료",
|
||||||
|
"landing": {
|
||||||
|
"intro": { "title": "ADO2 튜토리얼 시작", "desc": "ADO2 사용 방법을 단계별로 안내해 드릴게요." },
|
||||||
|
"dropdown": { "title": "검색 방식 선택", "desc": "드롭다운에서 URL 또는 업체명 중 원하는 방식을 선택하세요." },
|
||||||
|
"field": { "title": "입력하기", "desc": "URL 방식이라면 네이버 지도 공유 URL,\n업체명 방식이라면 업체명을 입력하고 목록에서 선택하세요." },
|
||||||
|
"button": { "title": "브랜드 분석 시작", "desc": "버튼을 누르면 AI가 브랜드를 분석하기 시작해요." }
|
||||||
|
},
|
||||||
|
"analysis": {
|
||||||
|
"identity": { "title": "브랜드 정체성", "desc": "AI가 분석한 펜션의 핵심 가치와 시장 포지셔닝을 확인하세요." },
|
||||||
|
"selling": { "title": "주요 셀링 포인트", "desc": "펜션의 강점을 확인할 수 있어요." },
|
||||||
|
"persona": { "title": "주요 고객 유형", "desc": "어떤 고객이 이 펜션을 찾는지 분석했어요." },
|
||||||
|
"keywords": { "title": "추천 타겟 키워드", "desc": "고객이 검색할 가능성이 높은 키워드들이에요." },
|
||||||
|
"generate": { "title": "콘텐츠 생성", "desc": "분석 결과를 바탕으로 영상을 만들어 보세요.\n클릭하면 카카오 로그인으로 이동합니다." }
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"image": { "title": "이미지 목록", "desc": "네이버 Place에서 가져 온 사진이에요. \n더보기를 누르면 나머지 사진도 볼 수 있고 X를 눌러 삭제 할 수 있어요." },
|
||||||
|
"upload": { "title": "이미지 추가", "desc": "이미지를 자유롭게 추가 할 수 있어요." },
|
||||||
|
"ratio": { "title": "영상 비율 선택", "desc": "생성 할 영상의 비율을 선택하세요." },
|
||||||
|
"next": { "title": "다음 단계로", "desc": "설정이 완료되면 다음 단계로 진행하세요." }
|
||||||
|
},
|
||||||
|
"sound": {
|
||||||
|
"genre": { "title": "장르 선택", "desc": "영상에 어울리는 음악 장르를 선택하세요." },
|
||||||
|
"language": { "title": "언어 선택", "desc": "사운드의 언어를 선택할 수 있어요. \n이미 선택된 한국어로 진행해볼까요?" },
|
||||||
|
"generate": { "title": "사운드 생성", "desc": "버튼을 클릭하면 AI가 선택한 장르와 언어로 가사와 음악을 생성해요."},
|
||||||
|
"lyrics": { "title": "가사 생성 완료", "desc": "AI가 선택한 언어로 가사를 만들었어요.\n생성된 가사를 확인하세요." },
|
||||||
|
"lyricsWait": { "title": "음악 생성 중", "desc": "가사를 바탕으로 AI가 음악을 만들고 있어요.\n잠시만 기다려 주세요." },
|
||||||
|
"audioPlayer": { "title": "음악 미리 듣기", "desc": "음악 생성이 완료되었어요.\n재생 버튼을 눌러 생성된 음악을 들어보세요." },
|
||||||
|
"video": { "title": "영상 생성", "desc": "버튼을 클릭해서 영상 생성을 시작하세요." }
|
||||||
|
},
|
||||||
|
"myInfo": {
|
||||||
|
"myInfo": { "title": "내 정보", "desc": "내 정보에서는 소셜 연결과 연결된 계정을 확인 할 수 있어요." },
|
||||||
|
"connect": { "title": "연결하기", "desc": "YouTube 연결 버튼을 누르면 연결 페이지로 이동합니다.", "note": "Instargram 연결은 오픈 예정입니다." },
|
||||||
|
"connected": { "title": "연결 계정", "desc": "연결된 소셜 계정 목록이에요. \n연결 후 여기서 확인할 수 있어요." },
|
||||||
|
"ado2": { "title": "ADO2 콘텐츠", "desc": "이제 생성된 영상을 업로드할 수 있어요. \n클릭해서 이동하세요." }
|
||||||
|
},
|
||||||
|
"ado2": {
|
||||||
|
"list": { "title": "생성된 영상 목록", "desc": "ADO2에서 만든 영상들을 확인할 수 있어요." },
|
||||||
|
"download": { "title": "다운로드", "desc": "영상을 다운로드 할 수 있어요." },
|
||||||
|
"delete": { "title": "삭제", "desc": "필요없는 영상을 삭제할 수 있어요." },
|
||||||
|
"upload": { "title": "소셜 업로드", "desc": "선택해서 소셜미디어에 업로드하세요." }
|
||||||
|
},
|
||||||
|
"completion": {
|
||||||
|
"contentInfo": { "title": "콘텐츠 정보", "desc": "콘텐츠의 제목,장르,규격,가사를 확인하세요." },
|
||||||
|
"generating": { "title": "영상 제작 중", "desc": "AI가 영상을 만들고 있어요. \n잠시만 기다려 주세요." },
|
||||||
|
"completion": { "title": "영상 완성!", "desc": "영상 제작이 완료되었어요. \n영상을 확인해 볼까요?" },
|
||||||
|
"myInfo": { "title": "소셜 계정 연동", "desc": "영상을 유튜브에 업로드하려면 내 정보에서 소셜 계정을 연동해야 해요. \n클릭해서 이동하세요." }
|
||||||
|
},
|
||||||
|
"upload": {
|
||||||
|
"seo": { "title": "제목 및 설명", "desc": "영상의 제목과 설명을 AI가 만들고 있어요. 잠시만 기다려 주세요." },
|
||||||
|
"required": { "title": "필수 항목", "desc": "영상을 업로드 하기 전 *는 필수 항목으로 \n반드시 확인해 주세요." },
|
||||||
|
"schedule": { "title": "업로드 예약", "desc": "지금 게시하거나 원하는 시간에 예약할 수 있어요." },
|
||||||
|
"submit": { "title": "업로드 시작", "desc": "게시 버튼을 눌러 업로드를 시작하세요." }
|
||||||
|
},
|
||||||
|
"dashboard": {
|
||||||
|
"metrics": { "title": "핵심 지표", "desc": "조회수, 구독자 등 ADO2로 업로드한 콘텐츠의 주요 통계를 확인하세요." },
|
||||||
|
"chart": { "title": "성장 추이 차트", "desc": "기간별 성장 추이를 그래프로 확인할 수 있어요." },
|
||||||
|
"more": { "title": "더 많은 통계", "desc": "그 외에도 다양한 통계를 대시보드에서 한눈에 확인할 수 있어요." }
|
||||||
|
},
|
||||||
|
"contentCalendar": {
|
||||||
|
"grid": { "title": "콘텐츠 캘린더", "desc": "날짜별로 콘텐츠 스케줄을 확인할 수 있어요. \n오늘 날짜를 선택해 볼까요?" },
|
||||||
|
"panel": { "title": "콘텐츠 목록", "desc": "자세한 콘텐츠 스케줄을 확인 할수 있어요." }
|
||||||
|
},
|
||||||
|
"feedback": {
|
||||||
|
"complete": { "title": "튜토리얼 완료 🎉", "desc": "유튜브 업로드까지 모든 과정을 완료했어요. \n튜토리얼을 다시보고 싶다면 우측 상단의 버튼을 눌러주세요." },
|
||||||
|
"title": "고객의견",
|
||||||
|
"desc": "서비스 이용 중 불편한 점이나 개선 의견을 보내주세요."
|
||||||
|
},
|
||||||
|
"restart": {
|
||||||
|
"title": "튜토리얼을 다시 시작할까요?",
|
||||||
|
"desc": "현재 화면부터 튜토리얼이 다시 시작됩니다.",
|
||||||
|
"confirm": "시작하기",
|
||||||
|
"cancel": "취소"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"footer": {
|
"footer": {
|
||||||
|
"company":"㈜에이아이오투오",
|
||||||
"businessNumber": "사업자 등록번호 : 620-87-00810 | 대표 : 안성민",
|
"businessNumber": "사업자 등록번호 : 620-87-00810 | 대표 : 안성민",
|
||||||
"headquarters": "본사 : 41593 대구광역시 북구 옥산로 111, 5층 유니콘랩 대구 A05호",
|
"headquarters": "본사 : 41593 대구광역시 북구 옥산로 111, 5층 유니콘랩 대구 A05호",
|
||||||
"researchCenter": "연구소 : 13453 경기 성남시 수정구 금토로 32 (금토동) (주)KT 판교빌딩 504호~505호 (East)",
|
"researchCenter": "연구소 : 13453 경기 성남시 수정구 금토로 32 (금토동) (주)KT 판교빌딩 504호~505호 (East)",
|
||||||
@@ -25,7 +105,7 @@
|
|||||||
"social": {
|
"social": {
|
||||||
"title": "소셜 미디어 포스팅",
|
"title": "소셜 미디어 포스팅",
|
||||||
"postNumber": "게시물 1",
|
"postNumber": "게시물 1",
|
||||||
"videoSpecs": "1080x1920 · 10초",
|
"videoSpecs": "720x1280 · 1:01",
|
||||||
"channelLabel": "게시 채널",
|
"channelLabel": "게시 채널",
|
||||||
"loadingAccounts": "계정 로딩 중...",
|
"loadingAccounts": "계정 로딩 중...",
|
||||||
"noAccounts": "연결된 소셜 계정이 없습니다.",
|
"noAccounts": "연결된 소셜 계정이 없습니다.",
|
||||||
@@ -42,7 +122,7 @@
|
|||||||
"privacyPrivate": "비공개",
|
"privacyPrivate": "비공개",
|
||||||
"publishTimeLabel": "게시 시간",
|
"publishTimeLabel": "게시 시간",
|
||||||
"publishNow": "지금 게시",
|
"publishNow": "지금 게시",
|
||||||
"publishSchedule": "시간 설정 (준비 중)",
|
"publishSchedule": "시간 설정",
|
||||||
"footerNote": "",
|
"footerNote": "",
|
||||||
"footerNoteLink": "",
|
"footerNoteLink": "",
|
||||||
"cancel": "취소",
|
"cancel": "취소",
|
||||||
@@ -54,9 +134,9 @@
|
|||||||
"invalidVideoInfo": "영상 정보가 올바르지 않습니다. (video_id 누락)",
|
"invalidVideoInfo": "영상 정보가 올바르지 않습니다. (video_id 누락)",
|
||||||
"uploadStartFailed": "업로드 시작에 실패했습니다.",
|
"uploadStartFailed": "업로드 시작에 실패했습니다.",
|
||||||
"uploadFailed": "업로드에 실패했습니다.",
|
"uploadFailed": "업로드에 실패했습니다.",
|
||||||
"autoSeoTitle": "자동으로 작성중입니다. 기다려주세요.",
|
"autoSeoTitle": "자동으로 작성중입니다. (30~60초 소요)",
|
||||||
"autoSeoDescription": "자동으로 작성중입니다. 기다려주세요.",
|
"autoSeoDescription": "자동으로 작성중입니다. (30~60초 소요)",
|
||||||
"autoSeoTags": "자동으로 작성중입니다. 기다려주세요."
|
"autoSeoTags": "자동으로 작성중입니다. (30~60초 소요)"
|
||||||
},
|
},
|
||||||
"upload": {
|
"upload": {
|
||||||
"title": "YouTube 업로드",
|
"title": "YouTube 업로드",
|
||||||
@@ -77,8 +157,8 @@
|
|||||||
"landing": {
|
"landing": {
|
||||||
"hero": {
|
"hero": {
|
||||||
"searchTypeBusinessName": "업체명",
|
"searchTypeBusinessName": "업체명",
|
||||||
"placeholderBusinessName": "업체명을 입력하세요",
|
"placeholderBusinessName": "업체명을 입력하세요.",
|
||||||
"guideUrl": "URL에서 가져온 정보로 영상이 자동 생성됩니다.",
|
"guideUrl": "네이버지도에서 장소를 검색하고 공유 선택, \n나오는 URL을 붙여 넣어 주세요.",
|
||||||
"guideBusinessName": "업체명으로 검색하여 정보를 가져옵니다.",
|
"guideBusinessName": "업체명으로 검색하여 정보를 가져옵니다.",
|
||||||
"errorUrlRequired": "URL을 입력해주세요.",
|
"errorUrlRequired": "URL을 입력해주세요.",
|
||||||
"errorNameRequired": "업체명을 입력해주세요.",
|
"errorNameRequired": "업체명을 입력해주세요.",
|
||||||
@@ -94,9 +174,9 @@
|
|||||||
"title": "ADO2.AI에 오신 것을 환영합니다.",
|
"title": "ADO2.AI에 오신 것을 환영합니다.",
|
||||||
"subtitle": "분석, 제작, 배포까지 콘텐츠 마케팅의 전과정을 자동화",
|
"subtitle": "분석, 제작, 배포까지 콘텐츠 마케팅의 전과정을 자동화",
|
||||||
"feature1Title": "비즈니스 핵심 정보 분석",
|
"feature1Title": "비즈니스 핵심 정보 분석",
|
||||||
"feature1Desc": "홈페이지, 네이버 지도, 블로그 등의\nURL을 입력하세요",
|
"feature1Desc": "홈페이지, 네이버 지도, 블로그 등의\nURL을 입력하세요.",
|
||||||
"feature2Title": "홍보 콘텐츠 자동 제작",
|
"feature2Title": "홍보 콘텐츠 자동 제작",
|
||||||
"feature2Desc": "분석된 정보를 바탕으로\n비즈니스에 맞는 음악, 자막, 노래, 영상을\n자동으로 제작해요",
|
"feature2Desc": "분석된 정보를 바탕으로\n비즈니스에 맞는 음악, 자막, 영상을\n자동으로 제작해요",
|
||||||
"feature3Title": "멀티채널 자동 배포",
|
"feature3Title": "멀티채널 자동 배포",
|
||||||
"feature3Desc": "완성된 영상은 다운로드하거나\n바로 SNS에 업로드 할 수 있어요"
|
"feature3Desc": "완성된 영상은 다운로드하거나\n바로 SNS에 업로드 할 수 있어요"
|
||||||
},
|
},
|
||||||
@@ -113,8 +193,8 @@
|
|||||||
},
|
},
|
||||||
"urlInput": {
|
"urlInput": {
|
||||||
"searchTypeBusinessName": "업체명",
|
"searchTypeBusinessName": "업체명",
|
||||||
"placeholderBusinessName": "업체명을 입력하세요",
|
"placeholderBusinessName": "업체명을 입력하세요.",
|
||||||
"guideUrl": "URL에서 가져온 정보로 영상이 자동 생성됩니다.",
|
"guideUrl": "네이버지도에서 장소를 검색하고 공유 선택, \n나오는 URL을 붙여 넣어 주세요.",
|
||||||
"guideBusinessName": "업체명으로 검색하여 정보를 가져옵니다.",
|
"guideBusinessName": "업체명으로 검색하여 정보를 가져옵니다.",
|
||||||
"searchButton": "검색하기",
|
"searchButton": "검색하기",
|
||||||
"searching": "검색 중...",
|
"searching": "검색 중...",
|
||||||
@@ -129,8 +209,13 @@
|
|||||||
"imageUpload": "이미지 업로드",
|
"imageUpload": "이미지 업로드",
|
||||||
"dragAndDrop": "이미지를 드래그하여\n업로드",
|
"dragAndDrop": "이미지를 드래그하여\n업로드",
|
||||||
"videoRatio": "영상 비율",
|
"videoRatio": "영상 비율",
|
||||||
|
"minImages": "최소 5장",
|
||||||
|
"youtubeShorts": "유튜브 쇼츠",
|
||||||
|
"youtubeVideo": "유튜브 일반",
|
||||||
|
"back": "뒤로가기",
|
||||||
|
"loadMore": "더보기",
|
||||||
"uploadFailed": "이미지 업로드에 실패했습니다.",
|
"uploadFailed": "이미지 업로드에 실패했습니다.",
|
||||||
"uploading": "업로드 중...",
|
"uploading": "업로드 중 (30초~2분 소요)",
|
||||||
"nextStep": "다음 단계"
|
"nextStep": "다음 단계"
|
||||||
},
|
},
|
||||||
"soundStudio": {
|
"soundStudio": {
|
||||||
@@ -154,9 +239,9 @@
|
|||||||
"videoGenerating": "영상 생성 중",
|
"videoGenerating": "영상 생성 중",
|
||||||
"noBusinessInfo": "비즈니스 정보가 없습니다. 다시 시도해주세요.",
|
"noBusinessInfo": "비즈니스 정보가 없습니다. 다시 시도해주세요.",
|
||||||
"noImageUploadInfo": "이미지 업로드 정보가 없습니다. 이전 단계로 돌아가 다시 시도해주세요.",
|
"noImageUploadInfo": "이미지 업로드 정보가 없습니다. 이전 단계로 돌아가 다시 시도해주세요.",
|
||||||
"generatingLyrics": "가사를 생성하고 있습니다...",
|
"generatingLyrics": "가사를 생성하고 있습니다. (30~60초 소요)",
|
||||||
"generatingSong": "노래를 생성하고 있습니다...",
|
"generatingSong": "음악을 생성하고 있습니다. (1~2분 소요)",
|
||||||
"songQueued": "노래 생성 대기 중...",
|
"songQueued": "음악 생성 대기 중...",
|
||||||
"retryMessage": "시간 초과로 재생성 중... ({{count}}/{{max}})",
|
"retryMessage": "시간 초과로 재생성 중... ({{count}}/{{max}})",
|
||||||
"lyricGenerationFailed": "가사 생성 요청에 실패했습니다.",
|
"lyricGenerationFailed": "가사 생성 요청에 실패했습니다.",
|
||||||
"lyricNotReceived": "가사를 받지 못했습니다.",
|
"lyricNotReceived": "가사를 받지 못했습니다.",
|
||||||
@@ -185,7 +270,7 @@
|
|||||||
"statusPlanned": "예약됨",
|
"statusPlanned": "예약됨",
|
||||||
"statusWaiting": "대기 중",
|
"statusWaiting": "대기 중",
|
||||||
"statusTranscribing": "트랜스크립션 중",
|
"statusTranscribing": "트랜스크립션 중",
|
||||||
"statusRendering": "렌더링 중",
|
"statusRendering": "생성 중 (2~3분 소요)",
|
||||||
"statusSucceeded": "완료",
|
"statusSucceeded": "완료",
|
||||||
"statusDefault": "처리 중...",
|
"statusDefault": "처리 중...",
|
||||||
"aiOptimization": "AI 최적화",
|
"aiOptimization": "AI 최적화",
|
||||||
@@ -340,11 +425,11 @@
|
|||||||
"conceptScalability": "컨셉 확장성",
|
"conceptScalability": "컨셉 확장성",
|
||||||
"noInfo": "정보 없음",
|
"noInfo": "정보 없음",
|
||||||
"marketPositioning": "시장 포지셔닝",
|
"marketPositioning": "시장 포지셔닝",
|
||||||
"coreValue": "핵심 가치 (Core Value)",
|
"coreValue": "핵심 가치",
|
||||||
"categoryDefinition": "카테고리 정의",
|
"categoryDefinition": "카테고리 정의",
|
||||||
"targetPersona": "타겟 페르소나",
|
"targetPersona": "주요 고객 유형",
|
||||||
"ageSuffix": "세",
|
"ageSuffix": "세",
|
||||||
"sellingPoints": "주요 셀링 포인트 (USP)",
|
"sellingPoints": "주요 셀링 포인트",
|
||||||
"recommendedKeywords": "추천 타겟 키워드",
|
"recommendedKeywords": "추천 타겟 키워드",
|
||||||
"generateContent": "콘텐츠 생성",
|
"generateContent": "콘텐츠 생성",
|
||||||
"pageDescBefore": "을 통해 도출된 ",
|
"pageDescBefore": "을 통해 도출된 ",
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
|
|
||||||
import React, { useState, useEffect, useRef } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { CrawlingResponse, TargetPersona, SellingPoint } from '../../types/api';
|
import { CrawlingResponse, TargetPersona } from '../../types/api';
|
||||||
|
import { GeometricChart } from './GeometricChart';
|
||||||
|
import { useTutorial } from '../../components/Tutorial/useTutorial';
|
||||||
|
import { TUTORIAL_KEYS } from '../../components/Tutorial/tutorialSteps';
|
||||||
|
import TutorialOverlay from '../../components/Tutorial/TutorialOverlay';
|
||||||
|
|
||||||
interface AnalysisResultSectionProps {
|
interface AnalysisResultSectionProps {
|
||||||
onBack: () => void;
|
onBack: () => void;
|
||||||
@@ -9,200 +13,20 @@ interface AnalysisResultSectionProps {
|
|||||||
data: CrawlingResponse;
|
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 AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, onGenerate, data }) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const tutorial = useTutorial();
|
||||||
const { processed_info, marketing_analysis } = data;
|
const { processed_info, marketing_analysis } = data;
|
||||||
const containerRef = useRef<HTMLDivElement>(null);
|
|
||||||
const [buttonPosition, setButtonPosition] = useState({ left: 0, width: 0 });
|
useEffect(() => {
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
if (!tutorial.hasSeen(TUTORIAL_KEYS.ANALYSIS)) {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.ANALYSIS);
|
||||||
|
}
|
||||||
|
}, 600);
|
||||||
|
return () => clearTimeout(timer);
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, []);
|
||||||
|
|
||||||
const brandIdentity = marketing_analysis?.brand_identity;
|
const brandIdentity = marketing_analysis?.brand_identity;
|
||||||
const marketPositioning = marketing_analysis?.market_positioning;
|
const marketPositioning = marketing_analysis?.market_positioning;
|
||||||
@@ -213,27 +37,8 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
|||||||
// 셀링 포인트를 score 내림차순으로 정렬
|
// 셀링 포인트를 score 내림차순으로 정렬
|
||||||
const sortedSellingPoints = [...sellingPoints].sort((a, b) => b.score - a.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 (
|
return (
|
||||||
|
<>
|
||||||
<div className="bi2-page">
|
<div className="bi2-page">
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="bi2-header">
|
<div className="bi2-header">
|
||||||
@@ -253,13 +58,15 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
|||||||
<div className="bi2-title-text">
|
<div className="bi2-title-text">
|
||||||
<h1 className="bi2-main-title">{t('analysis.pageTitle')}</h1>
|
<h1 className="bi2-main-title">{t('analysis.pageTitle')}</h1>
|
||||||
<p className="bi2-subtitle">
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr className="bi2-page-divider" />
|
||||||
|
|
||||||
{/* Main Content Container */}
|
{/* Main Content Container */}
|
||||||
<div ref={containerRef} className="bi2-main-container">
|
<div className="bi2-main-container">
|
||||||
{/* 매장명 & 주소 */}
|
{/* 매장명 & 주소 */}
|
||||||
<div className="bi2-store-header">
|
<div className="bi2-store-header">
|
||||||
<h2 className="bi2-store-name">{processed_info?.customer_name || t('analysis.brandNameFallback')}</h2>
|
<h2 className="bi2-store-name">{processed_info?.customer_name || t('analysis.brandNameFallback')}</h2>
|
||||||
@@ -298,7 +105,7 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
|||||||
{/* 레이더 차트 */}
|
{/* 레이더 차트 */}
|
||||||
<div className="bi2-selling-chart">
|
<div className="bi2-selling-chart">
|
||||||
{sellingPoints.length > 0 && (
|
{sellingPoints.length > 0 && (
|
||||||
<RadarChart data={sellingPoints} size={360} />
|
<GeometricChart data={sellingPoints} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{/* 셀링 포인트 리스트 */}
|
{/* 셀링 포인트 리스트 */}
|
||||||
@@ -340,9 +147,11 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
|||||||
<div className="bi2-persona-divider"></div>
|
<div className="bi2-persona-divider"></div>
|
||||||
<div className="bi2-persona-detail grow">
|
<div className="bi2-persona-detail grow">
|
||||||
<span className="bi2-label-xs">{t('analysis.favorKeywords', { defaultValue: '선호 키워드' })}</span>
|
<span className="bi2-label-xs">{t('analysis.favorKeywords', { defaultValue: '선호 키워드' })}</span>
|
||||||
<p className="bi2-persona-detail-text">
|
<div className="bi2-persona-detail-text">
|
||||||
{persona.favor_target.join('\n')}
|
{persona.favor_target.map((item, i) => (
|
||||||
</p>
|
<p key={i}>{item}</p>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="bi2-persona-divider"></div>
|
<div className="bi2-persona-divider"></div>
|
||||||
<div className="bi2-persona-detail">
|
<div className="bi2-persona-detail">
|
||||||
@@ -369,13 +178,10 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 콘텐츠 생성 버튼 */}
|
{/* 콘텐츠 생성 버튼 */}
|
||||||
<div
|
<div className="bi2-bottom-button-container">
|
||||||
className="fixed bottom-8 flex justify-center z-50 pointer-events-none"
|
|
||||||
style={{ left: buttonPosition.left, width: buttonPosition.width }}
|
|
||||||
>
|
|
||||||
<button
|
<button
|
||||||
onClick={onGenerate}
|
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">
|
<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" />
|
<path d="M12 2l2.4 6.8L22 12l-7.6 3.2L12 22l-2.4-6.8L2 12l7.6-3.2L12 2z" />
|
||||||
@@ -384,6 +190,18 @@ const AnalysisResultSection: React.FC<AnalysisResultSectionProps> = ({ onBack, o
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{tutorial.isActive && (
|
||||||
|
<TutorialOverlay
|
||||||
|
hints={tutorial.hints}
|
||||||
|
currentIndex={tutorial.currentHintIndex}
|
||||||
|
onNext={tutorial.nextHint}
|
||||||
|
onPrev={tutorial.prevHint}
|
||||||
|
onSkip={tutorial.skipTutorial}
|
||||||
|
groupProgress={tutorial.groupProgress}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,150 +1,209 @@
|
|||||||
import React from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
|
import { SellingPoint } from '../../types/api';
|
||||||
export interface USP {
|
|
||||||
label: string;
|
|
||||||
subLabel: string;
|
|
||||||
score: number;
|
|
||||||
description: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface GeometricChartProps {
|
interface GeometricChartProps {
|
||||||
data: USP[];
|
data: SellingPoint[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export const GeometricChart: React.FC<GeometricChartProps> = ({ data }) => {
|
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 center = size / 2;
|
||||||
const radius = 110;
|
const maxRadius = 160;
|
||||||
const sides = data.length;
|
const sides = data.length;
|
||||||
|
const levels = 5;
|
||||||
|
const angleStep = (Math.PI * 2) / sides;
|
||||||
|
|
||||||
const accentColor = "#94FBE0";
|
const getAngle = (i: number) => angleStep * i - Math.PI / 2;
|
||||||
|
const getPoint = (i: number, r: number) => ({
|
||||||
const getPoints = (r: number) => {
|
x: center + r * Math.cos(getAngle(i)),
|
||||||
return data.map((_, i) => {
|
y: center + r * Math.sin(getAngle(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 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 (
|
return (
|
||||||
<div className="flex flex-col items-center justify-center py-2 relative w-full h-full">
|
<div className="bi2-radar-container">
|
||||||
<svg viewBox={`0 0 ${size} ${size}`} className="w-full h-auto max-w-[500px]" style={{ overflow: 'visible' }}>
|
<svg
|
||||||
|
viewBox={`0 0 ${size} ${size}`}
|
||||||
|
style={{ overflow: 'visible', width: '440px', height: '440px' }}
|
||||||
|
>
|
||||||
<defs>
|
<defs>
|
||||||
<radialGradient id="polyGradient" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
|
{/* 레이더 폴리곤 fill: radial gradient */}
|
||||||
<stop offset="0%" stopColor={accentColor} stopOpacity="0.3" />
|
<radialGradient id="radar-fill-gradient" cx="280" cy="280" r="160" fx="280" fy="280" gradientUnits="userSpaceOnUse">
|
||||||
<stop offset="100%" stopColor={accentColor} stopOpacity="0.05" />
|
<stop offset="60%" stopColor="#034245" stopOpacity="0" />
|
||||||
|
<stop offset="100%" stopColor="#94FBE0" stopOpacity="0.30" />
|
||||||
</radialGradient>
|
</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>
|
</defs>
|
||||||
|
|
||||||
{[1, 0.75, 0.5, 0.25].map((scale, i) => (
|
{/* 그리드 레벨 */}
|
||||||
|
{levelPolygons.map((points, i) => (
|
||||||
<polygon
|
<polygon
|
||||||
key={i}
|
key={`level-${i}`}
|
||||||
points={getPoints(radius * scale)}
|
points={points}
|
||||||
fill="none"
|
fill="none"
|
||||||
stroke={accentColor}
|
stroke="rgba(255,255,255,0.2)"
|
||||||
strokeOpacity={0.25 - (0.02 * i)}
|
|
||||||
strokeWidth="1"
|
strokeWidth="1"
|
||||||
strokeDasharray={i === 0 ? "0" : "4 2"}
|
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
{/* 축 선 */}
|
||||||
{data.map((_, i) => {
|
{data.map((_, i) => {
|
||||||
const angle = (Math.PI * 2 * i) / sides - Math.PI / 2;
|
const p = getPoint(i, maxRadius);
|
||||||
const x = center + radius * Math.cos(angle);
|
|
||||||
const y = center + radius * Math.sin(angle);
|
|
||||||
return (
|
return (
|
||||||
<line
|
<line
|
||||||
key={i}
|
key={`axis-${i}`}
|
||||||
x1={center}
|
x1={center}
|
||||||
y1={center}
|
y1={center}
|
||||||
x2={x}
|
x2={p.x}
|
||||||
y2={y}
|
y2={p.y}
|
||||||
stroke={accentColor}
|
stroke="rgba(255,255,255,0.2)"
|
||||||
strokeOpacity="0.25"
|
|
||||||
strokeWidth="1"
|
strokeWidth="1"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
||||||
|
{/* 데이터 폴리곤 */}
|
||||||
<polygon
|
<polygon
|
||||||
points={getDataPoints()}
|
points={dataPolygon}
|
||||||
fill="url(#polyGradient)"
|
fill="url(#radar-fill-gradient)"
|
||||||
stroke={accentColor}
|
stroke="var(--Color-mint-500, #94FBE0)"
|
||||||
strokeWidth="2.5"
|
strokeWidth="2"
|
||||||
strokeLinejoin="round"
|
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) => {
|
{data.map((item, i) => {
|
||||||
const normalizedScore = item.score / 100;
|
const angle = getAngle(i);
|
||||||
const r = radius * normalizedScore;
|
const pos = getPoint(i, labelRadius);
|
||||||
const angle = (Math.PI * 2 * i) / sides - Math.PI / 2;
|
const rank = rankMap.get(i) || i + 1;
|
||||||
const x = center + r * Math.cos(angle);
|
const isTopThree = rank <= 3;
|
||||||
const y = center + r * Math.sin(angle);
|
const isLeftSide = Math.cos(angle) < -0.1;
|
||||||
const isHigh = item.score >= 90;
|
const textX = isLeftSide ? -20 : 20;
|
||||||
return (
|
const textAnchor: 'start' | 'end' = isLeftSide ? 'end' : 'start';
|
||||||
<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>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
|
|
||||||
{labels.map((l, i) => {
|
|
||||||
const isHigh = l.score >= 90;
|
|
||||||
return (
|
return (
|
||||||
<g key={i}>
|
<g key={`label-${i}`}>
|
||||||
|
<g transform={`translate(${pos.x}, ${pos.y})`}>
|
||||||
|
{isLeftSide && (
|
||||||
<text
|
<text
|
||||||
x={l.x}
|
x={textX}
|
||||||
y={l.y - 7}
|
y="0"
|
||||||
textAnchor={l.anchor}
|
textAnchor={textAnchor}
|
||||||
fill={isHigh ? "#fff" : "#e2e8f0"}
|
dominantBaseline="central"
|
||||||
fontSize={isHigh ? "14" : "12"}
|
className="bi2-radar-label-text"
|
||||||
fontWeight={isHigh ? "700" : "600"}
|
style={{ fontSize: '20px', fontWeight: 600, fill: '#E5F1F2', fontFamily: 'Pretendard' }}
|
||||||
className="tracking-tight"
|
|
||||||
style={{ fontFamily: "sans-serif" }}
|
|
||||||
>
|
>
|
||||||
{l.text}
|
{item.korean_category}
|
||||||
</text>
|
</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
|
<text
|
||||||
x={l.x}
|
x="0" y="0"
|
||||||
y={l.y + 9}
|
textAnchor="middle"
|
||||||
textAnchor={l.anchor}
|
dominantBaseline="central"
|
||||||
fill={isHigh ? accentColor : "#94a3b8"}
|
style={{ fontSize: '16px', fontWeight: 600, fill: isTopThree ? '#002224' : '#94FBE0', fontFamily: 'Pretendard' }}
|
||||||
fontSize={isHigh ? "11" : "10"}
|
|
||||||
fontWeight={isHigh ? "600" : "400"}
|
|
||||||
className="uppercase tracking-wider"
|
|
||||||
>
|
>
|
||||||
{l.sub}
|
{rank}
|
||||||
</text>
|
</text>
|
||||||
</g>
|
</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>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { uploadImages } from '../../utils/api';
|
|||||||
|
|
||||||
interface AssetManagementContentProps {
|
interface AssetManagementContentProps {
|
||||||
onNext: (imageTaskId: string) => void;
|
onNext: (imageTaskId: string) => void;
|
||||||
|
onBack?: () => void;
|
||||||
imageList: ImageItem[];
|
imageList: ImageItem[];
|
||||||
onRemoveImage: (index: number) => void;
|
onRemoveImage: (index: number) => void;
|
||||||
onAddImages: (files: File[]) => void;
|
onAddImages: (files: File[]) => void;
|
||||||
@@ -13,20 +14,22 @@ interface AssetManagementContentProps {
|
|||||||
|
|
||||||
type VideoRatio = 'vertical' | 'horizontal';
|
type VideoRatio = 'vertical' | 'horizontal';
|
||||||
|
|
||||||
|
const IMAGES_PER_PAGE = 12;
|
||||||
|
|
||||||
const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
||||||
onNext,
|
onNext,
|
||||||
|
onBack,
|
||||||
imageList,
|
imageList,
|
||||||
onRemoveImage,
|
onRemoveImage,
|
||||||
onAddImages,
|
onAddImages,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||||
const imageListRef = useRef<HTMLDivElement>(null);
|
|
||||||
const [isUploading, setIsUploading] = useState(false);
|
const [isUploading, setIsUploading] = useState(false);
|
||||||
const [uploadError, setUploadError] = useState<string | null>(null);
|
const [uploadError, setUploadError] = useState<string | null>(null);
|
||||||
const [videoRatio, setVideoRatio] = useState<VideoRatio>('vertical');
|
const [videoRatio, setVideoRatio] = useState<VideoRatio>('vertical');
|
||||||
|
const [displayCount, setDisplayCount] = useState(IMAGES_PER_PAGE);
|
||||||
|
|
||||||
// Load video ratio from localStorage on mount
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const savedRatio = localStorage.getItem('castad_video_ratio') as VideoRatio;
|
const savedRatio = localStorage.getItem('castad_video_ratio') as VideoRatio;
|
||||||
if (savedRatio === 'vertical' || savedRatio === 'horizontal') {
|
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) => {
|
const handleVideoRatioChange = (ratio: VideoRatio) => {
|
||||||
setVideoRatio(ratio);
|
setVideoRatio(ratio);
|
||||||
localStorage.setItem('castad_video_ratio', ratio);
|
localStorage.setItem('castad_video_ratio', ratio);
|
||||||
@@ -51,7 +53,6 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
|||||||
setUploadError(null);
|
setUploadError(null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// URL 이미지와 파일 이미지 분리
|
|
||||||
const urlImages: ImageUrlItem[] = imageList
|
const urlImages: ImageUrlItem[] = imageList
|
||||||
.filter((item: ImageItem): item is ImageItem & { type: 'url' } => item.type === 'url')
|
.filter((item: ImageItem): item is ImageItem & { type: 'url' } => item.type === 'url')
|
||||||
.map((item) => ({ url: item.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')
|
.filter((item: ImageItem): item is ImageItem & { type: 'file' } => item.type === 'file')
|
||||||
.map((item) => item.file);
|
.map((item) => item.file);
|
||||||
|
|
||||||
// 이미지가 하나라도 있으면 업로드
|
|
||||||
if (urlImages.length > 0 || fileImages.length > 0) {
|
if (urlImages.length > 0 || fileImages.length > 0) {
|
||||||
const response = await uploadImages(urlImages, fileImages);
|
const response = await uploadImages(urlImages, fileImages);
|
||||||
onNext(response.task_id);
|
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) => {
|
const handleDragOver = (e: React.DragEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@@ -86,14 +81,10 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
|||||||
const handleDrop = (e: React.DragEvent) => {
|
const handleDrop = (e: React.DragEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
const files = Array.from(e.dataTransfer.files).filter((file: File) =>
|
||||||
const files = Array.from(e.dataTransfer.files).filter(file =>
|
|
||||||
file.type.startsWith('image/')
|
file.type.startsWith('image/')
|
||||||
);
|
);
|
||||||
|
if (files.length > 0) onAddImages(files);
|
||||||
if (files.length > 0) {
|
|
||||||
onAddImages(files);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFileSelect = () => {
|
const handleFileSelect = () => {
|
||||||
@@ -108,24 +99,48 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const visibleImages = imageList.slice(0, displayCount);
|
||||||
|
const hasMore = imageList.length > displayCount;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="page-container">
|
<main className="asset-page">
|
||||||
{/* Title */}
|
{/* 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>
|
||||||
|
|
||||||
|
{/* Single Scrollable Content Area */}
|
||||||
|
<div className="asset-scroll-area">
|
||||||
<h1 className="asset-title">{t('assetManagement.title')}</h1>
|
<h1 className="asset-title">{t('assetManagement.title')}</h1>
|
||||||
|
|
||||||
{/* Main Content Container */}
|
|
||||||
<div className="asset-container">
|
<div className="asset-container">
|
||||||
{/* Left Column - Selected Images */}
|
{/* Left Column - Selected Images */}
|
||||||
<div className="asset-column asset-column-left">
|
<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>
|
<h3 className="asset-section-title">{t('assetManagement.selectedImages')}</h3>
|
||||||
<div
|
<span className="asset-section-subtitle">{t('assetManagement.minImages')}</span>
|
||||||
ref={imageListRef}
|
</div>
|
||||||
onWheel={handleImageListWheel}
|
<button onClick={handleFileSelect} className="asset-mobile-upload-btn">
|
||||||
className="asset-image-list"
|
<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"/>
|
||||||
{imageList.length > 0 ? (
|
<line x1="2" y1="8" x2="14" y2="8" stroke="currentColor" strokeWidth="2" strokeLinecap="round"/>
|
||||||
|
</svg>
|
||||||
|
{t('assetManagement.imageUpload')}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="asset-image-list">
|
||||||
|
{visibleImages.length > 0 && (
|
||||||
<div className="asset-image-grid">
|
<div className="asset-image-grid">
|
||||||
{imageList.map((item, i) => (
|
{visibleImages.map((item, i) => (
|
||||||
<div key={i} className="asset-image-item">
|
<div key={i} className="asset-image-item">
|
||||||
<img
|
<img
|
||||||
src={getImageSrc(item)}
|
src={getImageSrc(item)}
|
||||||
@@ -146,13 +161,22 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{hasMore && (
|
||||||
|
<button
|
||||||
|
className="asset-load-more"
|
||||||
|
onClick={() => setDisplayCount(prev => prev + IMAGES_PER_PAGE)}
|
||||||
|
>
|
||||||
|
{t('assetManagement.loadMore')}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Right Column - Upload and Video Ratio */}
|
{/* Right Column - Upload and Video Ratio */}
|
||||||
<div className="asset-column asset-column-right">
|
<div className="asset-column asset-column-right">
|
||||||
{/* Image Upload Section */}
|
{/* Image Upload Section (desktop only) */}
|
||||||
<div className="asset-upload-section">
|
<div className="asset-upload-section">
|
||||||
<h3 className="asset-section-title">{t('assetManagement.imageUpload')}</h3>
|
<h3 className="asset-section-title">{t('assetManagement.imageUpload')}</h3>
|
||||||
<div
|
<div
|
||||||
@@ -167,14 +191,6 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
|||||||
))}
|
))}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<input
|
|
||||||
ref={fileInputRef}
|
|
||||||
type="file"
|
|
||||||
accept="image/*"
|
|
||||||
multiple
|
|
||||||
onChange={handleFileChange}
|
|
||||||
className="hidden"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Video Ratio Section */}
|
{/* Video Ratio Section */}
|
||||||
@@ -188,7 +204,8 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
|||||||
<div className="asset-ratio-icon asset-ratio-icon-vertical">
|
<div className="asset-ratio-icon asset-ratio-icon-vertical">
|
||||||
<div className="asset-ratio-box"></div>
|
<div className="asset-ratio-box"></div>
|
||||||
</div>
|
</div>
|
||||||
<span>9:16</span>
|
<span className="asset-ratio-label">9:16</span>
|
||||||
|
<span className="asset-ratio-subtitle">{t('assetManagement.youtubeShorts')}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => handleVideoRatioChange('horizontal')}
|
onClick={() => handleVideoRatioChange('horizontal')}
|
||||||
@@ -197,15 +214,17 @@ const AssetManagementContent: React.FC<AssetManagementContentProps> = ({
|
|||||||
<div className="asset-ratio-icon asset-ratio-icon-horizontal">
|
<div className="asset-ratio-icon asset-ratio-icon-horizontal">
|
||||||
<div className="asset-ratio-box"></div>
|
<div className="asset-ratio-box"></div>
|
||||||
</div>
|
</div>
|
||||||
<span>16:9</span>
|
<span className="asset-ratio-label">16:9</span>
|
||||||
|
<span className="asset-ratio-subtitle">{t('assetManagement.youtubeVideo')}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Bottom Button */}
|
{/* Fixed Footer - 다음 단계 버튼 */}
|
||||||
<div className="asset-bottom">
|
<div className="asset-sticky-footer">
|
||||||
{uploadError && (
|
{uploadError && (
|
||||||
<p className="text-red-500 text-sm mb-2">{uploadError}</p>
|
<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')}
|
{isUploading ? t('assetManagement.uploading') : t('assetManagement.nextStep')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<input
|
||||||
|
ref={fileInputRef}
|
||||||
|
type="file"
|
||||||
|
accept="image/*"
|
||||||
|
multiple
|
||||||
|
onChange={handleFileChange}
|
||||||
|
className="hidden"
|
||||||
|
/>
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ import React, { useState, useEffect, useRef } from 'react';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { generateVideo, waitForVideoComplete } from '../../utils/api';
|
import { generateVideo, waitForVideoComplete } from '../../utils/api';
|
||||||
import SocialPostingModal from '../../components/SocialPostingModal';
|
import SocialPostingModal from '../../components/SocialPostingModal';
|
||||||
|
import { useTutorial } from '../../components/Tutorial/useTutorial';
|
||||||
|
import { TUTORIAL_KEYS } from '../../components/Tutorial/tutorialSteps';
|
||||||
|
import TutorialOverlay from '../../components/Tutorial/TutorialOverlay';
|
||||||
|
|
||||||
interface CompletionContentProps {
|
interface CompletionContentProps {
|
||||||
onBack: () => void;
|
onBack: () => void;
|
||||||
@@ -37,12 +40,21 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
|||||||
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
||||||
const [statusMessage, setStatusMessage] = useState('');
|
const [statusMessage, setStatusMessage] = useState('');
|
||||||
const [renderProgress, setRenderProgress] = useState(0);
|
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 hasStartedGeneration = useRef(false);
|
||||||
const hideControlsTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
||||||
|
const tutorial = useTutorial();
|
||||||
|
|
||||||
|
// 영상 생성 중 튜토리얼 트리거 (생성 상태 안내 -> 콘텐츠 정보 -> 내 정보 이동)
|
||||||
|
useEffect(() => {
|
||||||
|
const isComplete = videoStatus === 'complete';
|
||||||
|
const isProcessing = videoStatus === 'generating' || videoStatus === 'polling';
|
||||||
|
|
||||||
|
if (isProcessing && !tutorial.isActive && !tutorial.hasSeen(TUTORIAL_KEYS.GENERATING)) {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.GENERATING);
|
||||||
|
} else if (isComplete && !tutorial.isActive && !tutorial.hasSeen(TUTORIAL_KEYS.COMPLETION)) {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.COMPLETION);
|
||||||
|
}
|
||||||
|
}, [videoStatus, tutorial]);
|
||||||
|
|
||||||
// 소셜 미디어 포스팅 모달
|
// 소셜 미디어 포스팅 모달
|
||||||
const [showSocialModal, setShowSocialModal] = useState(false);
|
const [showSocialModal, setShowSocialModal] = useState(false);
|
||||||
@@ -284,62 +296,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 = () => {
|
const handleDownload = () => {
|
||||||
if (videoUrl) {
|
if (videoUrl) {
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a');
|
||||||
@@ -374,7 +330,7 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
|||||||
// 비디오 해상도 계산
|
// 비디오 해상도 계산
|
||||||
const getVideoResolution = () => {
|
const getVideoResolution = () => {
|
||||||
const savedRatio = localStorage.getItem('castad_video_ratio');
|
const savedRatio = localStorage.getItem('castad_video_ratio');
|
||||||
return savedRatio === 'horizontal' ? '1234×720' : '720×1234';
|
return savedRatio === 'horizontal' ? '1280×720' : '720×1280';
|
||||||
};
|
};
|
||||||
|
|
||||||
// 파일명 생성
|
// 파일명 생성
|
||||||
@@ -403,7 +359,7 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
|||||||
<div className="comp2-grid">
|
<div className="comp2-grid">
|
||||||
{/* 왼쪽: 영상 */}
|
{/* 왼쪽: 영상 */}
|
||||||
<div className="comp2-video-section">
|
<div className="comp2-video-section">
|
||||||
<div className="comp2-video-wrapper" onMouseEnter={handleVideoMouseEnter} onMouseMove={handleVideoMouseMove} onMouseLeave={handleVideoMouseLeave}>
|
<div className="comp2-video-wrapper">
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
<div className="comp2-video-loading">
|
<div className="comp2-video-loading">
|
||||||
<div className="loading-spinner">
|
<div className="loading-spinner">
|
||||||
@@ -426,47 +382,12 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
) : videoUrl ? (
|
) : videoUrl ? (
|
||||||
<>
|
|
||||||
<video
|
<video
|
||||||
ref={videoRef}
|
|
||||||
src={videoUrl}
|
src={videoUrl}
|
||||||
className="comp2-video-player"
|
className="comp2-video-player"
|
||||||
onTimeUpdate={handleTimeUpdate}
|
controls
|
||||||
onEnded={handleVideoEnded}
|
playsInline
|
||||||
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>
|
|
||||||
</>
|
|
||||||
) : (
|
) : (
|
||||||
<div className="comp2-video-placeholder"></div>
|
<div className="comp2-video-placeholder"></div>
|
||||||
)}
|
)}
|
||||||
@@ -481,7 +402,7 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
|||||||
<div className="comp2-info-content">
|
<div className="comp2-info-content">
|
||||||
<div className="comp2-file-info">
|
<div className="comp2-file-info">
|
||||||
<h3 className="comp2-filename">{getFileName()}</h3>
|
<h3 className="comp2-filename">{getFileName()}</h3>
|
||||||
<p className="comp2-filesize">19.6MB</p>
|
{/* <p className="comp2-filesize">19.6MB</p> */}
|
||||||
</div>
|
</div>
|
||||||
<div className="comp2-meta-grid">
|
<div className="comp2-meta-grid">
|
||||||
<div className="comp2-meta-item">
|
<div className="comp2-meta-item">
|
||||||
@@ -534,6 +455,17 @@ const CompletionContent: React.FC<CompletionContentProps> = ({
|
|||||||
created_at: new Date().toISOString(),
|
created_at: new Date().toISOString(),
|
||||||
} : null}
|
} : null}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
{tutorial.isActive && (
|
||||||
|
<TutorialOverlay
|
||||||
|
hints={tutorial.hints}
|
||||||
|
currentIndex={tutorial.currentHintIndex}
|
||||||
|
onNext={tutorial.nextHint}
|
||||||
|
onPrev={tutorial.prevHint}
|
||||||
|
onSkip={tutorial.skipTutorial}
|
||||||
|
groupProgress={tutorial.groupProgress}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -643,7 +643,8 @@ const ContentCalendarContent: React.FC<ContentCalendarContentProps> = ({ onNavig
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
ref={panelRef}
|
ref={panelRef}
|
||||||
style={{ flex: 1, overflowY: 'auto', padding: '12px 16px', display: 'flex', flexDirection: 'column', gap: 20 }}
|
className="calendar-panel-scroll"
|
||||||
|
style={{ flex: 1, overflowY: 'auto', padding: '12px 16px', display: 'flex', flexDirection: 'column', gap: 20, maxHeight: 700 }}
|
||||||
>
|
>
|
||||||
{sortedDateKeys.map(dateKey => (
|
{sortedDateKeys.map(dateKey => (
|
||||||
<div
|
<div
|
||||||
@@ -735,7 +736,7 @@ const ContentCalendarContent: React.FC<ContentCalendarContentProps> = ({ onNavig
|
|||||||
return (
|
return (
|
||||||
<div style={{
|
<div style={{
|
||||||
display: 'flex', flexDirection: 'column', alignItems: 'center',
|
display: 'flex', flexDirection: 'column', alignItems: 'center',
|
||||||
padding: '80px 32px',
|
padding: '32px',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
minWidth: 1400,
|
minWidth: 1400,
|
||||||
height: '100%', boxSizing: 'border-box',
|
height: '100%', boxSizing: 'border-box',
|
||||||
@@ -757,7 +758,7 @@ const ContentCalendarContent: React.FC<ContentCalendarContentProps> = ({ onNavig
|
|||||||
flex: 1, minHeight: 0,
|
flex: 1, minHeight: 0,
|
||||||
}}>
|
}}>
|
||||||
{/* 캘린더 영역 */}
|
{/* 캘린더 영역 */}
|
||||||
<div style={{
|
<div className="calendar-grid-area" style={{
|
||||||
gridColumn: '1 / span 8',
|
gridColumn: '1 / span 8',
|
||||||
backgroundColor: '#01393b',
|
backgroundColor: '#01393b',
|
||||||
borderRadius: 20, padding: 16,
|
borderRadius: 20, padding: 16,
|
||||||
@@ -779,7 +780,7 @@ const ContentCalendarContent: React.FC<ContentCalendarContentProps> = ({ onNavig
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 오른쪽 패널 */}
|
{/* 오른쪽 패널 */}
|
||||||
<div style={{
|
<div className="calendar-side-panel" style={{
|
||||||
gridColumn: '9 / span 1',
|
gridColumn: '9 / span 1',
|
||||||
backgroundColor: '#01393b', borderRadius: 20,
|
backgroundColor: '#01393b', borderRadius: 20,
|
||||||
display: 'flex', flexDirection: 'column', overflow: 'hidden',
|
display: 'flex', flexDirection: 'column', overflow: 'hidden',
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import Sidebar from '../../components/Sidebar';
|
import Sidebar from '../../components/Sidebar';
|
||||||
import AssetManagementContent from './AssetManagementContent';
|
import AssetManagementContent from './AssetManagementContent';
|
||||||
@@ -15,6 +15,9 @@ import LoadingSection from '../Analysis/LoadingSection';
|
|||||||
import AnalysisResultSection from '../Analysis/AnalysisResultSection';
|
import AnalysisResultSection from '../Analysis/AnalysisResultSection';
|
||||||
import { ImageItem, CrawlingResponse, UserMeResponse } from '../../types/api';
|
import { ImageItem, CrawlingResponse, UserMeResponse } from '../../types/api';
|
||||||
import { crawlUrl, autocomplete, AutocompleteRequest, getUserMe, clearTokens } from '../../utils/api';
|
import { crawlUrl, autocomplete, AutocompleteRequest, getUserMe, clearTokens } from '../../utils/api';
|
||||||
|
import { useTutorial } from '../../components/Tutorial/useTutorial';
|
||||||
|
import { TUTORIAL_KEYS } from '../../components/Tutorial/tutorialSteps';
|
||||||
|
import TutorialOverlay, { TutorialRestartPopup } from '../../components/Tutorial/TutorialOverlay';
|
||||||
|
|
||||||
const WIZARD_STEP_KEY = 'castad_wizard_step';
|
const WIZARD_STEP_KEY = 'castad_wizard_step';
|
||||||
const ACTIVE_ITEM_KEY = 'castad_active_item';
|
const ACTIVE_ITEM_KEY = 'castad_active_item';
|
||||||
@@ -112,6 +115,7 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
|||||||
const [analysisData, setAnalysisData] = useState<CrawlingResponse | null>(parseAnalysisData());
|
const [analysisData, setAnalysisData] = useState<CrawlingResponse | null>(parseAnalysisData());
|
||||||
const [analysisError, setAnalysisError] = useState<string | null>(null);
|
const [analysisError, setAnalysisError] = useState<string | null>(null);
|
||||||
const [userInfo, setUserInfo] = useState<UserMeResponse | null>(null);
|
const [userInfo, setUserInfo] = useState<UserMeResponse | null>(null);
|
||||||
|
const tutorial = useTutorial();
|
||||||
|
|
||||||
// 로그인 직후 사용자 정보 조회
|
// 로그인 직후 사용자 정보 조회
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -148,13 +152,18 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const [imageList, setImageList] = useState<ImageItem[]>(getInitialImageList());
|
const [imageList, setImageList] = useState<ImageItem[]>(getInitialImageList());
|
||||||
|
const prevAnalysisMIdRef = useRef<number | null | undefined>(analysisData?.m_id);
|
||||||
|
|
||||||
// analysisData 변경 시 imageList 업데이트
|
// analysisData 변경 시 m_id가 바뀐 경우(새로운 분석)에만 imageList 업데이트
|
||||||
|
// m_id가 동일하면 언어 변경 등 기타 업데이트이므로 사용자가 수정한 이미지 목록 유지
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('[GenerationFlow] analysisData updated, m_id:', analysisData?.m_id);
|
console.log('[GenerationFlow] analysisData updated, m_id:', analysisData?.m_id);
|
||||||
if (analysisData?.image_list && analysisData.image_list.length > 0) {
|
if (analysisData?.image_list && analysisData.image_list.length > 0) {
|
||||||
|
if (prevAnalysisMIdRef.current !== analysisData.m_id) {
|
||||||
setImageList(analysisData.image_list.map(url => ({ type: 'url', url })));
|
setImageList(analysisData.image_list.map(url => ({ type: 'url', url })));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
prevAnalysisMIdRef.current = analysisData?.m_id;
|
||||||
}, [analysisData]);
|
}, [analysisData]);
|
||||||
|
|
||||||
const handleRemoveImage = (index: number) => {
|
const handleRemoveImage = (index: number) => {
|
||||||
@@ -311,6 +320,35 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
|||||||
localStorage.setItem(ACTIVE_ITEM_KEY, activeItem);
|
localStorage.setItem(ACTIVE_ITEM_KEY, activeItem);
|
||||||
}, [activeItem]);
|
}, [activeItem]);
|
||||||
|
|
||||||
|
// wizardStep 변경 시 튜토리얼 트리거 (사이드바 메뉴 화면에서는 제외)
|
||||||
|
const SIDEBAR_ITEMS = ['대시보드', 'ADO2 콘텐츠', '내 정보', '콘텐츠 캘린더'];
|
||||||
|
useEffect(() => {
|
||||||
|
if (tutorial.isActive) tutorial.skipTutorial();
|
||||||
|
if (SIDEBAR_ITEMS.includes(activeItem)) return;
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
if (wizardStep === 1 && !tutorial.hasSeen(TUTORIAL_KEYS.ASSET)) {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.ASSET);
|
||||||
|
} else if (wizardStep === 2 && !tutorial.hasSeen(TUTORIAL_KEYS.SOUND)) {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.SOUND);
|
||||||
|
}
|
||||||
|
}, 600);
|
||||||
|
return () => clearTimeout(timer);
|
||||||
|
}, [wizardStep, activeItem]);
|
||||||
|
|
||||||
|
// activeItem 변경 시 튜토리얼 트리거
|
||||||
|
useEffect(() => {
|
||||||
|
if (tutorial.isActive) tutorial.skipTutorial();
|
||||||
|
if (activeItem === '내 정보' && !tutorial.hasSeen(TUTORIAL_KEYS.MY_INFO)) {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.MY_INFO);
|
||||||
|
} else if (activeItem === 'ADO2 콘텐츠' && !tutorial.hasSeen(TUTORIAL_KEYS.ADO2_CONTENTS)) {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.ADO2_CONTENTS);
|
||||||
|
} else if (activeItem === '대시보드' && !tutorial.hasSeen(TUTORIAL_KEYS.DASHBOARD)) {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.DASHBOARD);
|
||||||
|
} else if (activeItem === '콘텐츠 캘린더' && !tutorial.hasSeen(TUTORIAL_KEYS.CONTENT_CALENDAR)) {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.CONTENT_CALENDAR);
|
||||||
|
}
|
||||||
|
}, [activeItem]);
|
||||||
|
|
||||||
// 네비게이션 핸들러 - "새 프로젝트 만들기" 클릭 시 기존 프로젝트 데이터 초기화
|
// 네비게이션 핸들러 - "새 프로젝트 만들기" 클릭 시 기존 프로젝트 데이터 초기화
|
||||||
const handleNavigate = (item: string) => {
|
const handleNavigate = (item: string) => {
|
||||||
if (item === '새 프로젝트 만들기') {
|
if (item === '새 프로젝트 만들기') {
|
||||||
@@ -363,6 +401,7 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
|||||||
case 1:
|
case 1:
|
||||||
return (
|
return (
|
||||||
<AssetManagementContent
|
<AssetManagementContent
|
||||||
|
onBack={() => goToWizardStep(0)}
|
||||||
onNext={(taskId: string) => {
|
onNext={(taskId: string) => {
|
||||||
// Clear video generation state to start fresh
|
// Clear video generation state to start fresh
|
||||||
localStorage.removeItem(VIDEO_GENERATION_KEY);
|
localStorage.removeItem(VIDEO_GENERATION_KEY);
|
||||||
@@ -393,6 +432,13 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
|||||||
mId={analysisData?.m_id ?? 0}
|
mId={analysisData?.m_id ?? 0}
|
||||||
videoGenerationStatus={videoGenerationStatus}
|
videoGenerationStatus={videoGenerationStatus}
|
||||||
videoGenerationProgress={videoGenerationProgress}
|
videoGenerationProgress={videoGenerationProgress}
|
||||||
|
onStatusChange={(status: string) => {
|
||||||
|
if (status === 'generating_song' && !tutorial.hasSeen(TUTORIAL_KEYS.SOUND_LYRICS)) {
|
||||||
|
setTimeout(() => tutorial.startTutorial(TUTORIAL_KEYS.SOUND_LYRICS), 400);
|
||||||
|
} else if (status === 'complete' && !tutorial.hasSeen(TUTORIAL_KEYS.SOUND_AUDIO)) {
|
||||||
|
setTimeout(() => tutorial.startTutorial(TUTORIAL_KEYS.SOUND_AUDIO), 400);
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
case 3:
|
case 3:
|
||||||
@@ -420,7 +466,7 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
|||||||
const renderContent = () => {
|
const renderContent = () => {
|
||||||
switch (activeItem) {
|
switch (activeItem) {
|
||||||
case '대시보드':
|
case '대시보드':
|
||||||
return <DashboardContent />;
|
return <DashboardContent onNavigate={handleNavigate} />;
|
||||||
case '비즈니스 설정':
|
case '비즈니스 설정':
|
||||||
return <BusinessSettingsContent />;
|
return <BusinessSettingsContent />;
|
||||||
case 'ADO2 콘텐츠':
|
case 'ADO2 콘텐츠':
|
||||||
@@ -460,6 +506,57 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
|||||||
// 스크롤이 필요한 페이지: 대시보드, 비즈니스 설정, 브랜드 분석(0), ADO2 콘텐츠, 내 정보
|
// 스크롤이 필요한 페이지: 대시보드, 비즈니스 설정, 브랜드 분석(0), ADO2 콘텐츠, 내 정보
|
||||||
const needsScroll = activeItem === '대시보드' || activeItem === '비즈니스 설정' || activeItem === 'ADO2 콘텐츠' || activeItem === '내 정보' || activeItem === '콘텐츠 캘린더' || isBrandAnalysis;
|
const needsScroll = activeItem === '대시보드' || activeItem === '비즈니스 설정' || activeItem === 'ADO2 콘텐츠' || activeItem === '내 정보' || activeItem === '콘텐츠 캘린더' || isBrandAnalysis;
|
||||||
|
|
||||||
|
// 현재 화면에 맞는 튜토리얼 키 반환 (없으면 null)
|
||||||
|
const getCurrentTutorialKey = (): string | null => {
|
||||||
|
if (activeItem === '내 정보') return TUTORIAL_KEYS.MY_INFO;
|
||||||
|
if (activeItem === 'ADO2 콘텐츠') return TUTORIAL_KEYS.ADO2_CONTENTS;
|
||||||
|
if (activeItem === '대시보드') return TUTORIAL_KEYS.DASHBOARD;
|
||||||
|
if (activeItem === '콘텐츠 캘린더') return TUTORIAL_KEYS.CONTENT_CALENDAR;
|
||||||
|
if (activeItem === '새 프로젝트 만들기') {
|
||||||
|
if (wizardStep === 1) return TUTORIAL_KEYS.ASSET;
|
||||||
|
if (wizardStep === 2) return TUTORIAL_KEYS.SOUND;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleTutorialRestart = () => {
|
||||||
|
tutorial.showRestartPopup(getCurrentTutorialKey()!);
|
||||||
|
};
|
||||||
|
|
||||||
|
const tutorialUI = (
|
||||||
|
<>
|
||||||
|
{getCurrentTutorialKey() && (
|
||||||
|
<button
|
||||||
|
className="tutorial-restart-fab"
|
||||||
|
onClick={handleTutorialRestart}
|
||||||
|
title={t('sidebar.tutorialRestart')}
|
||||||
|
>
|
||||||
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
||||||
|
<circle cx="12" cy="12" r="10"/>
|
||||||
|
<path d="M12 8v4l3 3"/>
|
||||||
|
</svg>
|
||||||
|
<span>{t('sidebar.tutorialRestart')}</span>
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
{tutorial.isActive && (
|
||||||
|
<TutorialOverlay
|
||||||
|
hints={tutorial.hints}
|
||||||
|
currentIndex={tutorial.currentHintIndex}
|
||||||
|
onNext={tutorial.nextHint}
|
||||||
|
onPrev={tutorial.prevHint}
|
||||||
|
onSkip={tutorial.skipTutorial}
|
||||||
|
groupProgress={tutorial.groupProgress}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{tutorial.isRestartPopupVisible && (
|
||||||
|
<TutorialRestartPopup
|
||||||
|
onConfirm={tutorial.confirmRestart}
|
||||||
|
onCancel={tutorial.cancelRestart}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
|
||||||
// 브랜드 분석일 때는 전체 화면 스크롤
|
// 브랜드 분석일 때는 전체 화면 스크롤
|
||||||
if (isBrandAnalysis) {
|
if (isBrandAnalysis) {
|
||||||
return (
|
return (
|
||||||
@@ -470,6 +567,7 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
|||||||
<main className="analysis-page-main">
|
<main className="analysis-page-main">
|
||||||
{renderContent()}
|
{renderContent()}
|
||||||
</main>
|
</main>
|
||||||
|
{tutorialUI}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -479,6 +577,7 @@ const GenerationFlow: React.FC<GenerationFlowProps> = ({
|
|||||||
{showSidebar && (
|
{showSidebar && (
|
||||||
<Sidebar activeItem={activeItem} onNavigate={handleNavigate} onHome={handleHome} userInfo={userInfo} onLogout={handleLogout} />
|
<Sidebar activeItem={activeItem} onNavigate={handleNavigate} onHome={handleHome} userInfo={userInfo} onLogout={handleLogout} />
|
||||||
)}
|
)}
|
||||||
|
{tutorialUI}
|
||||||
<div className={`flex-1 relative pl-0 md:pl-0 ${needsScroll ? 'overflow-auto' : 'h-full overflow-hidden'}`}>
|
<div className={`flex-1 relative pl-0 md:pl-0 ${needsScroll ? 'overflow-auto' : 'h-full overflow-hidden'}`}>
|
||||||
{renderContent()}
|
{renderContent()}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ interface SoundStudioContentProps {
|
|||||||
businessInfo?: BusinessInfo;
|
businessInfo?: BusinessInfo;
|
||||||
imageTaskId: string | null;
|
imageTaskId: string | null;
|
||||||
mId: number;
|
mId: number;
|
||||||
|
onStatusChange?: (status: string) => void;
|
||||||
videoGenerationStatus?: 'idle' | 'generating' | 'complete' | 'error';
|
videoGenerationStatus?: 'idle' | 'generating' | 'complete' | 'error';
|
||||||
videoGenerationProgress?: number;
|
videoGenerationProgress?: number;
|
||||||
}
|
}
|
||||||
@@ -39,6 +40,7 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
|||||||
businessInfo,
|
businessInfo,
|
||||||
imageTaskId,
|
imageTaskId,
|
||||||
mId,
|
mId,
|
||||||
|
onStatusChange,
|
||||||
videoGenerationStatus = 'idle',
|
videoGenerationStatus = 'idle',
|
||||||
videoGenerationProgress = 0
|
videoGenerationProgress = 0
|
||||||
}) => {
|
}) => {
|
||||||
@@ -286,6 +288,9 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
|||||||
setErrorMessage(null);
|
setErrorMessage(null);
|
||||||
setStatusMessage(t('soundStudio.generatingLyrics'));
|
setStatusMessage(t('soundStudio.generatingLyrics'));
|
||||||
|
|
||||||
|
const savedRatio = localStorage.getItem('castad_video_ratio');
|
||||||
|
const orientation = (savedRatio === 'horizontal' || savedRatio === 'vertical') ? savedRatio : 'vertical';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const language = LANGUAGE_MAP[selectedLang] || 'Korean';
|
const language = LANGUAGE_MAP[selectedLang] || 'Korean';
|
||||||
|
|
||||||
@@ -298,6 +303,7 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
|||||||
m_id: mId,
|
m_id: mId,
|
||||||
region: businessInfo.region,
|
region: businessInfo.region,
|
||||||
task_id: imageTaskId,
|
task_id: imageTaskId,
|
||||||
|
orientation,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!lyricResponse.success || !lyricResponse.task_id) {
|
if (!lyricResponse.success || !lyricResponse.task_id) {
|
||||||
@@ -385,8 +391,14 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
|||||||
|
|
||||||
const isGenerating = status === 'generating_lyric' || status === 'generating_song' || status === 'polling';
|
const isGenerating = status === 'generating_lyric' || status === 'generating_song' || status === 'polling';
|
||||||
|
|
||||||
|
// status 변경 시 부모에 알림
|
||||||
|
useEffect(() => {
|
||||||
|
onStatusChange?.(status);
|
||||||
|
}, [status]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="page-container">
|
<>
|
||||||
|
<main className="sound-studio-page">
|
||||||
{audioUrl && (
|
{audioUrl && (
|
||||||
<audio ref={audioRef} src={audioUrl} preload="metadata" />
|
<audio ref={audioRef} src={audioUrl} preload="metadata" />
|
||||||
)}
|
)}
|
||||||
@@ -517,6 +529,31 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</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>
|
</div>
|
||||||
|
|
||||||
{/* Right Column - Lyrics */}
|
{/* Right Column - Lyrics */}
|
||||||
@@ -578,41 +615,6 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Generate Button */}
|
|
||||||
<button
|
|
||||||
onClick={handleGenerateMusic}
|
|
||||||
disabled={isGenerating}
|
|
||||||
className={`btn-generate-sound ${isGenerating ? 'disabled' : ''}`}
|
|
||||||
>
|
|
||||||
{isGenerating ? (
|
|
||||||
<>
|
|
||||||
<svg className="animate-spin h-4 w-4" viewBox="0 0 24 24">
|
|
||||||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" fill="none"/>
|
|
||||||
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"/>
|
|
||||||
</svg>
|
|
||||||
{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>
|
</div>
|
||||||
|
|
||||||
{/* Bottom Button */}
|
{/* Bottom Button */}
|
||||||
@@ -649,7 +651,10 @@ const SoundStudioContent: React.FC<SoundStudioContentProps> = ({
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SoundStudioContent;
|
export default SoundStudioContent;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ interface UrlInputContentProps {
|
|||||||
const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomplete, onTestData, error }) => {
|
const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomplete, onTestData, error }) => {
|
||||||
const { t, i18n } = useTranslation();
|
const { t, i18n } = useTranslation();
|
||||||
const [inputValue, setInputValue] = useState('');
|
const [inputValue, setInputValue] = useState('');
|
||||||
const [searchType, setSearchType] = useState<SearchType>('url');
|
const [searchType, setSearchType] = useState<SearchType>('name');
|
||||||
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
||||||
const [autocompleteResults, setAutocompleteResults] = useState<AccommodationSearchItem[]>([]);
|
const [autocompleteResults, setAutocompleteResults] = useState<AccommodationSearchItem[]>([]);
|
||||||
const [isAutocompleteLoading, setIsAutocompleteLoading] = useState(false);
|
const [isAutocompleteLoading, setIsAutocompleteLoading] = useState(false);
|
||||||
@@ -53,7 +53,7 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
|||||||
|
|
||||||
const getPlaceholder = () => {
|
const getPlaceholder = () => {
|
||||||
return searchType === 'url'
|
return searchType === 'url'
|
||||||
? 'https://www.castad.com'
|
? 'https://naver.me/abcdef'
|
||||||
: t('urlInput.placeholderBusinessName');
|
: t('urlInput.placeholderBusinessName');
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -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) => {
|
const handleSubmit = (e: React.FormEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -196,10 +207,19 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
|||||||
{/* 입력 필드 */}
|
{/* 입력 필드 */}
|
||||||
<div className="url-input-field-container" ref={autocompleteRef}>
|
<div className="url-input-field-container" ref={autocompleteRef}>
|
||||||
<input
|
<input
|
||||||
type={searchType === 'url' ? 'url' : 'text'}
|
type="text"
|
||||||
value={inputValue}
|
value={inputValue}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
let value = e.target.value;
|
||||||
|
|
||||||
|
// URL 모드일 때 URL만 추출 (예: "[네이버 지도] https://...")
|
||||||
|
if (searchType === 'url') {
|
||||||
|
const urlMatch = value.match(/https?:\/\/\S+/);
|
||||||
|
if (urlMatch && urlMatch[0] !== value) {
|
||||||
|
value = urlMatch[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setInputValue(value);
|
setInputValue(value);
|
||||||
|
|
||||||
// 업체명 검색일 때 자동완성 검색 (디바운스)
|
// 업체명 검색일 때 자동완성 검색 (디바운스)
|
||||||
@@ -212,6 +232,7 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
|||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
onPaste={handlePaste}
|
||||||
onFocus={() => {
|
onFocus={() => {
|
||||||
if (searchType === 'name' && autocompleteResults.length > 0) {
|
if (searchType === 'name' && autocompleteResults.length > 0) {
|
||||||
setShowAutocomplete(true);
|
setShowAutocomplete(true);
|
||||||
@@ -245,23 +266,23 @@ const UrlInputContent: React.FC<UrlInputContentProps> = ({ onAnalyze, onAutocomp
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 검색 버튼 */}
|
|
||||||
<button type="submit" className="url-input-button">
|
|
||||||
{t('urlInput.searchButton')}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 에러 메시지 */}
|
|
||||||
{error && (
|
|
||||||
<p className="url-input-error">{error}</p>
|
|
||||||
)}
|
|
||||||
</form>
|
|
||||||
|
|
||||||
{/* 안내 텍스트 */}
|
{/* 안내 텍스트 */}
|
||||||
<p className="url-input-guide">
|
<p className="url-input-guide">
|
||||||
{getGuideText()}
|
{getGuideText()}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
{/* 에러 메시지 */}
|
||||||
|
{error && (
|
||||||
|
<p className="url-input-error">{error}</p>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* 검색 버튼 */}
|
||||||
|
<button type="submit" className="url-input-button">
|
||||||
|
{t('landing.hero.analyzeButton')}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 테스트 버튼 (VITE_IS_TESTPAGE=true일 때만 표시) */}
|
{/* 테스트 버튼 (VITE_IS_TESTPAGE=true일 때만 표시) */}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ import React, { useState, useEffect, useRef, useCallback } from 'react';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { searchAccommodation, AccommodationSearchItem, AutocompleteRequest } from '../../utils/api';
|
import { searchAccommodation, AccommodationSearchItem, AutocompleteRequest } from '../../utils/api';
|
||||||
import { CrawlingResponse } from '../../types/api';
|
import { CrawlingResponse } from '../../types/api';
|
||||||
|
import { useTutorial } from '../../components/Tutorial/useTutorial';
|
||||||
|
import { TUTORIAL_KEYS } from '../../components/Tutorial/tutorialSteps';
|
||||||
|
import TutorialOverlay from '../../components/Tutorial/TutorialOverlay';
|
||||||
|
|
||||||
type SearchType = 'url' | 'name';
|
type SearchType = 'url' | 'name';
|
||||||
|
|
||||||
@@ -60,7 +63,7 @@ const orbConfigs: OrbConfig[] = [
|
|||||||
const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, onTestData, onNext, error: externalError, scrollProgress = 0 }) => {
|
const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, onTestData, onNext, error: externalError, scrollProgress = 0 }) => {
|
||||||
const { t, i18n } = useTranslation();
|
const { t, i18n } = useTranslation();
|
||||||
const [inputValue, setInputValue] = useState('');
|
const [inputValue, setInputValue] = useState('');
|
||||||
const [searchType, setSearchType] = useState<SearchType>('url');
|
const [searchType, setSearchType] = useState<SearchType>('name');
|
||||||
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
||||||
const [localError, setLocalError] = useState('');
|
const [localError, setLocalError] = useState('');
|
||||||
const [isLoadingTest, setIsLoadingTest] = useState(false);
|
const [isLoadingTest, setIsLoadingTest] = useState(false);
|
||||||
@@ -92,6 +95,17 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
|
|||||||
const dropdownRef = useRef<HTMLDivElement>(null);
|
const dropdownRef = useRef<HTMLDivElement>(null);
|
||||||
const autocompleteRef = useRef<HTMLDivElement>(null);
|
const autocompleteRef = useRef<HTMLDivElement>(null);
|
||||||
const debounceRef = useRef<NodeJS.Timeout | null>(null);
|
const debounceRef = useRef<NodeJS.Timeout | null>(null);
|
||||||
|
const tutorial = useTutorial();
|
||||||
|
|
||||||
|
// 첫 방문 시 랜딩 튜토리얼 시작
|
||||||
|
useEffect(() => {
|
||||||
|
if (!tutorial.hasSeen(TUTORIAL_KEYS.LANDING)) {
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
tutorial.startTutorial(TUTORIAL_KEYS.LANDING);
|
||||||
|
}, 800);
|
||||||
|
return () => clearTimeout(timer);
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
const searchTypeOptions = [
|
const searchTypeOptions = [
|
||||||
{ value: 'url' as SearchType, label: 'URL' },
|
{ value: 'url' as SearchType, label: 'URL' },
|
||||||
@@ -141,6 +155,10 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
|
|||||||
setShowAutocomplete(false);
|
setShowAutocomplete(false);
|
||||||
setAutocompleteResults([]);
|
setAutocompleteResults([]);
|
||||||
setHighlightedIndex(-1);
|
setHighlightedIndex(-1);
|
||||||
|
// LANDING_NAME 튜토리얼 진행 중이면 다음 힌트로 이동
|
||||||
|
if (tutorial.isActive && tutorial.tutorialKey === TUTORIAL_KEYS.LANDING_NAME) {
|
||||||
|
tutorial.nextHint();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 키보드 네비게이션 핸들러
|
// 키보드 네비게이션 핸들러
|
||||||
@@ -260,7 +278,7 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
|
|||||||
|
|
||||||
const getPlaceholder = () => {
|
const getPlaceholder = () => {
|
||||||
return searchType === 'url'
|
return searchType === 'url'
|
||||||
? 'https://www.castad.com'
|
? 'https://naver.me/abcdef'
|
||||||
: t('landing.hero.placeholderBusinessName');
|
: t('landing.hero.placeholderBusinessName');
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -376,7 +394,16 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
|
|||||||
type="text"
|
type="text"
|
||||||
value={inputValue}
|
value={inputValue}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const value = e.target.value;
|
let value = e.target.value;
|
||||||
|
|
||||||
|
// URL 모드일 때 URL만 추출 (예: "[네이버 지도] https://...")
|
||||||
|
if (searchType === 'url') {
|
||||||
|
const urlMatch = value.match(/https?:\/\/\S+/);
|
||||||
|
if (urlMatch && urlMatch[0] !== value) {
|
||||||
|
value = urlMatch[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
setInputValue(value);
|
setInputValue(value);
|
||||||
setHighlightedIndex(-1); // 입력 시 하이라이트 초기화
|
setHighlightedIndex(-1); // 입력 시 하이라이트 초기화
|
||||||
if (localError) setLocalError('');
|
if (localError) setLocalError('');
|
||||||
@@ -391,6 +418,16 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
|
|||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
onPaste={(e: React.ClipboardEvent<HTMLInputElement>) => {
|
||||||
|
if (searchType !== 'url') return;
|
||||||
|
const pasted = e.clipboardData.getData('text');
|
||||||
|
const urlMatch = pasted.match(/https?:\/\/[^\s]+/);
|
||||||
|
if (urlMatch) {
|
||||||
|
e.preventDefault();
|
||||||
|
setInputValue(urlMatch[0]);
|
||||||
|
if (localError) setLocalError('');
|
||||||
|
}
|
||||||
|
}}
|
||||||
onFocus={() => {
|
onFocus={() => {
|
||||||
setIsFocused(true);
|
setIsFocused(true);
|
||||||
if (searchType === 'name' && autocompleteResults.length > 0) {
|
if (searchType === 'name' && autocompleteResults.length > 0) {
|
||||||
@@ -483,6 +520,17 @@ const HeroSection: React.FC<HeroSectionProps> = ({ onAnalyze, onAutocomplete, on
|
|||||||
{isLoadingTest ? t('landing.hero.testDataLoading') : t('landing.hero.testData')}
|
{isLoadingTest ? t('landing.hero.testDataLoading') : t('landing.hero.testData')}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{tutorial.isActive && (
|
||||||
|
<TutorialOverlay
|
||||||
|
hints={tutorial.hints}
|
||||||
|
currentIndex={tutorial.currentHintIndex}
|
||||||
|
onNext={tutorial.nextHint}
|
||||||
|
onPrev={tutorial.prevHint}
|
||||||
|
onSkip={tutorial.skipTutorial}
|
||||||
|
groupProgress={tutorial.groupProgress}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ export interface LyricGenerateRequest {
|
|||||||
m_id: number;
|
m_id: number;
|
||||||
region: string;
|
region: string;
|
||||||
task_id: string;
|
task_id: string;
|
||||||
|
orientation?: 'vertical' | 'horizontal';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 가사 생성 응답
|
// 가사 생성 응답
|
||||||
|
|||||||
+20
-6
@@ -30,7 +30,7 @@ import {
|
|||||||
YTAutoSeoResponse,
|
YTAutoSeoResponse,
|
||||||
} from '../types/api';
|
} from '../types/api';
|
||||||
|
|
||||||
const API_URL = import.meta.env.VITE_API_URL || 'http://40.82.133.44';
|
export const API_URL = import.meta.env.VITE_API_URL || 'http://40.82.133.44';
|
||||||
console.log('[API] API_URL:', API_URL);
|
console.log('[API] API_URL:', API_URL);
|
||||||
console.log('[API] VITE_API_URL env:', import.meta.env.VITE_API_URL);
|
console.log('[API] VITE_API_URL env:', import.meta.env.VITE_API_URL);
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ function redirectToLogin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 401 에러 시 자동으로 토큰 갱신 후 재요청하는 래퍼 함수
|
// 401 에러 시 자동으로 토큰 갱신 후 재요청하는 래퍼 함수
|
||||||
async function authenticatedFetch(
|
export async function authenticatedFetch(
|
||||||
url: string,
|
url: string,
|
||||||
options: RequestInit = {}
|
options: RequestInit = {}
|
||||||
): Promise<Response> {
|
): Promise<Response> {
|
||||||
@@ -596,14 +596,28 @@ export async function refreshAccessToken(): Promise<TokenRefreshResponse> {
|
|||||||
return data;
|
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> {
|
export async function logout(): Promise<void> {
|
||||||
const response = await authenticatedFetch(`${API_URL}/user/auth/logout`, {
|
const response = await authenticatedFetch(`${API_URL}/user/auth/logout`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
});
|
});
|
||||||
|
|
||||||
// 응답과 관계없이 로컬 토큰 삭제
|
// 응답과 관계없이 로컬 데이터 전체 삭제
|
||||||
clearTokens();
|
clearAllLocalData();
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
@@ -616,8 +630,8 @@ export async function logoutAll(): Promise<void> {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
});
|
});
|
||||||
|
|
||||||
// 응답과 관계없이 로컬 토큰 삭제
|
// 응답과 관계없이 로컬 데이터 전체 삭제
|
||||||
clearTokens();
|
clearAllLocalData();
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
<div class="toast" id="toast"></div>
|
<div class="toast" id="toast"></div>
|
||||||
|
|
||||||
<script>
|
<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
|
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