From f715f70f9e7a36571e347a615e3e50e8ceeeb3f0 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Fri, 24 Feb 2023 22:12:31 +0100 Subject: [PATCH] fix layout sizings Co-authored-by: Jip Frijlink --- src/components/Banner.tsx | 21 ++++++++++--------- src/setup/Layout.tsx | 1 + src/video/components/VideoPlayer.tsx | 1 + src/video/components/actions/HeaderAction.tsx | 1 + .../components/parts/VideoPlayerHeader.tsx | 5 ++++- src/views/media/MediaErrorView.tsx | 2 +- src/views/media/MediaView.tsx | 4 ++-- src/views/notfound/NotFoundView.tsx | 6 +++--- 8 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/components/Banner.tsx b/src/components/Banner.tsx index 180f445c..044bc524 100644 --- a/src/components/Banner.tsx +++ b/src/components/Banner.tsx @@ -11,16 +11,17 @@ export function Banner(props: { children: React.ReactNode; type: "error" }) { }; return ( -
-
- -
{props.children}
+
+
+
+ +
{props.children}
+
); diff --git a/src/setup/Layout.tsx b/src/setup/Layout.tsx index c9a02dc8..599547f6 100644 --- a/src/setup/Layout.tsx +++ b/src/setup/Layout.tsx @@ -18,6 +18,7 @@ export function Layout(props: { children: ReactNode }) { style={{ paddingTop: `${bannerSize}px`, }} + className="flex min-h-screen flex-col" > {props.children}
diff --git a/src/video/components/VideoPlayer.tsx b/src/video/components/VideoPlayer.tsx index 688f42e2..7f593e88 100644 --- a/src/video/components/VideoPlayer.tsx +++ b/src/video/components/VideoPlayer.tsx @@ -120,6 +120,7 @@ export function VideoPlayer(props: Props) { void; showControls?: boolean; + isFullScreen: boolean; } export function HeaderAction(props: Props) { diff --git a/src/video/components/parts/VideoPlayerHeader.tsx b/src/video/components/parts/VideoPlayerHeader.tsx index 57bd9e18..950f1a97 100644 --- a/src/video/components/parts/VideoPlayerHeader.tsx +++ b/src/video/components/parts/VideoPlayerHeader.tsx @@ -16,6 +16,7 @@ interface VideoPlayerHeaderProps { media?: MWMediaMeta; onClick?: () => void; showControls?: boolean; + isFullScreen?: boolean; } export function VideoPlayerHeader(props: VideoPlayerHeaderProps) { @@ -31,7 +32,9 @@ export function VideoPlayerHeader(props: VideoPlayerHeaderProps) { return (

diff --git a/src/views/media/MediaErrorView.tsx b/src/views/media/MediaErrorView.tsx index 5dc634f4..6e611f33 100644 --- a/src/views/media/MediaErrorView.tsx +++ b/src/views/media/MediaErrorView.tsx @@ -9,7 +9,7 @@ export function MediaFetchErrorView() { const goBack = useGoBack(); return ( -

+
{t("media.errors.failedMeta")} diff --git a/src/views/media/MediaView.tsx b/src/views/media/MediaView.tsx index 5480684c..e4a09f7e 100644 --- a/src/views/media/MediaView.tsx +++ b/src/views/media/MediaView.tsx @@ -28,7 +28,7 @@ function MediaViewLoading(props: { onGoBack(): void }) { const { t } = useTranslation(); return ( -
+
{t("videoPlayer.loading")} @@ -62,7 +62,7 @@ function MediaViewScraping(props: MediaViewScrapingProps) { }, [stream, props]); return ( -
+
{props.meta.meta.title} diff --git a/src/views/notfound/NotFoundView.tsx b/src/views/notfound/NotFoundView.tsx index 7061e039..3d9e7032 100644 --- a/src/views/notfound/NotFoundView.tsx +++ b/src/views/notfound/NotFoundView.tsx @@ -17,18 +17,18 @@ export function NotFoundWrapper(props: { const goBack = useGoBack(); return ( -
+
{t("notFound.genericTitle")} {props.video ? ( -
+
) : ( )} -
+
{props.children}