mirror of
https://github.com/ClipFusion-org/clipfusion.git
synced 2025-08-05 19:25:09 +00:00
added custom title bar for pwa
This commit is contained in:
parent
b4dad36b89
commit
67cc20e35c
@ -132,3 +132,7 @@ body {
|
|||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@utility h-safe-area-inset-top {
|
||||||
|
height: env(safe-area-inset-top);
|
||||||
|
}
|
@ -48,7 +48,7 @@ export default async function RootLayout({
|
|||||||
<ThemeProvider>
|
<ThemeProvider>
|
||||||
<SidebarProvider>
|
<SidebarProvider>
|
||||||
<Dashboard/>
|
<Dashboard/>
|
||||||
<main className="w-full h-full">
|
<main className="w-full h-full relative">
|
||||||
<PersistenceProvider>
|
<PersistenceProvider>
|
||||||
{children}
|
{children}
|
||||||
</PersistenceProvider>
|
</PersistenceProvider>
|
||||||
|
@ -262,13 +262,18 @@ export default function Home(): ReactNode {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="p-5 w-full h-full">
|
<>
|
||||||
<div className="flex flex-row items-center gap-2 overscroll-none">
|
<div className="flex flex-row items-center gap-2 absolute top-0 left-0 p-5 z-40" tabIndex={1}>
|
||||||
<SidebarTrigger size="lg"/>
|
<SidebarTrigger size="lg"/>
|
||||||
<h2 className="font-bold break-keep text-xl sm:text-2xl md:text-3xl lg:text-4xl leading-none">Project Library</h2>
|
<h2 className="font-bold break-keep text-xl sm:text-2xl md:text-3xl lg:text-4xl leading-none">Project Library</h2>
|
||||||
{projects && <Label className="text-muted-foreground text-sm">(Found {projects.length} projects)</Label>}
|
{projects && <Label className="text-muted-foreground text-sm">(Found {projects.length} projects)</Label>}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-row items-center justify-between sticky top-safe bg-background gap-2 mt-3 pb-2 pt-2 w-full overscroll-none z-50">
|
<div className="p-5 w-full h-full">
|
||||||
|
<div aria-hidden className="fixed top-0 left-0 w-full z-10">
|
||||||
|
<div className="sticky top-0 left-0 w-full h-safe-area-inset-top bg-[#0a0a0a]" />
|
||||||
|
</div>
|
||||||
|
<div className="h-8" />
|
||||||
|
<div className="flex flex-row items-center justify-between sticky top-safe bg-background gap-2 mt-3 pb-2 pt-2 w-full z-40">
|
||||||
<div className="flex flex-row items-center gap-2">
|
<div className="flex flex-row items-center gap-2">
|
||||||
<Dialog>
|
<Dialog>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
@ -317,5 +322,6 @@ export default function Home(): ReactNode {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,7 @@ const items: DashboardItem[] = [
|
|||||||
|
|
||||||
export const Dashboard = (): ReactNode => {
|
export const Dashboard = (): ReactNode => {
|
||||||
return (
|
return (
|
||||||
<Sidebar className="pl-safe">
|
<Sidebar className="pl-safe z-50">
|
||||||
<SidebarHeader className="flex justify-center items-center mt-safe-or-2">
|
<SidebarHeader className="flex justify-center items-center mt-safe-or-2">
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<ClipFusionLogo width="30" height="30">
|
<ClipFusionLogo width="30" height="30">
|
||||||
|
@ -273,7 +273,7 @@ function SidebarTrigger({
|
|||||||
}}
|
}}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{open ? <PanelLeftOpenIcon/> : <PanelLeftCloseIcon/>}
|
{open ? <PanelLeftCloseIcon/> : <PanelLeftOpenIcon/>}
|
||||||
<span className="sr-only">Toggle Sidebar</span>
|
<span className="sr-only">Toggle Sidebar</span>
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user