Fixed navbar & removed enter animation

This commit is contained in:
Alois 2026-04-07 00:16:24 +02:00
commit cdb0fdbf76
2 changed files with 79 additions and 94 deletions

View file

@ -34,6 +34,7 @@ export default function Navbar({ forMobile }: { forMobile: boolean }) {
data-tauri-drag-region data-tauri-drag-region
className={`${forMobile && "border-b"} w-full gap-2 h-13.5 flex items-center justify-between`} className={`${forMobile && "border-b"} w-full gap-2 h-13.5 flex items-center justify-between`}
> >
<div className="flex items-center justify-center gap-2">
{forMobile ? ( {forMobile ? (
<SidebarTrigger <SidebarTrigger
className="w-9 h-9 aspect-square rounded-lg ml-2" className="w-9 h-9 aspect-square rounded-lg ml-2"
@ -59,7 +60,9 @@ export default function Navbar({ forMobile }: { forMobile: boolean }) {
loading={<Skeleton className="ml-3 w-40 h-5" />} loading={<Skeleton className="ml-3 w-40 h-5" />}
/> />
)} )}
</div>
{/* Empty space */} {/* Empty space */}
<div className="flex items-center justify-center gap-2">
{pathname === "/chat" && id && ( {pathname === "/chat" && id && (
<> <>
{currentCalls.length === 0 ? ( {currentCalls.length === 0 ? (
@ -68,7 +71,7 @@ export default function Navbar({ forMobile }: { forMobile: boolean }) {
onClick={() => { onClick={() => {
joinCall(id); joinCall(id);
}} }}
className="w-9 h-9 aspect-square rounded-lg mr-2" className="w-9 h-9 aspect-square rounded-lg"
variant="outline" variant="outline"
> >
<Phone /> <Phone />
@ -111,7 +114,8 @@ export default function Navbar({ forMobile }: { forMobile: boolean }) {
)} )}
</> </>
)} )}
<Controls className="mr-2 ring-border" notPresentClassName="mr-2" /> <Controls className="mr-2 ring-border" />
</div>
</div> </div>
); );
} }

View file

@ -6,7 +6,6 @@ import Navbar, { MobileNavbar } from "@/components/navbar";
import { SidebarProvider } from "@tensamin/ui/cmp/sidebar"; import { SidebarProvider } from "@tensamin/ui/cmp/sidebar";
import { useIsMobile, cn } from "@tensamin/ui/utils"; import { useIsMobile, cn } from "@tensamin/ui/utils";
import { motion } from "framer-motion";
import { isTauri } from "@tauri-apps/api/core"; import { isTauri } from "@tauri-apps/api/core";
import { useLocation } from "@tanstack/react-router"; import { useLocation } from "@tanstack/react-router";
@ -20,20 +19,7 @@ export default function Layout(props: { children: ReactNode }) {
const location = useLocation(); const location = useLocation();
return ( return (
<motion.div <div className="w-full h-full flex bg-sidebar">
className="w-full h-full flex bg-sidebar"
initial={{ y: -40, scale: 0.95, borderRadius: "1rem" }}
animate={{ y: 0, scale: 1, borderRadius: 0 }}
transition={{
borderRadius: { duration: animationTiming.first, ease: "easeOut" },
y: { duration: animationTiming.first, ease: "easeOut" },
scale: {
delay: animationTiming.first,
duration: animationTiming.second,
ease: "easeOut",
},
}}
>
<SidebarProvider> <SidebarProvider>
<Sidebar /> <Sidebar />
<div <div
@ -58,11 +44,6 @@ export default function Layout(props: { children: ReactNode }) {
{isMobile && location.pathname !== "/chat" && <MobileNavbar />} {isMobile && location.pathname !== "/chat" && <MobileNavbar />}
</div> </div>
</SidebarProvider> </SidebarProvider>
</motion.div> </div>
); );
} }
const animationTiming = {
first: 0.18,
second: 0.1,
};