From a798ba8cd012cbf61a0a59dd46390809ed772ba7 Mon Sep 17 00:00:00 2001 From: rimar1337 <132627503+rimar1337@users.noreply.github.com> Date: Sat, 18 Oct 2025 21:03:15 +0700 Subject: [PATCH] tablet support for nav bar --- src/routes/__root.tsx | 128 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 119 insertions(+), 9 deletions(-) diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index 11d13e3..80c5d1e 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -415,6 +415,116 @@ function RootDocument({ children }: { children: React.ReactNode }) { + + + + + + } + ActiveIcon={} + active={isHome} + onClickCallbback={() => + navigate({ + to: "/", + //params: { did: agent.assertDid }, + }) + } + text="Home" + /> + + + } + ActiveIcon={ + + } + active={isNotifications} + onClickCallbback={() => + navigate({ + to: "/notifications", + //params: { did: agent.assertDid }, + }) + } + text="Notifications" + /> + } + ActiveIcon={} + active={location.pathname.startsWith("/feeds")} + onClickCallbback={() => + navigate({ + to: "/feeds", + //params: { did: agent.assertDid }, + }) + } + text="Feeds" + /> + } + ActiveIcon={} + active={location.pathname.startsWith("/search")} + onClickCallbback={() => + navigate({ + to: "/search", + //params: { did: agent.assertDid }, + }) + } + text="Search" + /> + + } + ActiveIcon={ + + } + active={isProfile ?? false} + onClickCallbback={() => { + if (authed && agent && agent.assertDid) { + //window.location.href = `/profile/${agent.assertDid}`; + navigate({ + to: "/profile/$did", + params: { did: agent.assertDid }, + }); + } + }} + text="Profile" + /> + + } + ActiveIcon={} + active={location.pathname.startsWith("/settings")} + onClickCallbback={() => + navigate({ + to: "/settings", + //params: { did: agent.assertDid }, + }) + } + text="Settings" + /> + + } + ActiveIcon={} + //active={true} + onClickCallbback={() => setPostOpen(true)} + text="Post" + /> + + + {agent?.did && ( )} - + {children} @@ -448,7 +558,7 @@ function RootDocument({ children }: { children: React.ReactNode }) { {agent?.did ? ( - + void; - small?: boolean; + small?: boolean | string; }) { if (small) return ( void; - small?: boolean; + small?: boolean | string; }) { const active = false; return ( - + {active ? ActiveIcon : InactiveIcon} - {text} - + )} ); } -- 2.51.2