From 4d0542e9c6088ed554125552b4ae3128c5b70177 Mon Sep 17 00:00:00 2001 From: 01zulfi <85733202+01zulfi@users.noreply.github.com> Date: Thu, 25 Dec 2025 11:11:59 +0500 Subject: [PATCH] web: show titlebar on auth pages Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com> --- apps/web/src/components/title-bar/index.tsx | 14 ++++++++++++-- apps/web/src/root.tsx | 4 ++-- apps/web/src/views/auth.tsx | 12 +++++++++++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/apps/web/src/components/title-bar/index.tsx b/apps/web/src/components/title-bar/index.tsx index a7e7798f3..d9787d312 100644 --- a/apps/web/src/components/title-bar/index.tsx +++ b/apps/web/src/components/title-bar/index.tsx @@ -68,13 +68,23 @@ export function getWindowControls( ]; } export const TITLE_BAR_HEIGHT = 37; -export function TitleBar({ isUnderlay = isMac() }: { isUnderlay?: boolean }) { +export function TitleBar({ + isUnderlay = isMac(), + force = false +}: { + isUnderlay?: boolean; + force?: boolean; +}) { const { isFullscreen, hasNativeWindowControls, isMaximized } = useWindowControls(); const isTablet = useTablet(); const isMobile = useMobile(); - if ((!isMac() && !isMobile && !isTablet) || (isFullscreen && isMac())) + if ( + !force && + ((!isMac() && !isMobile && !isTablet) || (isFullscreen && isMac())) + ) { return null; + } const tools = getWindowControls( hasNativeWindowControls, diff --git a/apps/web/src/root.tsx b/apps/web/src/root.tsx index 5de2050da..488f00b78 100644 --- a/apps/web/src/root.tsx +++ b/apps/web/src/root.tsx @@ -29,7 +29,7 @@ import { desktop } from "./common/desktop-bridge"; import { useKeyStore } from "./interfaces/key-store"; import Config from "./utils/config"; import { usePromise } from "@notesnook/common"; -import { AuthProps } from "./views/auth"; +import { AuthProps, isAuthRouteActive } from "./views/auth"; import { loadDatabase } from "./hooks/use-database"; import AppLock from "./views/app-lock"; import { Text } from "@theme-ui/components"; @@ -58,7 +58,7 @@ export async function startApp(children?: React.ReactNode) { root.render( <> - + = { signup: "/signup" }; +export function isAuthRouteActive() { + const path = getCurrentPath(); + return Object.values(routePaths).includes(path); +} + const authorizedRoutes: AuthRoutes[] = [ "login:email", "login:password",