fix: unify tier color mapping, fix feature badge colors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-09 19:50:28 +02:00
parent e3d9a3bd18
commit 7d4126ad4e
3 changed files with 33 additions and 39 deletions

20
ui/src/utils/tier.ts Normal file
View File

@@ -0,0 +1,20 @@
export type TierColor = 'primary' | 'success' | 'warning' | 'error' | 'auto';
export function tierColor(tier: string): TierColor {
switch (tier?.toUpperCase()) {
case 'BUSINESS':
case 'ENTERPRISE':
return 'success';
case 'HIGH':
case 'PRO':
return 'primary';
case 'MID':
case 'STARTER':
return 'warning';
case 'LOW':
case 'FREE':
return 'auto';
default:
return 'auto';
}
}