From 1774c7b9f26e859ffce5dec2250f5066418504b1 Mon Sep 17 00:00:00 2001 From: A B M Zubayer Date: Thu, 21 Sep 2023 23:27:45 +0600 Subject: [PATCH 1/3] FIX: dark mode, modal border and shadow --- src/components/Inputs/MaterialInput.tsx | 2 +- src/components/Layouts/ChannelNavLayout.tsx | 10 +- .../NotificationModal/NotificationModal.tsx | 2 +- src/components/Modals/UserModal.tsx | 2 +- src/pages/profiles/channel/ChannelProfile.tsx | 16 ++- .../profiles/channel/partials/ChannelNav.tsx | 115 ++++++++++-------- .../upload/partials/AudienceSetting.tsx | 2 +- 7 files changed, 79 insertions(+), 70 deletions(-) diff --git a/src/components/Inputs/MaterialInput.tsx b/src/components/Inputs/MaterialInput.tsx index c8535c5..925f410 100644 --- a/src/components/Inputs/MaterialInput.tsx +++ b/src/components/Inputs/MaterialInput.tsx @@ -249,7 +249,7 @@ export const InlineSelectInput = ({ { diff --git a/src/pages/profiles/channel/upload/UploadVideo.tsx b/src/pages/profiles/channel/upload/UploadVideo.tsx index 6d3c031..f350e0e 100644 --- a/src/pages/profiles/channel/upload/UploadVideo.tsx +++ b/src/pages/profiles/channel/upload/UploadVideo.tsx @@ -270,7 +270,7 @@ const UploadVideo = () => { return (
-
+
{/* upload process info */}
@@ -323,7 +323,7 @@ const UploadVideo = () => {
{/* upload metadata info */} -
+
{/* video metadata form */}

@@ -366,7 +366,7 @@ const UploadVideo = () => { />

{/* video metadata aside */} -
+

More Settings

From 051be4edd49780775ede052d0595ddb8b1586352 Mon Sep 17 00:00:00 2001 From: A B M Zubayer Date: Thu, 21 Sep 2023 23:30:02 +0600 Subject: [PATCH 3/3] FIX: videoPlayer and playlist height issue --- src/components/VideoPlayer/VideoPlayer.tsx | 26 +++----------- src/index.css | 2 ++ .../profiles/video/partials/Playlist.tsx | 15 +++++--- .../profiles/video/partials/VideoBody.tsx | 34 ++++++++++--------- 4 files changed, 34 insertions(+), 43 deletions(-) diff --git a/src/components/VideoPlayer/VideoPlayer.tsx b/src/components/VideoPlayer/VideoPlayer.tsx index 5772bdf..aebdda1 100644 --- a/src/components/VideoPlayer/VideoPlayer.tsx +++ b/src/components/VideoPlayer/VideoPlayer.tsx @@ -103,29 +103,11 @@ const VideoPlayer = ({ source, metaData, isLoading, thumbnail }: Props) => { crossOrigin='anonymous' preload='auto' autoPlay - className='w-full h-full aspect-video' + className={`aspect-video ${ + !isPlaylistExist ? '2xl:h-[80vh]' : 'h-full ' + }`} > - {/* */} - {/* - - */}
    {
- {query.has('p') && ( + {isPlaylistExist && ( ; }; -const Playlist: React.FC = ({ playlist, isLoading, vidRef }) => { +const Playlist: React.FC = memo(function Playlist({ + playlist, + isLoading, + vidRef, +}) { const query = useQuery(); const [playlistOpen, setPlaylistOpen] = useState(true); + console.log('rendering'); + const playlistRef = useRef(null); useEffect(() => { @@ -35,7 +41,7 @@ const Playlist: React.FC = ({ playlist, isLoading, vidRef }) => { `${resizeVidHeight! - 95}px` ); }); - }, [vidRef, vidRef?.current?.clientHeight]); + }, [vidRef, vidRef?.current?.clientHeight, playlistOpen]); if (isLoading) { return ( @@ -107,6 +113,5 @@ const Playlist: React.FC = ({ playlist, isLoading, vidRef }) => { )}
); -}; - +}); export default Playlist; diff --git a/src/pages/profiles/video/partials/VideoBody.tsx b/src/pages/profiles/video/partials/VideoBody.tsx index 7f2268b..4628672 100644 --- a/src/pages/profiles/video/partials/VideoBody.tsx +++ b/src/pages/profiles/video/partials/VideoBody.tsx @@ -23,27 +23,29 @@ const VideoBody: React.FC = ({ metaData }) => { {metaData.title}

-
-
- - - -

- - {metaData?.channel?.name} +

+
+
+ + - - {metaData.followers} followers - -

+

+ + {metaData?.channel?.name} + + + {metaData.followers} followers + +

+
-
+