-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Revamp mobile UI #10103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Revamp mobile UI #10103
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9e3c965
Simplify nav components
NickM-27 8d8494d
Allow ability to choose live layout on mobile
NickM-27 a6bb39f
Combine event views
NickM-27 d93acbc
Undo vite
NickM-27 535c0ac
Fix autoplay
NickM-27 b707901
Remove import
NickM-27 6aae93c
Show filters on mobile view
NickM-27 7f39afe
Spacing
NickM-27 4d0ec13
Don't separate properties
NickM-27 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { navbarLinks } from "@/pages/site-navigation"; | ||
import NavItem from "./NavItem"; | ||
import SettingsNavItems from "../settings/SettingsNavItems"; | ||
|
||
function Bottombar() { | ||
return ( | ||
<div className="absolute h-16 left-4 bottom-0 right-4 flex flex-row items-center justify-between"> | ||
{navbarLinks.map((item) => ( | ||
<NavItem | ||
className="" | ||
variant="secondary" | ||
key={item.id} | ||
Icon={item.icon} | ||
title={item.title} | ||
url={item.url} | ||
dev={item.dev} | ||
/> | ||
))} | ||
<SettingsNavItems className="flex flex-shrink-0 justify-between gap-4" /> | ||
</div> | ||
); | ||
} | ||
|
||
// | ||
|
||
export default Bottombar; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { IconType } from "react-icons"; | ||
import { NavLink } from "react-router-dom"; | ||
import { ENV } from "@/env"; | ||
import { | ||
Tooltip, | ||
TooltipContent, | ||
TooltipTrigger, | ||
} from "@/components/ui/tooltip"; | ||
|
||
const variants = { | ||
primary: { | ||
active: "font-bold text-primary-foreground bg-primary", | ||
inactive: "text-muted-foreground bg-muted", | ||
}, | ||
secondary: { | ||
active: "font-bold text-primary", | ||
inactive: "text-muted-foreground", | ||
}, | ||
}; | ||
|
||
type NavItemProps = { | ||
className: string; | ||
variant?: "primary" | "secondary"; | ||
Icon: IconType; | ||
title: string; | ||
url: string; | ||
dev?: boolean; | ||
onClick?: () => void; | ||
}; | ||
|
||
export default function NavItem({ | ||
className, | ||
variant = "primary", | ||
Icon, | ||
title, | ||
url, | ||
dev, | ||
onClick, | ||
}: NavItemProps) { | ||
const shouldRender = dev ? ENV !== "production" : true; | ||
|
||
return ( | ||
shouldRender && ( | ||
<Tooltip> | ||
<NavLink | ||
to={url} | ||
onClick={onClick} | ||
className={({ isActive }) => | ||
`${className} flex flex-col justify-center items-center rounded-lg ${ | ||
variants[variant][isActive ? "active" : "inactive"] | ||
}` | ||
} | ||
> | ||
<TooltipTrigger> | ||
<Icon className="w-5 h-5 m-[6px]" /> | ||
</TooltipTrigger> | ||
</NavLink> | ||
<TooltipContent side="right"> | ||
<p>{title}</p> | ||
</TooltipContent> | ||
</Tooltip> | ||
) | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Logo from "../Logo"; | ||
import { navbarLinks } from "@/pages/site-navigation"; | ||
import SettingsNavItems from "../settings/SettingsNavItems"; | ||
import NavItem from "./NavItem"; | ||
|
||
function Sidebar() { | ||
return ( | ||
<aside className="w-[52px] z-10 h-screen sticky top-0 overflow-y-auto scrollbar-hidden py-4 flex flex-col justify-between"> | ||
<span tabIndex={0} className="sr-only" /> | ||
<div className="w-full flex flex-col gap-0 items-center"> | ||
<Logo className="w-8 h-8 mb-6" /> | ||
{navbarLinks.map((item) => ( | ||
<NavItem | ||
className="mx-[10px] mb-6" | ||
key={item.id} | ||
Icon={item.icon} | ||
title={item.title} | ||
url={item.url} | ||
dev={item.dev} | ||
/> | ||
))} | ||
</div> | ||
<SettingsNavItems className="hidden md:flex flex-col items-center mb-8" /> | ||
</aside> | ||
); | ||
} | ||
|
||
export default Sidebar; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.