tangled
alpha
login
or
join now
whey.party
/
red-dwarf
82
fork
atom
an independent Bluesky client using Constellation, PDS Queries, and other services
reddwarf.app
frontend
spa
bluesky
reddwarf
microcosm
client
app
82
fork
atom
overview
issues
25
pulls
pipelines
tablet support for nav bar
rimar1337
4 months ago
a798ba8c
0f2b0196
+119
-9
1 changed file
expand all
collapse all
unified
split
src
routes
__root.tsx
+119
-9
src/routes/__root.tsx
···
415
415
</div>
416
416
</nav>
417
417
418
418
+
<nav className="hidden sm:flex items-center lg:hidden h-screen flex-col gap-0 p-4 dark:border-gray-800 sticky top-0 self-start">
419
419
+
<div className="flex items-center gap-3 mb-4">
420
420
+
<img src="/redstar.png" alt="Red Dwarf Logo" className="w-8 h-8" />
421
421
+
</div>
422
422
+
<MaterialNavItem
423
423
+
small
424
424
+
InactiveIcon={
425
425
+
<IconMaterialSymbolsHomeOutline className="w-6 h-6" />
426
426
+
}
427
427
+
ActiveIcon={<IconMaterialSymbolsHome className="w-6 h-6" />}
428
428
+
active={isHome}
429
429
+
onClickCallbback={() =>
430
430
+
navigate({
431
431
+
to: "/",
432
432
+
//params: { did: agent.assertDid },
433
433
+
})
434
434
+
}
435
435
+
text="Home"
436
436
+
/>
437
437
+
438
438
+
<MaterialNavItem
439
439
+
small
440
440
+
InactiveIcon={
441
441
+
<IconMaterialSymbolsNotificationsOutline className="w-6 h-6" />
442
442
+
}
443
443
+
ActiveIcon={
444
444
+
<IconMaterialSymbolsNotifications className="w-6 h-6" />
445
445
+
}
446
446
+
active={isNotifications}
447
447
+
onClickCallbback={() =>
448
448
+
navigate({
449
449
+
to: "/notifications",
450
450
+
//params: { did: agent.assertDid },
451
451
+
})
452
452
+
}
453
453
+
text="Notifications"
454
454
+
/>
455
455
+
<MaterialNavItem
456
456
+
small
457
457
+
InactiveIcon={<IconMaterialSymbolsTag className="w-6 h-6" />}
458
458
+
ActiveIcon={<IconMaterialSymbolsTag className="w-6 h-6" />}
459
459
+
active={location.pathname.startsWith("/feeds")}
460
460
+
onClickCallbback={() =>
461
461
+
navigate({
462
462
+
to: "/feeds",
463
463
+
//params: { did: agent.assertDid },
464
464
+
})
465
465
+
}
466
466
+
text="Feeds"
467
467
+
/>
468
468
+
<MaterialNavItem
469
469
+
small
470
470
+
InactiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />}
471
471
+
ActiveIcon={<IconMaterialSymbolsSearch className="w-6 h-6" />}
472
472
+
active={location.pathname.startsWith("/search")}
473
473
+
onClickCallbback={() =>
474
474
+
navigate({
475
475
+
to: "/search",
476
476
+
//params: { did: agent.assertDid },
477
477
+
})
478
478
+
}
479
479
+
text="Search"
480
480
+
/>
481
481
+
<MaterialNavItem
482
482
+
small
483
483
+
InactiveIcon={
484
484
+
<IconMaterialSymbolsAccountCircleOutline className="w-6 h-6" />
485
485
+
}
486
486
+
ActiveIcon={
487
487
+
<IconMaterialSymbolsAccountCircle className="w-6 h-6" />
488
488
+
}
489
489
+
active={isProfile ?? false}
490
490
+
onClickCallbback={() => {
491
491
+
if (authed && agent && agent.assertDid) {
492
492
+
//window.location.href = `/profile/${agent.assertDid}`;
493
493
+
navigate({
494
494
+
to: "/profile/$did",
495
495
+
params: { did: agent.assertDid },
496
496
+
});
497
497
+
}
498
498
+
}}
499
499
+
text="Profile"
500
500
+
/>
501
501
+
<MaterialNavItem
502
502
+
small
503
503
+
InactiveIcon={
504
504
+
<IconMaterialSymbolsSettingsOutline className="w-6 h-6" />
505
505
+
}
506
506
+
ActiveIcon={<IconMaterialSymbolsSettings className="w-6 h-6" />}
507
507
+
active={location.pathname.startsWith("/settings")}
508
508
+
onClickCallbback={() =>
509
509
+
navigate({
510
510
+
to: "/settings",
511
511
+
//params: { did: agent.assertDid },
512
512
+
})
513
513
+
}
514
514
+
text="Settings"
515
515
+
/>
516
516
+
<div className="flex flex-row items-center justify-center mt-3">
517
517
+
<MaterialPillButton
518
518
+
small
519
519
+
InactiveIcon={<IconMdiPencilOutline className="w-6 h-6" />}
520
520
+
ActiveIcon={<IconMdiPencilOutline className="w-6 h-6" />}
521
521
+
//active={true}
522
522
+
onClickCallbback={() => setPostOpen(true)}
523
523
+
text="Post"
524
524
+
/>
525
525
+
</div>
526
526
+
</nav>
527
527
+
418
528
{agent?.did && (
419
529
<button
420
530
className="lg:hidden fixed bottom-22 right-4 z-50 bg-gray-200 dark:bg-gray-800 hover:bg-gray-300 dark:hover:bg-gray-700 rounded-2xl w-14 h-14 flex items-center justify-center transition-all"
···
431
541
</button>
432
542
)}
433
543
434
434
-
<main className="w-full max-w-[600px] lg:border-x border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-950 pb-16 lg:pb-0 overflow-x-clip">
544
544
+
<main className="w-full max-w-[600px] sm:border-x border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-950 pb-16 lg:pb-0 overflow-x-clip">
435
545
{children}
436
546
</main>
437
547
···
448
558
</div>
449
559
450
560
{agent?.did ? (
451
451
-
<nav className="lg:hidden fixed bottom-0 left-0 right-0 bg-gray-50 dark:bg-gray-900 border-0 shadow border-gray-200 dark:border-gray-700 z-40">
561
561
+
<nav className="sm:hidden fixed bottom-0 left-0 right-0 bg-gray-50 dark:bg-gray-900 border-0 shadow border-gray-200 dark:border-gray-700 z-40">
452
562
<div className="flex justify-around items-center p-2">
453
563
<MaterialNavItem
454
564
small
···
651
761
text: string;
652
762
active: boolean;
653
763
onClickCallbback: () => void;
654
654
-
small?: boolean;
764
764
+
small?: boolean | string;
655
765
}) {
656
766
if (small)
657
767
return (
658
768
<button
659
659
-
className={`flex flex-col items-center rounded-lg transition-colors flex-1 gap-1 ${
769
769
+
className={`flex flex-col items-center rounded-lg transition-colors ${small} gap-1 ${
660
770
active
661
771
? "text-gray-900 dark:text-gray-100"
662
772
: "text-gray-600 dark:text-gray-400"
···
714
824
text: string;
715
825
//active: boolean;
716
826
onClickCallbback: () => void;
717
717
-
small?: boolean;
827
827
+
small?: boolean | string;
718
828
}) {
719
829
const active = false;
720
830
return (
721
831
<button
722
722
-
className={`flex border border-gray-400 dark:border-gray-400 flex-row h-12 min-h-12 max-h-12 px-4 py-0.5 items-center rounded-full transition-colors gap-1 ${
832
832
+
className={`flex border border-gray-400 dark:border-gray-400 flex-row h-12 min-h-12 max-h-12 ${small ? "p-3 w-12" : "px-4 py-0.5"} items-center rounded-full transition-colors gap-1 ${
723
833
active
724
834
? "text-gray-900 dark:text-gray-100 hover:bg-gray-300 dark:bg-gray-700 bg-gray-200 hover:dark:bg-gray-600"
725
835
: "text-gray-600 dark:text-gray-400 hover:bg-gray-100 hover:dark:bg-gray-800"
···
728
838
onClickCallbback();
729
839
}}
730
840
>
731
731
-
<div className={`mr-2 ${active ? " " : " "}`}>
841
841
+
<div className={`${!small && "mr-2"} ${active ? " " : " "}`}>
732
842
{active ? ActiveIcon : InactiveIcon}
733
843
</div>
734
734
-
<span
844
844
+
{!small && (<span
735
845
className={`text-[17px] text-roboto ${active ? "font-medium" : ""}`}
736
846
>
737
847
{text}
738
738
-
</span>
848
848
+
</span>)}
739
849
</button>
740
850
);
741
851
}