diff --git a/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.spec.tsx b/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.spec.tsx index b5d44e3bf942c..84861f8cc9164 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.spec.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.spec.tsx @@ -8,8 +8,6 @@ import AppsUsageCard from './AppsUsageCard'; const appRoot = mockAppRoot().withTranslations('en', 'core', { Apps_InfoText_limited: 'Community workspaces can enable up to {{marketplaceAppsMaxCount}} marketplace apps. Private apps can only be enabled in <1>premium plans.', - Apps_InfoText: - 'Community allows up to {{privateAppsMaxCount}} private apps and {{marketplaceAppsMaxCount}} marketplace apps to be enabled', }); it('should render a skeleton if no data', () => { @@ -80,5 +78,7 @@ it('should render a full progress bar with private apps disabled', async () => { await userEvent.click(screen.getByRole('button', { name: 'Click_here_for_more_info' })); - expect(screen.getByText('Community allows up to 0 private apps and 5 marketplace apps to be enabled')).toBeInTheDocument(); + expect( + screen.getByText('Community workspaces can enable up to 5 marketplace apps. Private apps can only be enabled in premium plans.'), + ).toBeInTheDocument(); }); diff --git a/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.tsx b/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.tsx index aa8e91c0f8575..c23411fe492ea 100644 --- a/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.tsx +++ b/apps/meteor/client/views/admin/subscription/components/cards/AppsUsageCard/AppsUsageCard.tsx @@ -40,18 +40,16 @@ const AppsUsageCard = ({ privateAppsLimit, marketplaceAppsLimit }: AppsUsageCard const card: CardProps = { title: t('Apps'), - infoText: - privateAppsCount > 0 ? ( - - Community workspaces can enable up to {{ marketplaceAppsMaxCount }} marketplace apps. Private apps can only be enabled in{' '} - - premium plans - - . - - ) : ( - t('Apps_InfoText', { privateAppsMaxCount, marketplaceAppsMaxCount }) - ), + infoText: ( + + Community workspaces can enable up to {{ marketplaceAppsMaxCount }} marketplace apps. Private apps can only be enabled in{' '} + + premium plans + + . + + ), + ...(marketplaceAppsAboveWarning && { upgradeButton: ( diff --git a/apps/meteor/client/views/marketplace/AppsPage/AppsFilters.tsx b/apps/meteor/client/views/marketplace/AppsPage/AppsFilters.tsx index a1f486395dbba..1a31d474134df 100644 --- a/apps/meteor/client/views/marketplace/AppsPage/AppsFilters.tsx +++ b/apps/meteor/client/views/marketplace/AppsPage/AppsFilters.tsx @@ -59,7 +59,7 @@ const AppsFilters = ({ const fixFiltersSize = breakpoints.includes('lg') ? { maxWidth: 'x200', minWidth: 'x200' } : null; return ( - + {!isPrivateAppsPage && ( diff --git a/apps/meteor/client/views/marketplace/AppsPage/PrivateEmptyStateUpgrade.tsx b/apps/meteor/client/views/marketplace/AppsPage/PrivateEmptyStateUpgrade.tsx index e3ae7d0e31974..213fa2570f3ca 100644 --- a/apps/meteor/client/views/marketplace/AppsPage/PrivateEmptyStateUpgrade.tsx +++ b/apps/meteor/client/views/marketplace/AppsPage/PrivateEmptyStateUpgrade.tsx @@ -1,26 +1,35 @@ -import { States, StatesIcon, StatesTitle, StatesSubtitle, StatesActions } from '@rocket.chat/fuselage'; +import { States, StatesIcon, StatesTitle, StatesSubtitle, StatesActions, Button } from '@rocket.chat/fuselage'; import { usePermission } from '@rocket.chat/ui-contexts'; import React from 'react'; import { useTranslation } from 'react-i18next'; +import { useExternalLink } from '../../../hooks/useExternalLink'; import UpgradeButton from '../../admin/subscription/components/UpgradeButton'; +import { PRICING_LINK } from '../../admin/subscription/utils/links'; const PrivateEmptyStateUpgrade = () => { const { t } = useTranslation(); const isAdmin = usePermission('manage-apps'); + const handleOpenLink = useExternalLink(); + return ( {t('Private_apps_upgrade_empty_state_title')} {t('Private_apps_upgrade_empty_state_description')} - {isAdmin && ( - + + {isAdmin && ( {t('Upgrade')} - - )} + )} + {!isAdmin && ( + + )} + ); }; diff --git a/apps/meteor/client/views/marketplace/components/UninstallGrandfatheredAppModal/UninstallGrandfatheredAppModal.tsx b/apps/meteor/client/views/marketplace/components/UninstallGrandfatheredAppModal/UninstallGrandfatheredAppModal.tsx index 13d71cc2108b1..aa05e8851036a 100644 --- a/apps/meteor/client/views/marketplace/components/UninstallGrandfatheredAppModal/UninstallGrandfatheredAppModal.tsx +++ b/apps/meteor/client/views/marketplace/components/UninstallGrandfatheredAppModal/UninstallGrandfatheredAppModal.tsx @@ -1,6 +1,6 @@ import { Button, Modal } from '@rocket.chat/fuselage'; -import { useTranslation } from '@rocket.chat/ui-contexts'; import React from 'react'; +import { useTranslation } from 'react-i18next'; import MarkdownText from '../../../../components/MarkdownText'; import type { MarketplaceRouteContext } from '../../hooks/useAppsCountQuery'; @@ -15,7 +15,7 @@ type UninstallGrandfatheredAppModalProps = { }; const UninstallGrandfatheredAppModal = ({ context, limit, appName, handleUninstall, handleClose }: UninstallGrandfatheredAppModalProps) => { - const t = useTranslation(); + const { t } = useTranslation(); const privateAppsEnabled = usePrivateAppsEnabled(); const modalContent = @@ -35,6 +35,12 @@ const UninstallGrandfatheredAppModal = ({ context, limit, appName, handleUninsta + + {/* TODO: Move the link to a go link when available */} + + {t('Learn_more')} + +