From 6a48508ffdee8e37f4a6d046b223287bdba78825 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 8 Feb 2024 03:27:40 +0800 Subject: [PATCH] :bug: Fix styles issue --- pkg/view/src/layouts/RootLayout.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkg/view/src/layouts/RootLayout.tsx b/pkg/view/src/layouts/RootLayout.tsx index fb5f9b7..96d5593 100644 --- a/pkg/view/src/layouts/RootLayout.tsx +++ b/pkg/view/src/layouts/RootLayout.tsx @@ -26,17 +26,21 @@ export default function RootLayout(props: any) { if (!userinfo?.isLoggedIn && blacklist.includes(path)) { if (!e?.defaultPrevented) e?.preventDefault(); - navigate(`/auth?redirect_uri=${path}`); + if (location.query["embedded"]) { + navigate(`/auth?redirect_uri=${path}&embedded=${location.query["embedded"]}`); + } else { + navigate(`/auth?redirect_uri=${path}`); + } } } const mainContentStyles = createMemo(() => { - if(!searchParams["noTitle"]) { - return "h-[calc(100vh-64px)] mt-[64px]" + if (!searchParams["noTitle"]) { + return "h-[calc(100vh-64px)] mt-[64px]"; } else { - return "h-[100vh]" + return "h-[100vh]"; } - }) + }); return (