diff --git a/src/lib/layout/containerHeader.svelte b/src/lib/layout/containerHeader.svelte index ec14a2977..8abc01201 100644 --- a/src/lib/layout/containerHeader.svelte +++ b/src/lib/layout/containerHeader.svelte @@ -28,6 +28,8 @@ export let total: number = null; export let alertType: 'info' | 'success' | 'warning' | 'error' | 'default' = 'warning'; export let showAlert = true; + export let level: 'organization' | 'project' = 'project'; + export let customPillText: string | undefined = undefined; export let buttonText: string = null; export let buttonMethod: () => void = null; @@ -63,6 +65,8 @@ const dispatch = createEventDispatcher(); $: tier = tierToPlan($organization?.billingPlan)?.name; + // these can be organization level limitations as well. + // we need to migrate this sometime later, but soon! $: hasProjectLimitation = checkForProjectLimitation(serviceId) && $organization?.billingPlan === BillingPlan.FREE; $: hasUsageFees = hasProjectLimitation @@ -129,7 +133,12 @@ {#if hasProjectLimitation} (showDropdown = !showDropdown)}> - {total}/{limit} created + + {#if customPillText} + {customPillText} + {:else} + {total}/{limit} created + {/if} {:else if $organization?.billingPlan !== BillingPlan.SCALE} (showDropdown = !showDropdown)}> @@ -139,9 +148,10 @@ {#if hasProjectLimitation} + {@const count = limit > 1 ? serviceId : serviceId.replace('s', '')}

You are limited to {limit} - {title.toLocaleLowerCase()} per project on the {tier} plan. + {count} per {level} on the {tier} plan. {#if $organization?.billingPlan === BillingPlan.FREE}