Skip to content

Commit

Permalink
feat: New Private apps limitations (#33316)
Browse files Browse the repository at this point in the history
* feat: New empty state for upgrading private Apps

* chore: Change Marketplace info modal text (#33239)

* feat: New tooltips and color behavior for private apps bar (#33243)

* feat: New tooltips and behavior for private apps bar

* Create brown-pants-press.md

* feat: new modal on Private Apps install (#33275)

* feat: new modal on Private Apps install

* add more variations

* Create eleven-rockets-hug.md

* chore: change grandfathered modal text (#33291)

* chore: Use apps provider to check maxPrivateApps

* fix: adds minor fixes to UI and changes requested on review

* Update changeset

* Replace negative boolean

* Refactor `AppsUsageCard`

* Add unit test for `AppsUsageCard`

* Add unit test for `PrivateEmptyState`

* Add unit test for `EnabledAppsCount`

* Move tooltip logic away from `useAppsCountQuery`

---------

Co-authored-by: Lucas Pelegrino <lucas.pelegrino@icloud.com>
Co-authored-by: Tasso <tasso.evangelista@rocket.chat>
  • Loading branch information
3 people authored and matheusbsilva137 committed Oct 10, 2024
1 parent e6f5a02 commit 8847dae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ const EnabledAppsCount = ({

const percentage = limit === 0 ? 100 : Math.round((enabled * 100) / limit);

const variant = useMemo(() => {
if (enabled + 1 === limit) {
return 'warning';
}

if (limit === 0 || enabled >= limit) {
return 'danger';
}

return 'success';
}, [enabled, limit]);

const percentage = limit === 0 ? 100 : Math.round((enabled * 100) / limit);

return (
<GenericResourceUsage
title={context === 'private' ? t('Private_Apps_Count_Enabled', { count: enabled }) : t('Apps_Count_Enabled', { count: enabled })}
Expand Down
4 changes: 4 additions & 0 deletions packages/i18n/src/locales/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -2577,7 +2577,11 @@
"GoogleTagManager_id": "Google Tag Manager Id",
"Got_it": "Got it",
"Government": "Government",
<<<<<<< HEAD
"Grandfathered_app": "App exempt from app limit policy",
=======
"Grandfathered_app": "Grandfathered app – this app is exempt from the app limit policy",
>>>>>>> 9995639a46 (feat: New Private apps limitations (#33316))
"Graphql_CORS": "GraphQL CORS",
"Graphql_Enabled": "GraphQL Enabled",
"Graphql_Subscription_Port": "GraphQL Subscription Port",
Expand Down

0 comments on commit 8847dae

Please sign in to comment.