Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions apps/webapp/app/components/navigation/ProjectSideMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
organizationTeamPath,
projectEnvironmentsPath,
projectIntegrationsPath,
projectSetupPath,
projectPath,
projectSetupPath,
projectTriggersPath,
} from "~/utils/pathBuilder";
import { UserProfilePhoto } from "../UserProfilePhoto";
Expand Down Expand Up @@ -96,7 +96,7 @@ export function ProjectSideMenu() {
data-action="environments & api keys"
/>
</div>
<div className="flex flex-col">
<div className="flex flex-col gap-1">
<SideMenuItem
name="Team"
icon="team"
Expand All @@ -118,6 +118,14 @@ export function ProjectSideMenu() {
isCollapsed={isCollapsed}
data-action="onboarding"
/>
<SideMenuItem
name="Homepage"
icon="external-link"
to="https://trigger.dev"
isCollapsed={isCollapsed}
data-action="onboarding"
target="_blank"
/>
<SideMenuItem
name="Account"
icon={UserProfilePhoto}
Expand Down Expand Up @@ -146,13 +154,15 @@ function SideMenuItem({
isCollapsed,
forceActive,
hasWarning = false,
target,
}: {
icon: IconNames | React.ComponentType<any>;
name: string;
to: string;
isCollapsed: boolean;
hasWarning?: boolean;
forceActive?: boolean;
target?: string;
}) {
return (
<SimpleTooltip
Expand All @@ -164,13 +174,14 @@ function SideMenuItem({
LeadingIcon={icon}
leadingIconClassName="text-dimmed"
to={to}
target={target}
className={({ isActive, isPending }) => {
if (forceActive !== undefined) {
isActive = forceActive;
}
return cn(
"relative",
isActive
isActive || isPending
? "bg-slate-800 text-bright group-hover:bg-slate-800"
: "text-dimmed group-hover:bg-slate-850 group-hover:text-bright"
);
Expand Down
8 changes: 6 additions & 2 deletions apps/webapp/app/components/primitives/Buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,13 @@ type NavLinkPropsType = Pick<NavLinkProps, "to" | "target"> &
Omit<React.ComponentProps<typeof ButtonContent>, "className"> & {
className?: (props: { isActive: boolean; isPending: boolean }) => string | undefined;
};
export const NavLinkButton = ({ to, className, ...props }: NavLinkPropsType) => {
export const NavLinkButton = ({ to, className, target, ...props }: NavLinkPropsType) => {
return (
<NavLink to={to} className={cn("group outline-none", props.fullWidth ? "w-full" : "")}>
<NavLink
to={to}
className={cn("group outline-none", props.fullWidth ? "w-full" : "")}
target={target}
>
{({ isActive, isPending }) => (
<ButtonContent className={className && className({ isActive, isPending })} {...props} />
)}
Expand Down
5 changes: 5 additions & 0 deletions apps/webapp/app/components/primitives/NamedIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
GlobeAltIcon,
HandRaisedIcon,
HeartIcon,
HomeIcon,
KeyIcon,
LightBulbIcon,
ListBulletIcon,
Expand All @@ -50,6 +51,7 @@ import {
UserGroupIcon,
UserIcon,
UserPlusIcon,
WindowIcon,
WrenchScrewdriverIcon,
XCircleIcon,
XMarkIcon,
Expand All @@ -75,6 +77,8 @@ const icons = {
background: (className: string) => <CloudIcon className={cn("text-sky-400", className)} />,
beaker: (className: string) => <BeakerIcon className={cn("text-purple-500", className)} />,
billing: (className: string) => <CreditCardIcon className={cn("text-teal-500", className)} />,

browser: (className: string) => <WindowIcon className={cn("text-dimmed", className)} />,
calendar: (className: string) => (
<CalendarDaysIcon className={cn("text-purple-500", className)} />
),
Expand Down Expand Up @@ -111,6 +115,7 @@ const icons = {
<HandRaisedIcon className={cn("text-amber-400", className)} />
),
heart: (className: string) => <HeartIcon className={cn("text-rose-500", className)} />,
house: (className: string) => <HomeIcon className={cn("text-dimmed", className)} />,
id: (className: string) => <FingerPrintIcon className={cn("text-rose-200", className)} />,
inactive: (className: string) => <XCircleIcon className={cn("text-rose-500", className)} />,
info: (className: string) => <InformationCircleIcon className={cn("text-blue-500", className)} />,
Expand Down
Loading