mirror of
https://github.com/makeplane/plane.git
synced 2025-12-28 16:06:33 +01:00
* dev: initialize feature flagging * dev: feature flagging workspace active cycles * dev: update feature flag implementation * dev: add `FEATURE_FLAG_SERVER_AUTH_TOKEN` env * dev: add feature flagging for backend apis * dev: setup feature flags store and hooks. (#558) * dev: setup feature flags store and hooks. * minor improvements for swr key and flags enum. * dev: workspace active cycles feature flag. (#562) * dev: add task for cancelling the workspace subscription when the workspace is deleted * dev: rename feaure flagging component * dev: update feature flagging function for spaces * dev: add feature flags for bulk ops, issue embeds and page publish. (#589) * dev: add logging for member sync task * dev: restrict workspace from deleting if the subscription is active * dev: workspace delete check endpoint * dev: subscription endpoint check * dev: update subscriptions * chore: plane pro billing and plans page updates. * dev: update pro pill display logic. * dev: fix feature flagging * chore: minor improvement in cloud-badge to avoid API calls to `products` endpoint if user has PRO subscription. --------- Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com> Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
145 lines
3.4 KiB
TypeScript
145 lines
3.4 KiB
TypeScript
import { FC } from "react";
|
|
import { observer } from "mobx-react";
|
|
// helpers
|
|
import { cn } from "@/helpers/common.helper";
|
|
// hooks
|
|
import { useAppTheme } from "@/hooks/store";
|
|
// plane web components
|
|
import { PlanCard, TPlanCard } from "@/plane-web/components/workspace/billing";
|
|
// plane web hooks
|
|
import { useWorkspaceSubscription } from "@/plane-web/hooks/store";
|
|
|
|
const freePlanFeatures = [
|
|
"Unlimited projects",
|
|
"Unlimited issues",
|
|
"Cycles and Modules",
|
|
"Layouts + Views",
|
|
"Pages",
|
|
"Intake",
|
|
];
|
|
|
|
const onePlanFeatures = [
|
|
"OIDC and SAML",
|
|
"Active Cycles",
|
|
"Real-time collab",
|
|
"Limited time tracking",
|
|
"Linked pages",
|
|
"Docker, Kubernetes + more",
|
|
];
|
|
|
|
const proPlanFeatures = [
|
|
"Active Cycles + other Cycles features",
|
|
"Bulk ops",
|
|
"Time tracking",
|
|
"Customizable dashboards",
|
|
"On-demand reports",
|
|
"Shared and public views",
|
|
];
|
|
|
|
const enterprisePlanFeatures = [
|
|
"Unlimited Issues",
|
|
"Unlimited file upload",
|
|
"Priority support",
|
|
"Custom Theming",
|
|
"Access to Roadmap",
|
|
"Plane AI",
|
|
];
|
|
|
|
export const PlaneCloudPlans: FC = observer(() => {
|
|
// hooks
|
|
const { sidebarCollapsed } = useAppTheme();
|
|
const { toggleProPlanModal } = useWorkspaceSubscription();
|
|
|
|
const planePlans: TPlanCard[] = [
|
|
{
|
|
variant: "free",
|
|
planName: "Free",
|
|
isActive: true,
|
|
priceDetails: {
|
|
price: "$0",
|
|
user: "per user",
|
|
duration: "per month",
|
|
},
|
|
callToAction: {
|
|
variant: "link",
|
|
label: "Start for free",
|
|
url: "https://plane.so/pricing",
|
|
},
|
|
features: freePlanFeatures,
|
|
},
|
|
{
|
|
variant: "one",
|
|
planName: "One",
|
|
isActive: false,
|
|
priceDetails: {
|
|
price: "$799",
|
|
user: "100 users",
|
|
duration: "Two years' support",
|
|
},
|
|
callToAction: {
|
|
variant: "link",
|
|
label: "Get One",
|
|
url: "https://plane.so/one",
|
|
},
|
|
baseFeature: "Everything in Free +",
|
|
features: onePlanFeatures,
|
|
},
|
|
{
|
|
variant: "pro",
|
|
planName: "Pro",
|
|
isActive: false,
|
|
priceDetails: {
|
|
price: "$7",
|
|
user: "per user",
|
|
duration: "per month",
|
|
},
|
|
callToAction: {
|
|
variant: "button",
|
|
label: "Get Pro",
|
|
onClick: () => toggleProPlanModal(true),
|
|
},
|
|
baseFeature: "Everything in One +",
|
|
features: proPlanFeatures,
|
|
},
|
|
{
|
|
variant: "enterprise",
|
|
planName: "Enterprise",
|
|
isActive: false,
|
|
priceDetails: {
|
|
price: "Custom",
|
|
},
|
|
callToAction: {
|
|
variant: "link",
|
|
label: "Talk to Sales",
|
|
url: "https://plane.so/contact",
|
|
},
|
|
baseFeature: "Everything in Pro +",
|
|
features: enterprisePlanFeatures,
|
|
},
|
|
];
|
|
|
|
return (
|
|
<div className="grid grid-cols-12 w-full py-8">
|
|
{planePlans.map((plan) => (
|
|
<div
|
|
key={plan.variant}
|
|
className={cn("col-span-12 sm:col-span-6 md:col-span-12 lg:col-span-6", {
|
|
"lg:col-span-6 xl:col-span-3": sidebarCollapsed,
|
|
"lg:col-span-12 xl:col-span-3": !sidebarCollapsed,
|
|
})}
|
|
>
|
|
<PlanCard
|
|
variant={plan.variant}
|
|
planName={plan.planName}
|
|
isActive={plan.isActive}
|
|
priceDetails={plan.priceDetails}
|
|
callToAction={plan.callToAction}
|
|
baseFeature={plan.baseFeature}
|
|
features={plan.features}
|
|
/>
|
|
</div>
|
|
))}
|
|
</div>
|
|
);
|
|
});
|