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;
}
const { currentUserCount, permittedSeats, licenseLimitStatus, isHostedOnStrapiCloud } =
const { enforcementUserCount, permittedSeats, licenseLimitStatus, isHostedOnStrapiCloud } =
license?.data ?? {};
const shouldDisplayNotification =
@ -47,19 +47,21 @@ const useLicenseLimitNotification = () => {
type: notificationType,
message: formatMessage(
{
id: 'notification.ee.warning.seat-limit.message',
id: 'notification.ee.warning.over-.message',
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 }
),
title: formatMessage(
{
id: 'notification.ee.warning.seat-limit.title',
defaultMessage: 'Over seat limit ({currentUserCount}/{permittedSeats})',
id: 'notification.ee.warning.at-seat-limit.title',
defaultMessage:
'{licenseLimitStatus, select, OVER_LIMIT {Over} other {At}} seat limit ({enforcementUserCount}/{permittedSeats})',
},
{
currentUserCount,
licenseLimitStatus,
enforcementUserCount,
permittedSeats,
}
),

View File

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