[WEB-5608] chore: Hide "Pro" Features in Community Edition (#8288)
* chore: Hide "Pro" Features in Community Edition * refactor: remove time tracking feature and simplify project features list
This commit is contained in:
parent
639a2aab41
commit
7124e8e7ce
4 changed files with 31 additions and 78 deletions
|
|
@ -1,10 +1,6 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Pen, Trash } from "lucide-react";
|
||||
import { Trash } from "lucide-react";
|
||||
import { PROJECT_SETTINGS_TRACKER_ELEMENTS } from "@plane/constants";
|
||||
import { Tooltip } from "@plane/propel/tooltip";
|
||||
// components
|
||||
import { ProIcon } from "@/components/common/pro-icon";
|
||||
|
||||
type TEstimateListItem = {
|
||||
estimateId: string;
|
||||
|
|
@ -21,22 +17,6 @@ export const EstimateListItemButtons = observer(function EstimateListItemButtons
|
|||
if (!isAdmin || !isEditable) return <></>;
|
||||
return (
|
||||
<div className="relative flex items-center gap-1">
|
||||
<Tooltip
|
||||
tooltipContent={
|
||||
<div className="relative flex items-center gap-2">
|
||||
<div>Upgrade</div>
|
||||
<ProIcon className="w-3 h-3" />
|
||||
</div>
|
||||
}
|
||||
position="top"
|
||||
>
|
||||
<button
|
||||
className="relative flex-shrink-0 w-6 h-6 flex justify-center items-center rounded cursor-pointer transition-colors overflow-hidden hover:bg-custom-background-80"
|
||||
data-ph-element={PROJECT_SETTINGS_TRACKER_ELEMENTS.ESTIMATES_LIST_ITEM}
|
||||
>
|
||||
<Pen size={12} />
|
||||
</button>
|
||||
</Tooltip>
|
||||
<button
|
||||
className="relative flex-shrink-0 w-6 h-6 flex justify-center items-center rounded cursor-pointer transition-colors overflow-hidden hover:bg-custom-background-80"
|
||||
onClick={() => onDeleteClick && onDeleteClick(estimateId)}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import type { ReactNode } from "react";
|
||||
import { Timer } from "lucide-react";
|
||||
// plane imports
|
||||
import { CycleIcon, IntakeIcon, ModuleIcon, PageIcon, ViewsIcon } from "@plane/propel/icons";
|
||||
import type { IProject } from "@plane/types";
|
||||
|
|
@ -17,7 +16,6 @@ export type TProperties = {
|
|||
};
|
||||
|
||||
type TProjectBaseFeatureKeys = "cycles" | "modules" | "views" | "pages" | "inbox";
|
||||
type TProjectOtherFeatureKeys = "is_time_tracking_enabled";
|
||||
|
||||
type TBaseFeatureList = {
|
||||
[key in TProjectBaseFeatureKeys]: TProperties;
|
||||
|
|
@ -71,22 +69,6 @@ export const PROJECT_BASE_FEATURES_LIST: TBaseFeatureList = {
|
|||
},
|
||||
};
|
||||
|
||||
type TOtherFeatureList = {
|
||||
[key in TProjectOtherFeatureKeys]: TProperties;
|
||||
};
|
||||
|
||||
export const PROJECT_OTHER_FEATURES_LIST: TOtherFeatureList = {
|
||||
is_time_tracking_enabled: {
|
||||
key: "time_tracking",
|
||||
property: "is_time_tracking_enabled",
|
||||
title: "Time Tracking",
|
||||
description: "Log time, see timesheets, and download full CSVs for your entire workspace.",
|
||||
icon: <Timer className="h-5 w-5 flex-shrink-0 text-custom-text-300" />,
|
||||
isPro: true,
|
||||
isEnabled: false,
|
||||
},
|
||||
};
|
||||
|
||||
type TProjectFeatures = {
|
||||
project_features: {
|
||||
key: string;
|
||||
|
|
@ -94,12 +76,6 @@ type TProjectFeatures = {
|
|||
description: string;
|
||||
featureList: TBaseFeatureList;
|
||||
};
|
||||
project_others: {
|
||||
key: string;
|
||||
title: string;
|
||||
description: string;
|
||||
featureList: TOtherFeatureList;
|
||||
};
|
||||
};
|
||||
|
||||
export const PROJECT_FEATURES_LIST: TProjectFeatures = {
|
||||
|
|
@ -109,10 +85,4 @@ export const PROJECT_FEATURES_LIST: TProjectFeatures = {
|
|||
description: "Toggle these on or off this project.",
|
||||
featureList: PROJECT_BASE_FEATURES_LIST,
|
||||
},
|
||||
project_others: {
|
||||
key: "work_management",
|
||||
title: "Work management",
|
||||
description: "Available only on some plans as indicated by the label next to the feature below.",
|
||||
featureList: PROJECT_OTHER_FEATURES_LIST,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue