[WEB-1702] chore: fix project archives breadcrumbs and minor ui fixes in profile page. (#4916)
* [WEB-1702] chore: fix project archives breadcrumbs. * chore: minor padding fix in profile page. * chore: update archive page breadcrumbs display logic. * chore: add/ update page title.
This commit is contained in:
parent
7c4c777c99
commit
e538bfad1f
9 changed files with 33 additions and 26 deletions
|
|
@ -6,6 +6,7 @@ import { useParams } from "next/navigation";
|
||||||
// ui
|
// ui
|
||||||
import { Button } from "@plane/ui";
|
import { Button } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
|
import { PageHead } from "@/components/core";
|
||||||
import { DownloadActivityButton, WorkspaceActivityListPage } from "@/components/profile";
|
import { DownloadActivityButton, WorkspaceActivityListPage } from "@/components/profile";
|
||||||
// constants
|
// constants
|
||||||
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
||||||
|
|
@ -50,22 +51,25 @@ const ProfileActivityPage = observer(() => {
|
||||||
currentUser?.id === userId && !!currentWorkspaceRole && currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER;
|
currentUser?.id === userId && !!currentWorkspaceRole && currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full w-full flex-col overflow-hidden py-5">
|
<>
|
||||||
<div className="flex items-center justify-between gap-2 px-5 md:px-9">
|
<PageHead title="Profile - Activity" />
|
||||||
<h3 className="text-lg font-medium">Recent activity</h3>
|
<div className="flex h-full w-full flex-col overflow-hidden py-5">
|
||||||
{canDownloadActivity && <DownloadActivityButton />}
|
<div className="flex items-center justify-between gap-2 px-5 md:px-9">
|
||||||
|
<h3 className="text-lg font-medium">Recent activity</h3>
|
||||||
|
{canDownloadActivity && <DownloadActivityButton />}
|
||||||
|
</div>
|
||||||
|
<div className="vertical-scrollbar scrollbar-md flex h-full flex-col overflow-y-auto px-5 md:px-9">
|
||||||
|
{activityPages}
|
||||||
|
{pageCount < totalPages && resultsCount !== 0 && (
|
||||||
|
<div className="flex w-full items-center justify-center text-xs">
|
||||||
|
<Button variant="accent-primary" size="sm" onClick={handleLoadMore}>
|
||||||
|
Load more
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="vertical-scrollbar scrollbar-md flex h-full flex-col overflow-y-auto px-5 md:px-9">
|
</>
|
||||||
{activityPages}
|
|
||||||
{pageCount < totalPages && resultsCount !== 0 && (
|
|
||||||
<div className="flex w-full items-center justify-center text-xs">
|
|
||||||
<Button variant="accent-primary" size="sm" onClick={handleLoadMore}>
|
|
||||||
Load more
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { ProjectArchivesHeader } from "../header";
|
||||||
export default function ProjectArchiveCyclesLayout({ children }: { children: React.ReactNode }) {
|
export default function ProjectArchiveCyclesLayout({ children }: { children: React.ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppHeader header={<ProjectArchivesHeader />} />
|
<AppHeader header={<ProjectArchivesHeader activeTab="cycles" />} />
|
||||||
<ContentWrapper>{children}</ContentWrapper>
|
<ContentWrapper>{children}</ContentWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useParams, usePathname } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
// ui
|
// ui
|
||||||
import { ArchiveIcon, Breadcrumbs, Tooltip } from "@plane/ui";
|
import { ArchiveIcon, Breadcrumbs, Tooltip } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
|
|
@ -15,12 +15,15 @@ import { useIssues, useProject } from "@/hooks/store";
|
||||||
import { useAppRouter } from "@/hooks/use-app-router";
|
import { useAppRouter } from "@/hooks/use-app-router";
|
||||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||||
|
|
||||||
export const ProjectArchivesHeader: FC = observer(() => {
|
type TProps = {
|
||||||
|
activeTab: 'issues' | 'cycles' | 'modules';
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ProjectArchivesHeader: FC<TProps> = observer((props: TProps) => {
|
||||||
|
const { activeTab } = props;
|
||||||
// router
|
// router
|
||||||
const router = useAppRouter();
|
const router = useAppRouter();
|
||||||
const { workspaceSlug, projectId } = useParams();
|
const { workspaceSlug, projectId } = useParams();
|
||||||
const pathname = usePathname();
|
|
||||||
const activeTab = pathname.split("/").pop();
|
|
||||||
// store hooks
|
// store hooks
|
||||||
const {
|
const {
|
||||||
issuesFilter: { issueFilters },
|
issuesFilter: { issueFilters },
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { ProjectArchivesHeader } from "../../header";
|
||||||
export default function ProjectArchiveIssuesLayout({ children }: { children: React.ReactNode }) {
|
export default function ProjectArchiveIssuesLayout({ children }: { children: React.ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppHeader header={<ProjectArchivesHeader />} />
|
<AppHeader header={<ProjectArchivesHeader activeTab="issues" />} />
|
||||||
<ContentWrapper>{children}</ContentWrapper>
|
<ContentWrapper>{children}</ContentWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import { ProjectArchivesHeader } from "../header";
|
||||||
export default function ProjectArchiveModulesLayout({ children }: { children: React.ReactNode }) {
|
export default function ProjectArchiveModulesLayout({ children }: { children: React.ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppHeader header={<ProjectArchivesHeader />} />
|
<AppHeader header={<ProjectArchivesHeader activeTab="modules" />} />
|
||||||
<ContentWrapper>{children}</ContentWrapper>
|
<ContentWrapper>{children}</ContentWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ const ProfileAppearancePage = observer(() => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHead title="Profile - Theme Prefrence" />
|
<PageHead title="Profile - Appearance" />
|
||||||
{userProfile ? (
|
{userProfile ? (
|
||||||
<ProfileSettingContentWrapper>
|
<ProfileSettingContentWrapper>
|
||||||
<ProfileSettingContentHeader title="Appearance" />
|
<ProfileSettingContentHeader title="Appearance" />
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export default function ProfileNotificationPage() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHead title="Profile - Email Preference" />
|
<PageHead title="Profile - Notifications" />
|
||||||
<ProfileSettingContentWrapper>
|
<ProfileSettingContentWrapper>
|
||||||
<ProfileSettingContentHeader
|
<ProfileSettingContentHeader
|
||||||
title="Email notifications"
|
title="Email notifications"
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,7 @@ const ProfileSettingsPage = observer(() => {
|
||||||
</Link> */}
|
</Link> */}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-1 gap-6 md:px-8 lg:grid-cols-2 2xl:grid-cols-3">
|
<div className="grid grid-cols-1 gap-6 md:px-8 lg:grid-cols-2 2xl:grid-cols-3 pb-8">
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
<h4 className="text-sm">
|
<h4 className="text-sm">
|
||||||
First name<span className="text-red-500">*</span>
|
First name<span className="text-red-500">*</span>
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ const SecurityPage = observer(() => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHead title="Profile - Change Password" />
|
<PageHead title="Profile - Security" />
|
||||||
<ProfileSettingContentWrapper>
|
<ProfileSettingContentWrapper>
|
||||||
<ProfileSettingContentHeader title="Change password" />
|
<ProfileSettingContentHeader title="Change password" />
|
||||||
<form onSubmit={handleSubmit(handleChangePassword)} className="flex flex-col gap-8 py-6">
|
<form onSubmit={handleSubmit(handleChangePassword)} className="flex flex-col gap-8 py-6">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue