an appview-less Bluesky client using Constellation and PDS Queries reddwarf.app
frontend spa bluesky reddwarf microcosm

prevent no active tabs

rimar1337 92264fde efb287ec

Changed files
+46 -23
src
routes
+45 -22
src/routes/__root.tsx
··· 95 agent && 96 (location.pathname === `/profile/${agent?.did}` || 97 location.pathname === `/profile/${encodeURIComponent(agent?.did ?? "")}`); 98 99 const [postOpen, setPostOpen] = useState(false); 100 const [postText, setPostText] = useState(""); ··· 191 <IconMaterialSymbolsHomeOutline className="w-6 h-6" /> 192 } 193 ActiveIcon={<IconMaterialSymbolsHome className="w-6 h-6" />} 194 - active={isHome} 195 onClickCallbback={() => 196 navigate({ 197 to: "/", ··· 208 ActiveIcon={ 209 <IconMaterialSymbolsNotifications className="w-6 h-6" /> 210 } 211 - active={isNotifications} 212 onClickCallbback={() => 213 navigate({ 214 to: "/notifications", ··· 220 <MaterialNavItem 221 InactiveIcon={<IconMaterialSymbolsTag className="w-6 h-6" />} 222 ActiveIcon={<IconMaterialSymbolsTag className="w-6 h-6" />} 223 - active={location.pathname.startsWith("/feeds")} 224 onClickCallbback={() => 225 navigate({ 226 to: "/feeds", ··· 232 <MaterialNavItem 233 InactiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 234 ActiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 235 - active={location.pathname.startsWith("/search")} 236 onClickCallbback={() => 237 navigate({ 238 to: "/search", ··· 248 ActiveIcon={ 249 <IconMaterialSymbolsAccountCircle className="w-6 h-6" /> 250 } 251 - active={isProfile ?? false} 252 onClickCallbback={() => { 253 if (authed && agent && agent.assertDid) { 254 //window.location.href = `/profile/${agent.assertDid}`; ··· 265 <IconMaterialSymbolsSettingsOutline className="w-6 h-6" /> 266 } 267 ActiveIcon={<IconMaterialSymbolsSettings className="w-6 h-6" />} 268 - active={location.pathname.startsWith("/settings")} 269 onClickCallbback={() => 270 navigate({ 271 to: "/settings", ··· 425 <IconMaterialSymbolsHomeOutline className="w-6 h-6" /> 426 } 427 ActiveIcon={<IconMaterialSymbolsHome className="w-6 h-6" />} 428 - active={isHome} 429 onClickCallbback={() => 430 navigate({ 431 to: "/", ··· 443 ActiveIcon={ 444 <IconMaterialSymbolsNotifications className="w-6 h-6" /> 445 } 446 - active={isNotifications} 447 onClickCallbback={() => 448 navigate({ 449 to: "/notifications", ··· 456 small 457 InactiveIcon={<IconMaterialSymbolsTag className="w-6 h-6" />} 458 ActiveIcon={<IconMaterialSymbolsTag className="w-6 h-6" />} 459 - active={location.pathname.startsWith("/feeds")} 460 onClickCallbback={() => 461 navigate({ 462 to: "/feeds", ··· 469 small 470 InactiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 471 ActiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 472 - active={location.pathname.startsWith("/search")} 473 onClickCallbback={() => 474 navigate({ 475 to: "/search", ··· 486 ActiveIcon={ 487 <IconMaterialSymbolsAccountCircle className="w-6 h-6" /> 488 } 489 - active={isProfile ?? false} 490 onClickCallbback={() => { 491 if (authed && agent && agent.assertDid) { 492 //window.location.href = `/profile/${agent.assertDid}`; ··· 504 <IconMaterialSymbolsSettingsOutline className="w-6 h-6" /> 505 } 506 ActiveIcon={<IconMaterialSymbolsSettings className="w-6 h-6" />} 507 - active={location.pathname.startsWith("/settings")} 508 onClickCallbback={() => 509 navigate({ 510 to: "/settings", ··· 566 <IconMaterialSymbolsHomeOutline className="w-6 h-6" /> 567 } 568 ActiveIcon={<IconMaterialSymbolsHome className="w-6 h-6" />} 569 - active={isHome} 570 onClickCallbback={() => 571 navigate({ 572 to: "/", ··· 594 small 595 InactiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 596 ActiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 597 - active={location.pathname.startsWith("/search")} 598 onClickCallbback={() => 599 navigate({ 600 to: "/search", ··· 626 ActiveIcon={ 627 <IconMaterialSymbolsNotifications className="w-6 h-6" /> 628 } 629 - active={isNotifications} 630 onClickCallbback={() => 631 navigate({ 632 to: "/notifications", ··· 661 ActiveIcon={ 662 <IconMaterialSymbolsAccountCircle className="w-6 h-6" /> 663 } 664 - active={isProfile ?? false} 665 onClickCallbback={() => { 666 if (authed && agent && agent.assertDid) { 667 //window.location.href = `/profile/${agent.assertDid}`; ··· 699 <IconMaterialSymbolsSettingsOutline className="w-6 h-6" /> 700 } 701 ActiveIcon={<IconMaterialSymbolsSettings className="w-6 h-6" />} 702 - active={location.pathname.startsWith("/settings")} 703 onClickCallbback={() => 704 navigate({ 705 to: "/settings", ··· 841 <div className={`${!small && "mr-2"} ${active ? " " : " "}`}> 842 {active ? ActiveIcon : InactiveIcon} 843 </div> 844 - {!small && (<span 845 - className={`text-[17px] text-roboto ${active ? "font-medium" : ""}`} 846 - > 847 - {text} 848 - </span>)} 849 </button> 850 ); 851 }
··· 95 agent && 96 (location.pathname === `/profile/${agent?.did}` || 97 location.pathname === `/profile/${encodeURIComponent(agent?.did ?? "")}`); 98 + const isSettings = location.pathname.startsWith("/settings"); 99 + const isSearch = location.pathname.startsWith("/search"); 100 + const isFeeds = location.pathname.startsWith("/feeds"); 101 + 102 + const locationEnum: 103 + | "feeds" 104 + | "search" 105 + | "settings" 106 + | "notifications" 107 + | "profile" 108 + | "home" = isFeeds 109 + ? "feeds" 110 + : isSearch 111 + ? "search" 112 + : isSettings 113 + ? "settings" 114 + : isNotifications 115 + ? "notifications" 116 + : isProfile 117 + ? "profile" 118 + : "home"; 119 120 const [postOpen, setPostOpen] = useState(false); 121 const [postText, setPostText] = useState(""); ··· 212 <IconMaterialSymbolsHomeOutline className="w-6 h-6" /> 213 } 214 ActiveIcon={<IconMaterialSymbolsHome className="w-6 h-6" />} 215 + active={locationEnum === "home"} 216 onClickCallbback={() => 217 navigate({ 218 to: "/", ··· 229 ActiveIcon={ 230 <IconMaterialSymbolsNotifications className="w-6 h-6" /> 231 } 232 + active={locationEnum === "notifications"} 233 onClickCallbback={() => 234 navigate({ 235 to: "/notifications", ··· 241 <MaterialNavItem 242 InactiveIcon={<IconMaterialSymbolsTag className="w-6 h-6" />} 243 ActiveIcon={<IconMaterialSymbolsTag className="w-6 h-6" />} 244 + active={locationEnum === "feeds"} 245 onClickCallbback={() => 246 navigate({ 247 to: "/feeds", ··· 253 <MaterialNavItem 254 InactiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 255 ActiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 256 + active={locationEnum === "search"} 257 onClickCallbback={() => 258 navigate({ 259 to: "/search", ··· 269 ActiveIcon={ 270 <IconMaterialSymbolsAccountCircle className="w-6 h-6" /> 271 } 272 + active={locationEnum === "profile"} 273 onClickCallbback={() => { 274 if (authed && agent && agent.assertDid) { 275 //window.location.href = `/profile/${agent.assertDid}`; ··· 286 <IconMaterialSymbolsSettingsOutline className="w-6 h-6" /> 287 } 288 ActiveIcon={<IconMaterialSymbolsSettings className="w-6 h-6" />} 289 + active={locationEnum === "settings"} 290 onClickCallbback={() => 291 navigate({ 292 to: "/settings", ··· 446 <IconMaterialSymbolsHomeOutline className="w-6 h-6" /> 447 } 448 ActiveIcon={<IconMaterialSymbolsHome className="w-6 h-6" />} 449 + active={locationEnum === "home"} 450 onClickCallbback={() => 451 navigate({ 452 to: "/", ··· 464 ActiveIcon={ 465 <IconMaterialSymbolsNotifications className="w-6 h-6" /> 466 } 467 + active={locationEnum === "notifications"} 468 onClickCallbback={() => 469 navigate({ 470 to: "/notifications", ··· 477 small 478 InactiveIcon={<IconMaterialSymbolsTag className="w-6 h-6" />} 479 ActiveIcon={<IconMaterialSymbolsTag className="w-6 h-6" />} 480 + active={locationEnum === "feeds"} 481 onClickCallbback={() => 482 navigate({ 483 to: "/feeds", ··· 490 small 491 InactiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 492 ActiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 493 + active={locationEnum === "search"} 494 onClickCallbback={() => 495 navigate({ 496 to: "/search", ··· 507 ActiveIcon={ 508 <IconMaterialSymbolsAccountCircle className="w-6 h-6" /> 509 } 510 + active={locationEnum === "profile"} 511 onClickCallbback={() => { 512 if (authed && agent && agent.assertDid) { 513 //window.location.href = `/profile/${agent.assertDid}`; ··· 525 <IconMaterialSymbolsSettingsOutline className="w-6 h-6" /> 526 } 527 ActiveIcon={<IconMaterialSymbolsSettings className="w-6 h-6" />} 528 + active={locationEnum === "settings"} 529 onClickCallbback={() => 530 navigate({ 531 to: "/settings", ··· 587 <IconMaterialSymbolsHomeOutline className="w-6 h-6" /> 588 } 589 ActiveIcon={<IconMaterialSymbolsHome className="w-6 h-6" />} 590 + active={locationEnum === "home"} 591 onClickCallbback={() => 592 navigate({ 593 to: "/", ··· 615 small 616 InactiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 617 ActiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />} 618 + active={locationEnum === "search"} 619 onClickCallbback={() => 620 navigate({ 621 to: "/search", ··· 647 ActiveIcon={ 648 <IconMaterialSymbolsNotifications className="w-6 h-6" /> 649 } 650 + active={locationEnum === "notifications"} 651 onClickCallbback={() => 652 navigate({ 653 to: "/notifications", ··· 682 ActiveIcon={ 683 <IconMaterialSymbolsAccountCircle className="w-6 h-6" /> 684 } 685 + active={locationEnum === "profile"} 686 onClickCallbback={() => { 687 if (authed && agent && agent.assertDid) { 688 //window.location.href = `/profile/${agent.assertDid}`; ··· 720 <IconMaterialSymbolsSettingsOutline className="w-6 h-6" /> 721 } 722 ActiveIcon={<IconMaterialSymbolsSettings className="w-6 h-6" />} 723 + active={locationEnum === "settings"} 724 onClickCallbback={() => 725 navigate({ 726 to: "/settings", ··· 862 <div className={`${!small && "mr-2"} ${active ? " " : " "}`}> 863 {active ? ActiveIcon : InactiveIcon} 864 </div> 865 + {!small && ( 866 + <span 867 + className={`text-[17px] text-roboto ${active ? "font-medium" : ""}`} 868 + > 869 + {text} 870 + </span> 871 + )} 872 </button> 873 ); 874 }
+1 -1
src/routes/profile.$did/post.$rkey.image.$i.tsx
··· 85 e.stopPropagation(); 86 e.nativeEvent.stopImmediatePropagation(); 87 }} 88 - className="lightbox-sidebar hidden lg:flex overscroll-none disablegutter border-l dark:border-gray-800 was7 border-gray-300 fixed z-50 flex top-0 right-0 flex-col max-w-[350px] min-w-[350px] max-h-screen overflow-y-scroll dark:bg-gray-950 bg-white" 89 > 90 <ProfilePostComponent 91 key={`/profile/${did}/post/${rkey}`}
··· 85 e.stopPropagation(); 86 e.nativeEvent.stopImmediatePropagation(); 87 }} 88 + className="lightbox-sidebar hidden lg:flex overscroll-none disablegutter border-l dark:border-gray-800 was7 border-gray-300 fixed z-50 top-0 right-0 flex-col max-w-[350px] min-w-[350px] max-h-screen overflow-y-scroll dark:bg-gray-950 bg-white" 89 > 90 <ProfilePostComponent 91 key={`/profile/${did}/post/${rkey}`}