Design changes

This commit is contained in:
ivanThePleasant 2023-02-14 13:40:21 +02:00
parent 254ac92425
commit df1af817a5
2 changed files with 13 additions and 8 deletions

View File

@ -26,7 +26,7 @@ const useLicenseLimitNotification = () => {
return; return;
} }
const { currentUserCount, permittedSeats, licenseLimitStatus, isHostedOnStrapiCloud } = const { enforcementUserCount, permittedSeats, licenseLimitStatus, isHostedOnStrapiCloud } =
license?.data ?? {}; license?.data ?? {};
const shouldDisplayNotification = const shouldDisplayNotification =
@ -47,19 +47,21 @@ const useLicenseLimitNotification = () => {
type: notificationType, type: notificationType,
message: formatMessage( message: formatMessage(
{ {
id: 'notification.ee.warning.seat-limit.message', id: 'notification.ee.warning.over-.message',
defaultMessage: defaultMessage:
"Add seats to invite more Users. If you already did it but it's not reflected in Strapi yet, make sure to restart your app.", "Add seats to {licenseLimitStatus, select, OVER_LIMIT {invite} other {re-enable}} Users. If you already did it but it's not reflected in Strapi yet, make sure to restart your app.",
}, },
{ licenseLimitStatus } { licenseLimitStatus }
), ),
title: formatMessage( title: formatMessage(
{ {
id: 'notification.ee.warning.seat-limit.title', id: 'notification.ee.warning.at-seat-limit.title',
defaultMessage: 'Over seat limit ({currentUserCount}/{permittedSeats})', defaultMessage:
'{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})',
}, },
{ {
currentUserCount, licenseLimitStatus,
enforcementUserCount,
permittedSeats, permittedSeats,
} }
), ),

View File

@ -40,7 +40,10 @@ const AdminSeatInfo = () => {
enforcementUserCount, enforcementUserCount,
// eslint-disable-next-line react/no-unstable-nested-components // eslint-disable-next-line react/no-unstable-nested-components
text: (chunks) => ( text: (chunks) => (
<Typography fontWeight="semiBold" textColor="danger500"> <Typography
fontWeight="semiBold"
textColor={enforcementUserCount > permittedSeats ? 'danger500' : null}
>
{chunks} {chunks}
</Typography> </Typography>
), ),
@ -48,7 +51,7 @@ const AdminSeatInfo = () => {
)} )}
</Typography> </Typography>
</Flex> </Flex>
{licenseLimitStatus === 'AT_LIMIT' && ( {licenseLimitStatus === 'OVER_LIMIT' && (
<Tooltip <Tooltip
description={formatMessage({ description={formatMessage({
id: 'Settings.application.ee.admin-seats.at-limit-tooltip', id: 'Settings.application.ee.admin-seats.at-limit-tooltip',