2024-01-24 14:07:49 +00:00
|
|
|
import React from "react";
|
|
|
|
import { observer } from "mobx-react";
|
2024-03-06 13:09:14 +00:00
|
|
|
import Image from "next/image";
|
2024-01-24 14:07:49 +00:00
|
|
|
// icons
|
|
|
|
import { Crown } from "lucide-react";
|
2024-03-06 13:09:14 +00:00
|
|
|
// ui
|
|
|
|
import { getButtonStyling } from "@plane/ui";
|
2024-01-24 14:07:49 +00:00
|
|
|
// constants
|
2024-03-19 14:38:35 +00:00
|
|
|
import { WORKSPACE_ACTIVE_CYCLES_DETAILS } from "@/constants/cycle";
|
2024-03-06 13:09:14 +00:00
|
|
|
// helper
|
2024-03-19 14:38:35 +00:00
|
|
|
import { cn } from "@/helpers/common.helper";
|
2024-03-06 13:09:14 +00:00
|
|
|
// hooks
|
2024-03-19 14:38:35 +00:00
|
|
|
import { useUser } from "@/hooks/store";
|
2024-01-24 14:07:49 +00:00
|
|
|
|
|
|
|
export const WorkspaceActiveCyclesUpgrade = observer(() => {
|
|
|
|
// store hooks
|
2024-04-29 06:42:33 +00:00
|
|
|
const {
|
|
|
|
profile: { data: userProfile },
|
|
|
|
} = useUser();
|
2024-01-24 14:07:49 +00:00
|
|
|
|
2024-04-29 06:42:33 +00:00
|
|
|
const isDarkMode = userProfile?.theme.theme === "dark";
|
2024-01-24 14:07:49 +00:00
|
|
|
|
|
|
|
return (
|
2024-04-29 06:42:33 +00:00
|
|
|
<div className="vertical-scrollbar scrollbar-lg flex h-full flex-col gap-10 rounded-xl px-8 pt-8">
|
2024-01-24 14:07:49 +00:00
|
|
|
<div
|
2024-04-29 06:42:33 +00:00
|
|
|
className={cn("item-center flex min-h-[25rem] justify-between rounded-xl", {
|
|
|
|
"bg-gradient-to-l from-[#CFCFCF] to-[#212121]": userProfile?.theme.theme === "dark",
|
|
|
|
"bg-gradient-to-l from-[#3b5ec6] to-[#f5f7fe]": userProfile?.theme.theme === "light",
|
2024-01-24 14:07:49 +00:00
|
|
|
})}
|
|
|
|
>
|
2024-04-29 06:42:33 +00:00
|
|
|
<div className="relative flex flex-col justify-center gap-7 px-14 lg:w-1/2">
|
|
|
|
<div className="flex max-w-64 flex-col gap-2">
|
2024-01-24 14:07:49 +00:00
|
|
|
<h2 className="text-2xl font-semibold">On-demand snapshots of all your cycles</h2>
|
|
|
|
<p className="text-base font-medium text-custom-text-300">
|
|
|
|
Monitor cycles across projects, track high-priority issues, and zoom in cycles that need attention.
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div className="flex items-center gap-3">
|
|
|
|
<a
|
|
|
|
className={`${getButtonStyling("primary", "md")} cursor-pointer`}
|
|
|
|
href="https://plane.so/pricing"
|
|
|
|
target="_blank"
|
|
|
|
rel="noreferrer"
|
|
|
|
>
|
|
|
|
<Crown className="h-3.5 w-3.5" />
|
|
|
|
Upgrade
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<span className="absolute left-0 top-0">
|
|
|
|
<Image
|
|
|
|
src={`/workspace-active-cycles/cta-l-1-${isDarkMode ? "dark" : "light"}.webp`}
|
|
|
|
height={125}
|
|
|
|
width={125}
|
|
|
|
className="rounded-xl"
|
|
|
|
alt="l-1"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</div>
|
2024-04-29 06:42:33 +00:00
|
|
|
<div className="relative hidden w-1/2 lg:block">
|
|
|
|
<span className="absolute bottom-0 right-0">
|
2024-01-24 14:07:49 +00:00
|
|
|
<Image
|
|
|
|
src={`/workspace-active-cycles/cta-r-1-${isDarkMode ? "dark" : "light"}.webp`}
|
|
|
|
height={420}
|
|
|
|
width={500}
|
|
|
|
alt="r-1"
|
|
|
|
/>
|
|
|
|
</span>
|
2024-04-29 06:42:33 +00:00
|
|
|
<span className="absolute -bottom-16 right-1/2 rounded-xl">
|
2024-01-24 14:07:49 +00:00
|
|
|
<Image
|
|
|
|
src={`/workspace-active-cycles/cta-r-2-${isDarkMode ? "dark" : "light"}.webp`}
|
|
|
|
height={210}
|
|
|
|
width={280}
|
|
|
|
alt="r-2"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-04-29 06:42:33 +00:00
|
|
|
<div className="grid h-full grid-cols-1 gap-5 pb-8 lg:grid-cols-2 xl:grid-cols-3">
|
2024-01-24 14:07:49 +00:00
|
|
|
{WORKSPACE_ACTIVE_CYCLES_DETAILS.map((item) => (
|
2024-04-29 06:42:33 +00:00
|
|
|
<div key={item.title} className="flex min-h-32 w-full flex-col gap-2 rounded-md bg-custom-background-80 p-4">
|
2024-01-24 14:07:49 +00:00
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
<h3 className="font-medium">{item.title}</h3>
|
2024-04-29 06:42:33 +00:00
|
|
|
<item.icon className="h-4 w-4 text-blue-500" />
|
2024-01-24 14:07:49 +00:00
|
|
|
</div>
|
|
|
|
<span className="text-sm text-custom-text-300">{item.description}</span>
|
|
|
|
</div>
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
});
|