♻️ Add a new unlimited plan

Closes #273
This commit is contained in:
Baptiste Arnaud
2023-01-27 15:00:07 +01:00
parent 4f78dda640
commit 409e7643ad
12 changed files with 49 additions and 12 deletions

View File

@@ -34,6 +34,7 @@ export const BillingContent = () => {
</HStack>
{workspace.plan !== Plan.CUSTOM &&
workspace.plan !== Plan.LIFETIME &&
workspace.plan !== Plan.UNLIMITED &&
workspace.plan !== Plan.OFFERED && <ChangePlanForm />}
</Stack>

View File

@@ -136,7 +136,12 @@ export const UsageContent = ({ workspace }: Props) => {
>
{storageToReadable(totalStorageUsed)}
</Skeleton>
<Text>/ {workspaceStorageLimit} GB</Text>
<Text>
/{' '}
{workspaceStorageLimit === -1
? 'Unlimited'
: `${workspaceStorageLimit} GB`}
</Text>
</HStack>
</Flex>
<Progress

View File

@@ -8,6 +8,7 @@ export const planColorSchemes: Record<Plan, ThemeTypings['colorSchemes']> = {
[Plan.STARTER]: 'orange',
[Plan.FREE]: 'gray',
[Plan.CUSTOM]: 'yellow',
[Plan.UNLIMITED]: 'yellow',
}
export const PlanTag = ({
@@ -64,12 +65,23 @@ export const PlanTag = ({
return (
<Tag
colorScheme={planColorSchemes[Plan.CUSTOM]}
data-testid="free-plan-tag"
data-testid="custom-plan-tag"
{...props}
>
Custom
</Tag>
)
}
case Plan.UNLIMITED: {
return (
<Tag
colorScheme={planColorSchemes[Plan.UNLIMITED]}
data-testid="custom-unlimite-tag"
{...props}
>
Unlimited
</Tag>
)
}
}
}