CURRENT PLAN
diff --git a/frontend/src/components/v2/Button/Button.tsx b/frontend/src/components/v2/Button/Button.tsx
index 5edbbef4c..9635227bd 100644
--- a/frontend/src/components/v2/Button/Button.tsx
+++ b/frontend/src/components/v2/Button/Button.tsx
@@ -16,7 +16,7 @@ const buttonVariants = cva(
'button',
'transition-all',
'font-inter font-medium',
- 'cursor-pointer',
+ 'cursor-default',
'inline-flex items-center justify-center',
'relative',
'whitespace-nowrap'
@@ -24,7 +24,7 @@ const buttonVariants = cva(
{
variants: {
colorSchema: {
- primary: ['bg-primary', 'text-black', 'border-primary bg-opacity-80 hover:bg-opacity-100'],
+ primary: ['bg-primary', 'text-black', 'border-primary bg-opacity-90 hover:bg-opacity-100'],
secondary: ['bg-mineshaft', 'text-gray-300', 'border-mineshaft hover:bg-opacity-80'],
danger: ['bg-red', 'text-white', 'border-red hover:bg-opacity-90'],
gray: ['bg-bunker-500', 'text-bunker-200']
@@ -40,7 +40,7 @@ const buttonVariants = cva(
},
isDisabled: {
true: 'bg-mineshaft-700 border border-mineshaft-600 text-white opacity-50 cursor-not-allowed',
- false: 'border border-primary-400'
+ false: 'border'
},
isFullWidth: {
true: 'w-full',
@@ -111,7 +111,7 @@ const buttonVariants = cva(
{
colorSchema: 'secondary',
variant: 'plain',
- className: 'text-mineshaft-300'
+ className: 'text-mineshaft-300 hover:text-mineshaft-200 border-none'
},
{
colorSchema: 'danger',
diff --git a/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx b/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx
index e991ca3a8..694d6d628 100644
--- a/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx
+++ b/frontend/src/components/v2/UpgradePlanModal/UpgradePlanModal.tsx
@@ -18,7 +18,7 @@ export const UpgradePlanModal = ({ text, isOpen, onOpenChange }: Props): JSX.Ele
href={`/settings/billing/${localStorage.getItem('projectData.id') as string}`}
key="upgrade-plan"
>
-
Upgrade Plan
+
Upgrade Plan
,
@@ -27,8 +27,8 @@ export const UpgradePlanModal = ({ text, isOpen, onOpenChange }: Props): JSX.Ele
]}
>
-
{text}
-
+
{text}
+
Upgrade and get access to this, as well as to other powerful enhancements.
diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsx
index 2ff25d5b1..d40276f5b 100644
--- a/frontend/src/layouts/AppLayout/AppLayout.tsx
+++ b/frontend/src/layouts/AppLayout/AppLayout.tsx
@@ -28,9 +28,11 @@ import {
Modal,
ModalContent,
Select,
- SelectItem
+ SelectItem,
+ UpgradePlanModal
} from '@app/components/v2';
-import { useOrganization, useUser, useWorkspace } from '@app/context';
+import { plans } from '@app/const';
+import { useOrganization, useSubscription, useUser, useWorkspace } from '@app/context';
import { usePopUp } from '@app/hooks';
import { fetchOrgUsers, useAddUserToWs, useCreateWorkspace, useUploadWsKey } from '@app/hooks/api';
import getOrganizations from '@app/pages/api/organization/getOrgs';
@@ -57,13 +59,18 @@ export const AppLayout = ({ children }: LayoutProps) => {
const { workspaces, currentWorkspace } = useWorkspace();
const { currentOrg } = useOrganization();
const { user } = useUser();
+ const { subscriptionPlan } = useSubscription();
+ const host = window.location.origin;
+ const isAddingProjectsAllowed =
+ subscriptionPlan !== plans.starter || (subscriptionPlan === plans.starter && workspaces.length < 3) || host !== 'https://app.infisical.com';
const createWs = useCreateWorkspace();
const uploadWsKey = useUploadWsKey();
const addWsUser = useAddUserToWs();
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
- 'addNewWs'
+ 'addNewWs',
+ 'upgradePlan'
] as const);
const {
control,
@@ -274,7 +281,13 @@ export const AppLayout = ({ children }: LayoutProps) => {
colorSchema="primary"
variant="outline_bg"
size="sm"
- onClick={() => handlePopUpOpen('addNewWs')}
+ onClick={() => {
+ if (isAddingProjectsAllowed) {
+ handlePopUpOpen('addNewWs')
+ } else {
+ handlePopUpOpen('upgradePlan');
+ }
+ }}
leftIcon={
}
>
Add Project
@@ -288,7 +301,13 @@ export const AppLayout = ({ children }: LayoutProps) => {
className="w-full bg-mineshaft-500 py-2 text-bunker-200 hover:bg-primary/90 hover:text-black"
color="mineshaft"
size="sm"
- onClick={() => handlePopUpOpen('addNewWs')}
+ onClick={() => {
+ if (isAddingProjectsAllowed) {
+ handlePopUpOpen('addNewWs')
+ } else {
+ handlePopUpOpen('upgradePlan');
+ }
+ }}
leftIcon={
}
>
Add Project
@@ -464,6 +483,11 @@ export const AppLayout = ({ children }: LayoutProps) => {
+
handlePopUpToggle('upgradePlan', isOpen)}
+ text="You have exceeded the number of projects allowed on the free plan."
+ />
{children}
diff --git a/frontend/src/pages/settings/billing/[id].tsx b/frontend/src/pages/settings/billing/[id].tsx
index e1e909790..6490dc6a3 100644
--- a/frontend/src/pages/settings/billing/[id].tsx
+++ b/frontend/src/pages/settings/billing/[id].tsx
@@ -1,10 +1,10 @@
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import Head from 'next/head';
-import { plans as plansConstant } from 'public/data/frequentConstants';
import Plan from '@app/components/billing/Plan';
import NavHeader from '@app/components/navigation/NavHeader';
+import { plans as plansConstant } from '@app/const';
import getOrganizationSubscriptions from '../../api/organization/GetOrgSubscription';
import getOrganizationUsers from '../../api/organization/GetOrgUsers';
@@ -32,7 +32,7 @@ export default function SettingsBilling() {
name: 'Team',
price: '$8',
priceExplanation: t('billing.professional.price-explanation')!,
- text: 'For teams that want to improve their efficiency and security.',
+ text: 'Unlimited members, up to 10 projects. Additional developer experience features.',
buttonTextMain: t('billing.upgrade')!,
buttonTextSecondary: t('billing.learn-more')!,
current: currentPlan === plansConstant.team
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx
index d1ca4f265..088ee792f 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx
@@ -11,7 +11,7 @@ export const ProjectIndexSecretsSection = ({
onEnableBlindIndices
}: Props) => {
return (
-
+
Blind Indices
Your project, created before the introduction of blind indexing, contains unindexed secrets. To access individual secrets by name through the SDK and public API, please enable blind indexing.