From 2cfad1a79655ac0e1403b014388ef13d8509440c Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 28 Sep 2024 10:08:14 +0300 Subject: [PATCH 01/10] OV-456: * styles --- .../src/bundles/home/components/video-card/video-card.tsx | 2 +- .../bundles/home/components/video-section/video-section.tsx | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/bundles/home/components/video-card/video-card.tsx b/frontend/src/bundles/home/components/video-card/video-card.tsx index 3d3272ed7..08933d86d 100644 --- a/frontend/src/bundles/home/components/video-card/video-card.tsx +++ b/frontend/src/bundles/home/components/video-card/video-card.tsx @@ -115,7 +115,7 @@ const VideoCard: React.FC = ({ }, [dispatch, id]); return ( - + = ({ videos, title }) => { ))} ) : ( - + {videos.map(({ id, ...video }) => ( ))} From 8c1eb99f6f089f6f3931505f995e5ce9cdf8b944 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 28 Sep 2024 10:52:46 +0300 Subject: [PATCH 02/10] OV-456: * fix grid --- .../home/components/video-section/styles.module.css | 4 ++++ .../home/components/video-section/video-section.tsx | 2 +- .../template/components/template-card/template-card.tsx | 2 +- .../components/templates-section/styles.module.css | 4 ++++ .../components/templates-section/templates-section.tsx | 7 ++++++- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/frontend/src/bundles/home/components/video-section/styles.module.css b/frontend/src/bundles/home/components/video-section/styles.module.css index 64d222997..7c59d939c 100644 --- a/frontend/src/bundles/home/components/video-section/styles.module.css +++ b/frontend/src/bundles/home/components/video-section/styles.module.css @@ -4,3 +4,7 @@ scrollbar-width: thin; scrollbar-color: #c1c1c1 #f1f1f1; } + +.grid { + grid-template-columns: repeat(auto-fit, 250px); +} diff --git a/frontend/src/bundles/home/components/video-section/video-section.tsx b/frontend/src/bundles/home/components/video-section/video-section.tsx index f970129aa..c71d67e1d 100644 --- a/frontend/src/bundles/home/components/video-section/video-section.tsx +++ b/frontend/src/bundles/home/components/video-section/video-section.tsx @@ -49,7 +49,7 @@ const VideoSection: React.FC = ({ videos, title }) => { ))} ) : ( - + {videos.map(({ id, ...video }) => ( ))} diff --git a/frontend/src/bundles/template/components/template-card/template-card.tsx b/frontend/src/bundles/template/components/template-card/template-card.tsx index cefef1c7e..1dca9b62e 100644 --- a/frontend/src/bundles/template/components/template-card/template-card.tsx +++ b/frontend/src/bundles/template/components/template-card/template-card.tsx @@ -44,7 +44,7 @@ const TemplateCard: React.FC = ({ id, name, previewUrl }) => { }, [handleWarningModalClose]); return ( - + = ({ templates }) => { - + {templates.map(({ id, ...template }) => ( ))} From f30979f5af1ac71b65747694803aef4cea63c895 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 28 Sep 2024 10:58:58 +0300 Subject: [PATCH 03/10] OV-456: * fix grid --- .../voices/components/voice-section/styles.module.css | 4 ++++ .../voices/components/voice-section/voice-section.tsx | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/bundles/voices/components/voice-section/styles.module.css b/frontend/src/bundles/voices/components/voice-section/styles.module.css index 64d222997..7c59d939c 100644 --- a/frontend/src/bundles/voices/components/voice-section/styles.module.css +++ b/frontend/src/bundles/voices/components/voice-section/styles.module.css @@ -4,3 +4,7 @@ scrollbar-width: thin; scrollbar-color: #c1c1c1 #f1f1f1; } + +.grid { + grid-template-columns: repeat(auto-fit, 250px); +} diff --git a/frontend/src/bundles/voices/components/voice-section/voice-section.tsx b/frontend/src/bundles/voices/components/voice-section/voice-section.tsx index 051006891..5eeabbf1d 100644 --- a/frontend/src/bundles/voices/components/voice-section/voice-section.tsx +++ b/frontend/src/bundles/voices/components/voice-section/voice-section.tsx @@ -50,10 +50,7 @@ const VoiceSection: React.FC = ({ voices, title }) => { ))} ) : ( - + {voices.map((voice) => ( ))} From 62ebc641a7ca5749ec47f15d08047080eaa2ec88 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 28 Sep 2024 11:34:11 +0300 Subject: [PATCH 04/10] OV-456: * grid --- .../components/avatar-card/avatar-card.tsx | 21 ++++++++++++++----- .../avatars-section/avatars-section.tsx | 7 ++----- .../avatars-section/styles.module.css | 3 +++ 3 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 frontend/src/bundles/ai-avatars/components/avatars-section/styles.module.css diff --git a/frontend/src/bundles/ai-avatars/components/avatar-card/avatar-card.tsx b/frontend/src/bundles/ai-avatars/components/avatar-card/avatar-card.tsx index a3bebefbc..d5224f526 100644 --- a/frontend/src/bundles/ai-avatars/components/avatar-card/avatar-card.tsx +++ b/frontend/src/bundles/ai-avatars/components/avatar-card/avatar-card.tsx @@ -40,10 +40,21 @@ const AvatarCard: React.FC = ({ }, [dispatch, id, image]); return ( - - - - AI generated avatar image + + + + AI generated avatar image } @@ -54,7 +65,7 @@ const AvatarCard: React.FC = ({ right="0" onClick={handleLike} /> - + {name} diff --git a/frontend/src/bundles/ai-avatars/components/avatars-section/avatars-section.tsx b/frontend/src/bundles/ai-avatars/components/avatars-section/avatars-section.tsx index 884a1f52c..7fb0e9b3f 100644 --- a/frontend/src/bundles/ai-avatars/components/avatars-section/avatars-section.tsx +++ b/frontend/src/bundles/ai-avatars/components/avatars-section/avatars-section.tsx @@ -14,6 +14,7 @@ import { } from '~/bundles/common/components/components.js'; import { AvatarCard } from '../components.js'; +import styles from './styles.module.css'; type Properties = { subtitle: string; @@ -62,11 +63,7 @@ const AvatarsSection: React.FC = ({ subtitle, avatars, form }) => { Pick your favorites avatars to show them here! ) : ( - + {avatars.map(({ id, imgUrl, name, style, isLiked }) => ( Date: Sat, 28 Sep 2024 11:41:46 +0300 Subject: [PATCH 05/10] OV-456: * text --- frontend/src/bundles/chat/pages/chat-modal.tsx | 2 +- .../components/generate-script-view/generate-script-view.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/bundles/chat/pages/chat-modal.tsx b/frontend/src/bundles/chat/pages/chat-modal.tsx index 2b1dc76db..049aa621c 100644 --- a/frontend/src/bundles/chat/pages/chat-modal.tsx +++ b/frontend/src/bundles/chat/pages/chat-modal.tsx @@ -52,7 +52,7 @@ const ChatModal: React.FC = ({ diff --git a/frontend/src/bundles/common/components/video-modal/components/video-modal-content/components/generate-script-view/generate-script-view.tsx b/frontend/src/bundles/common/components/video-modal/components/video-modal-content/components/generate-script-view/generate-script-view.tsx index 750519bef..aa66ed294 100644 --- a/frontend/src/bundles/common/components/video-modal/components/video-modal-content/components/generate-script-view/generate-script-view.tsx +++ b/frontend/src/bundles/common/components/video-modal/components/video-modal-content/components/generate-script-view/generate-script-view.tsx @@ -50,7 +50,7 @@ const GenerateScriptView: React.FC = ({ onClose }) => { return ( <> - Use Open AI to draft your video script + Use our AI assistant to draft your video script From 88cf35f1e13f5e4596d596f3849618cba8685329 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 28 Sep 2024 12:18:31 +0300 Subject: [PATCH 06/10] OV-456: * text --- frontend/src/bundles/chat/pages/chat-modal.tsx | 2 +- .../components/generate-script-view/generate-script-view.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/bundles/chat/pages/chat-modal.tsx b/frontend/src/bundles/chat/pages/chat-modal.tsx index 049aa621c..cb2e61acc 100644 --- a/frontend/src/bundles/chat/pages/chat-modal.tsx +++ b/frontend/src/bundles/chat/pages/chat-modal.tsx @@ -52,7 +52,7 @@ const ChatModal: React.FC = ({ diff --git a/frontend/src/bundles/common/components/video-modal/components/video-modal-content/components/generate-script-view/generate-script-view.tsx b/frontend/src/bundles/common/components/video-modal/components/video-modal-content/components/generate-script-view/generate-script-view.tsx index aa66ed294..595a9304e 100644 --- a/frontend/src/bundles/common/components/video-modal/components/video-modal-content/components/generate-script-view/generate-script-view.tsx +++ b/frontend/src/bundles/common/components/video-modal/components/video-modal-content/components/generate-script-view/generate-script-view.tsx @@ -50,7 +50,7 @@ const GenerateScriptView: React.FC = ({ onClose }) => { return ( <> - Use our AI assistant to draft your video script + Use our AI Assistant to draft your video script From 41ac8d080e6643263f11e4163bdd36b63223f9a0 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 28 Sep 2024 13:21:57 +0300 Subject: [PATCH 07/10] OV-456: * header --- frontend/src/bundles/common/components/header/header.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/bundles/common/components/header/header.tsx b/frontend/src/bundles/common/components/header/header.tsx index deb4061ac..a6dacfacb 100644 --- a/frontend/src/bundles/common/components/header/header.tsx +++ b/frontend/src/bundles/common/components/header/header.tsx @@ -23,7 +23,7 @@ const Header: React.FC = ({ left, center, right }) => { )} {center} - {right && {right}}; + {right && {right}} ); }; From d8137e087dfbf63a7e12499bee25f0bddbece864 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 28 Sep 2024 13:25:35 +0300 Subject: [PATCH 08/10] OV-456: * consent --- .../src/bundles/create-avatar/components/consent/consent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/bundles/create-avatar/components/consent/consent.tsx b/frontend/src/bundles/create-avatar/components/consent/consent.tsx index b1d02e096..109f2525b 100644 --- a/frontend/src/bundles/create-avatar/components/consent/consent.tsx +++ b/frontend/src/bundles/create-avatar/components/consent/consent.tsx @@ -13,7 +13,7 @@ const Consent: React.FC = () => { return ( - Concent + Consent To prevent misuse of technology, we just need to confirm the From f8056e86d19b9107641792f5b0eea64c44794b27 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 28 Sep 2024 14:21:14 +0300 Subject: [PATCH 09/10] OV-456: - logs --- backend/src/bundles/public-video/public-video.controller.ts | 5 +---- backend/src/bundles/videos/video.repository.ts | 3 +-- backend/src/common/services/token/token.services.ts | 3 +-- frontend/src/bundles/preview/components/preview-wrapper.tsx | 3 +-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/backend/src/bundles/public-video/public-video.controller.ts b/backend/src/bundles/public-video/public-video.controller.ts index 18df86047..9f840c1ea 100644 --- a/backend/src/bundles/public-video/public-video.controller.ts +++ b/backend/src/bundles/public-video/public-video.controller.ts @@ -36,11 +36,8 @@ class PublicVideoController extends BaseController { body: { id: string }; }>, ): Promise { - // eslint-disable-next-line no-console - console.log(options.body, 'options.body'); const jwt = options.body.id; - // eslint-disable-next-line no-console - console.log(jwt, 'jwt'); + return { status: HTTPCode.OK, payload: await this.publicVideoService.findUrlByToken(jwt), diff --git a/backend/src/bundles/videos/video.repository.ts b/backend/src/bundles/videos/video.repository.ts index 26542e5fe..ed0b8bc91 100644 --- a/backend/src/bundles/videos/video.repository.ts +++ b/backend/src/bundles/videos/video.repository.ts @@ -21,8 +21,7 @@ class VideoRepository implements Repository { public async findById(id: string): Promise { const video = await this.videoModel.query().findById(id).execute(); - // eslint-disable-next-line no-console - console.log(video); + return video ? VideoEntity.initialize(video) : null; } diff --git a/backend/src/common/services/token/token.services.ts b/backend/src/common/services/token/token.services.ts index 9da1f26b1..429249cdd 100644 --- a/backend/src/common/services/token/token.services.ts +++ b/backend/src/common/services/token/token.services.ts @@ -34,8 +34,7 @@ class TokenService { public async getIdFromToken(token: string): Promise { const payload = await this.verifyToken(token); - // eslint-disable-next-line no-console - console.log(payload); + return (payload?.['id'] as string) ?? null; } } diff --git a/frontend/src/bundles/preview/components/preview-wrapper.tsx b/frontend/src/bundles/preview/components/preview-wrapper.tsx index 0a1260537..c5006af01 100644 --- a/frontend/src/bundles/preview/components/preview-wrapper.tsx +++ b/frontend/src/bundles/preview/components/preview-wrapper.tsx @@ -4,8 +4,7 @@ import { Preview } from '~/bundles/preview/pages/preview.js'; const PreviewWrapper: React.FC = () => { const { jwt } = useParams<{ jwt: string }>(); - // eslint-disable-next-line no-console - console.log('PreviewWrapper', jwt); + return ; }; From c60fa26d5048818ec41aeb652f3abf9c91960b90 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 28 Sep 2024 14:35:10 +0300 Subject: [PATCH 10/10] OV-456: * white routes --- backend/src/common/constants/white-routes.constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/common/constants/white-routes.constants.ts b/backend/src/common/constants/white-routes.constants.ts index 5a592caa2..f665e4f67 100644 --- a/backend/src/common/constants/white-routes.constants.ts +++ b/backend/src/common/constants/white-routes.constants.ts @@ -13,7 +13,7 @@ const WHITE_ROUTES = [ }, { path: `/api/v1${ApiPath.PUBLIC_VIDEO}/`, - method: HTTPMethod.GET, + method: HTTPMethod.POST, }, { path: /\/v1\/documentation\/.*/,