feat: Pi chat (#5933)

* fix: added pi chat

* fix: added bot

* fix: removed pi chat from community version

* fix: removed unwanted files

* fix: removed unused import
This commit is contained in:
Akshita Goyal 2024-11-05 15:16:58 +05:30 committed by GitHub
parent f205d72782
commit 9309d1b574
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 86 additions and 50 deletions

View file

@ -0,0 +1,53 @@
"use client";
// icons
import { Home, Inbox, PenSquare } from "lucide-react";
// ui
import { UserActivityIcon } from "@plane/ui";
import { Props } from "@/components/icons/types";
import { TLinkOptions } from "@/constants/dashboard";
import { EUserPermissions } from "@/plane-web/constants/user-permissions";
export const SIDEBAR_USER_MENU_ITEMS: {
key: string;
label: string;
href: string;
access: EUserPermissions[];
highlight: (pathname: string, baseUrl: string, options?: TLinkOptions) => boolean;
Icon: React.FC<Props>;
}[] = [
{
key: "home",
label: "Home",
href: ``,
access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER, EUserPermissions.GUEST],
highlight: (pathname: string, baseUrl: string) => pathname === `${baseUrl}/`,
Icon: Home,
},
{
key: "your-work",
label: "Your work",
href: "/profile",
access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER],
highlight: (pathname: string, baseUrl: string, options?: TLinkOptions) =>
options?.userId ? pathname.includes(`${baseUrl}/profile/${options?.userId}`) : false,
Icon: UserActivityIcon,
},
{
key: "notifications",
label: "Inbox",
href: `/notifications`,
access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER, EUserPermissions.GUEST],
highlight: (pathname: string, baseUrl: string) => pathname.includes(`${baseUrl}/notifications/`),
Icon: Inbox,
},
{
key: "drafts",
label: "Drafts",
href: `/drafts`,
access: [EUserPermissions.ADMIN, EUserPermissions.MEMBER],
highlight: (pathname: string, baseUrl: string) => pathname.includes(`${baseUrl}/drafts/`),
Icon: PenSquare,
},
];