Handle enterprise license with unlimited seats (#1753)

This commit is contained in:
Luke Vella 2025-06-03 18:20:04 +01:00 committed by GitHub
parent 463d1d3882
commit c7af881f2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 10 deletions

View file

@ -77,15 +77,17 @@ export default async function LicensePage() {
</DescriptionListTitle> </DescriptionListTitle>
<DescriptionListValue> <DescriptionListValue>
<span className="text-primary capitalize">{license.type}</span> <span className="text-primary capitalize">{license.type}</span>
<span className="ml-2 text-muted-foreground"> {license.seats ? (
( <span className="ml-2 text-muted-foreground">
<Trans (
i18nKey="seatCount" <Trans
defaults="{count, plural, one {# seat} other {# seats}}" i18nKey="seatCount"
values={{ count: license.seats }} defaults="{count, plural, one {# seat} other {# seats}}"
/> values={{ count: license.seats }}
) />
</span> )
</span>
) : null}
</DescriptionListValue> </DescriptionListValue>
<DescriptionListTitle> <DescriptionListTitle>
<Trans i18nKey="licenseKey" defaults="License Key" /> <Trans i18nKey="licenseKey" defaults="License Key" />

View file

@ -16,7 +16,7 @@ export async function LicenseLimitWarning() {
const userLimit = license?.seats ?? 1; const userLimit = license?.seats ?? 1;
if (!userLimit || userCount <= userLimit) { if (license?.type === "ENTERPRISE" || userCount <= userLimit) {
return null; return null;
} }