[WEB-3422] fix: app sidebar fixes and improvements (#6633)

* chore: app sidebar improvements

* chore: overview icon updated
This commit is contained in:
Anmol Singh Bhatia 2025-02-18 20:49:17 +05:30 committed by GitHub
parent 1478e66dc4
commit 23b0d4339d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 49 additions and 43 deletions

View file

@ -14,6 +14,7 @@ import { CreateProjectModal } from "@/components/project";
import { SidebarProjectsListItem } from "@/components/workspace";
// hooks
import { orderJoinedProjects } from "@/helpers/project.helper";
import { copyUrlToClipboard } from "@/helpers/string.helper";
import { useAppTheme, useProject, useUserPermissions } from "@/hooks/store";
import useExtendedSidebarOutsideClickDetector from "@/hooks/use-extended-sidebar-overview-outside-click";
import { TProject } from "@/plane-web/types";
@ -85,6 +86,15 @@ export const ExtendedProjectSidebar = observer(() => {
"extended-project-sidebar-toggle"
);
const handleCopyText = (projectId: string) => {
copyUrlToClipboard(`${workspaceSlug}/projects/${projectId}/issues`).then(() => {
setToast({
type: TOAST_TYPE.SUCCESS,
title: t("link_copied"),
message: t("project_link_copied_to_clipboard"),
});
});
};
return (
<>
{workspaceSlug && (
@ -140,7 +150,7 @@ export const ExtendedProjectSidebar = observer(() => {
<SidebarProjectsListItem
key={projectId}
projectId={projectId}
handleCopyText={() => {}}
handleCopyText={() => handleCopyText(projectId)}
projectListType={"JOINED"}
disableDrag={false}
disableDrop={false}