fix: order by last updated, cycles empty state alignment (#1151)
* fix: order by last updated * fix: cycles empty space alignment, chore: new meta tags * chore: update meta tags
This commit is contained in:
parent
022960d7e3
commit
26ba4d71c3
26 changed files with 119 additions and 297 deletions
|
|
@ -21,12 +21,7 @@ export const NotAuthorizedView: React.FC<Props> = ({ actionButton, type }) => {
|
|||
const { asPath: currentPath } = useRouter();
|
||||
|
||||
return (
|
||||
<DefaultLayout
|
||||
meta={{
|
||||
title: "Plane - Not Authorized",
|
||||
description: "You are not authorized to view this page",
|
||||
}}
|
||||
>
|
||||
<DefaultLayout>
|
||||
<div className="flex h-full w-full flex-col items-center justify-center gap-y-5 bg-brand-surface-1 text-center">
|
||||
<div className="h-44 w-72">
|
||||
<Image
|
||||
|
|
|
|||
|
|
@ -1,44 +1,34 @@
|
|||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
// layouts
|
||||
import DefaultLayout from "layouts/default-layout";
|
||||
// ui
|
||||
import { PrimaryButton, SecondaryButton } from "components/ui";
|
||||
|
||||
export const NotAWorkspaceMember = () => {
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<DefaultLayout
|
||||
meta={{
|
||||
title: "Plane - Unauthorized User",
|
||||
description: "Unauthorized user",
|
||||
}}
|
||||
>
|
||||
<div className="grid h-full place-items-center p-4">
|
||||
<div className="space-y-8 text-center">
|
||||
<div className="space-y-2">
|
||||
<h3 className="text-lg font-semibold">Not Authorized!</h3>
|
||||
<p className="mx-auto w-1/2 text-sm text-brand-secondary">
|
||||
You{"'"}re not a member of this workspace. Please contact the workspace admin to get
|
||||
an invitation or check your pending invitations.
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<Link href="/invitations">
|
||||
<a>
|
||||
<SecondaryButton>Check pending invites</SecondaryButton>
|
||||
</a>
|
||||
</Link>
|
||||
<Link href="/create-workspace">
|
||||
<a>
|
||||
<PrimaryButton>Create new workspace</PrimaryButton>
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
export const NotAWorkspaceMember = () => (
|
||||
<DefaultLayout>
|
||||
<div className="grid h-full place-items-center p-4">
|
||||
<div className="space-y-8 text-center">
|
||||
<div className="space-y-2">
|
||||
<h3 className="text-lg font-semibold">Not Authorized!</h3>
|
||||
<p className="mx-auto w-1/2 text-sm text-brand-secondary">
|
||||
You{"'"}re not a member of this workspace. Please contact the workspace admin to get an
|
||||
invitation or check your pending invitations.
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<Link href="/invitations">
|
||||
<a>
|
||||
<SecondaryButton>Check pending invites</SecondaryButton>
|
||||
</a>
|
||||
</Link>
|
||||
<Link href="/create-workspace">
|
||||
<a>
|
||||
<PrimaryButton>Create new workspace</PrimaryButton>
|
||||
</a>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</DefaultLayout>
|
||||
);
|
||||
};
|
||||
</div>
|
||||
</DefaultLayout>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -165,15 +165,10 @@ export const SubIssuesList: FC<Props> = ({ parentIssue }) => {
|
|||
});
|
||||
};
|
||||
|
||||
const completedSubIssues =
|
||||
subIssuesResponse && subIssuesResponse.state_distribution
|
||||
? (subIssuesResponse?.state_distribution.completed
|
||||
? subIssuesResponse?.state_distribution.completed
|
||||
: 0) +
|
||||
(subIssuesResponse?.state_distribution.cancelled
|
||||
? subIssuesResponse?.state_distribution.cancelled
|
||||
: 0)
|
||||
: 0;
|
||||
const completedSubIssues = subIssuesResponse
|
||||
? subIssuesResponse?.state_distribution.completed +
|
||||
subIssuesResponse?.state_distribution.cancelled
|
||||
: 0;
|
||||
|
||||
const totalSubIssues =
|
||||
subIssuesResponse && subIssuesResponse.sub_issues ? subIssuesResponse?.sub_issues.length : 0;
|
||||
|
|
@ -278,7 +273,7 @@ export const SubIssuesList: FC<Props> = ({ parentIssue }) => {
|
|||
key={issue.id}
|
||||
href={`/${workspaceSlug}/projects/${projectId}/issues/${issue.id}`}
|
||||
>
|
||||
<a className="group flex items-center justify-between gap-2 rounded p-2 hover:bg-brand-surface-1">
|
||||
<a className="group flex items-center justify-between gap-2 rounded p-2 hover:bg-brand-base">
|
||||
<div className="flex items-center gap-2 rounded text-xs">
|
||||
<span
|
||||
className="block h-1.5 w-1.5 flex-shrink-0 rounded-full"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue