mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
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:
53
web/ce/constants/dashboard.ts
Normal file
53
web/ce/constants/dashboard.ts
Normal 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,
|
||||
},
|
||||
];
|
||||
@@ -1,4 +1,5 @@
|
||||
// helpers
|
||||
import { cn } from "@plane/editor";
|
||||
import { getFileURL } from "@/helpers/file.helper";
|
||||
|
||||
type Props = {
|
||||
@@ -9,9 +10,11 @@ type Props = {
|
||||
|
||||
export const WorkspaceLogo = (props: Props) => (
|
||||
<div
|
||||
className={`relative grid h-6 w-6 flex-shrink-0 place-items-center uppercase ${
|
||||
!props.logo && "rounded bg-custom-primary-500 text-white"
|
||||
} ${props.classNames ? props.classNames : ""}`}
|
||||
className={cn(
|
||||
`relative grid h-6 w-6 flex-shrink-0 place-items-center uppercase ${
|
||||
!props.logo && "rounded bg-custom-primary-500 text-white"
|
||||
} ${props.classNames ? props.classNames : ""}`
|
||||
)}
|
||||
>
|
||||
{props.logo && props.logo !== "" ? (
|
||||
<img
|
||||
|
||||
@@ -9,13 +9,14 @@ import { Tooltip } from "@plane/ui";
|
||||
import { SidebarNavItem } from "@/components/sidebar";
|
||||
import { NotificationAppSidebarOption } from "@/components/workspace-notifications";
|
||||
// constants
|
||||
import { SIDEBAR_USER_MENU_ITEMS } from "@/constants/dashboard";
|
||||
import { SIDEBAR_CLICKED } from "@/constants/event-tracker";
|
||||
// helpers
|
||||
import { cn } from "@/helpers/common.helper";
|
||||
// hooks
|
||||
import { useAppTheme, useEventTracker, useUser, useUserPermissions } from "@/hooks/store";
|
||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||
|
||||
import { SIDEBAR_USER_MENU_ITEMS } from "@/plane-web/constants/dashboard";
|
||||
import { EUserPermissionsLevel } from "@/plane-web/constants/user-permissions";
|
||||
|
||||
export const SidebarUserMenu = observer(() => {
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
import { linearGradientDef } from "@nivo/core";
|
||||
// icons
|
||||
import { BarChart2, Briefcase, Home, Inbox, Layers, PenSquare } from "lucide-react";
|
||||
import { BarChart2, Briefcase, Layers } from "lucide-react";
|
||||
// types
|
||||
import { TIssuesListTypes, TStateGroups } from "@plane/types";
|
||||
// ui
|
||||
import { ContrastIcon, UserActivityIcon } from "@plane/ui";
|
||||
import { ContrastIcon } from "@plane/ui";
|
||||
import { Props } from "@/components/icons/types";
|
||||
import { EUserPermissions } from "@/plane-web/constants/user-permissions";
|
||||
// assets
|
||||
@@ -292,49 +292,6 @@ export const SIDEBAR_WORKSPACE_MENU_ITEMS: {
|
||||
},
|
||||
];
|
||||
|
||||
type TLinkOptions = {
|
||||
export type TLinkOptions = {
|
||||
userId: string | undefined;
|
||||
};
|
||||
|
||||
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,
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user