11import { Card , CardContent } from '@/components/ui/card' ;
22import { Badge } from '@/components/ui/badge' ;
3- import { RefreshCw , User , Clock , Search , Folder , List } from 'lucide-react' ;
3+ import { RefreshCw , User , Clock , Search , Folder , List , Ban } from 'lucide-react' ;
44import { useTranslation } from 'react-i18next' ;
55import { Button } from '@/components/ui/button' ;
66import {
@@ -28,6 +28,7 @@ interface ProviderQuotaCardProps {
2828 loading : boolean ;
2929 error ?: string ;
3030 items : QuotaItem [ ] ;
31+ plan ?: string ;
3132 onRefresh : ( ) => void ;
3233 isPrivacyMode : boolean ;
3334}
@@ -39,6 +40,7 @@ export function ProviderQuotaCard({
3940 loading,
4041 error,
4142 items,
43+ plan,
4244 onRefresh,
4345 isPrivacyMode
4446} : ProviderQuotaCardProps ) {
@@ -81,15 +83,27 @@ export function ProviderQuotaCard({
8183 // Determine icon based on group name
8284 let icon : string | undefined ;
8385 const lowerName = name . toLowerCase ( ) ;
86+ const lowerProvider = provider . toLowerCase ( ) ;
87+
8488 if ( lowerName . includes ( 'claude' ) ) {
8589 icon = '/claude/claude.png' ;
8690 } else if ( lowerName . includes ( 'gemini' ) ) {
8791 icon = '/gemini/gemini.png' ;
8892 } else if ( lowerName . includes ( 'gpt' ) || lowerName . includes ( 'o1' ) ) {
8993 icon = '/openai/openai.png' ;
90- } else if ( isAntigravity ) {
91- // For Antigravity "Other" group, default to OpenAI icon
92- icon = '/openai/openai.png' ;
94+ } else if ( lowerName === 'other' || ! icon ) {
95+ // For "Other" group, use provider-specific icon
96+ if ( lowerProvider . includes ( 'antigravity' ) ) {
97+ icon = '/openai/openai.png' ;
98+ } else if ( lowerProvider . includes ( 'codex' ) ) {
99+ icon = '/openai/openai.png' ;
100+ } else if ( lowerProvider . includes ( 'kiro' ) ) {
101+ icon = '/kiro/kiro.png' ;
102+ } else if ( lowerProvider . includes ( 'copilot' ) || lowerProvider . includes ( 'github' ) ) {
103+ icon = '/github/github.png' ;
104+ } else {
105+ icon = '/openai/openai.png' ; // Default fallback
106+ }
93107 }
94108
95109 return {
@@ -102,10 +116,13 @@ export function ProviderQuotaCard({
102116 } ) . sort ( ( a , b ) => a . name . localeCompare ( b . name ) ) ;
103117 } , [ items , provider ] ) ;
104118
119+ // Check if account is suspended
120+ const isSuspended = plan ?. toLowerCase ( ) === 'suspended' ;
121+
105122 return (
106- < Card className = "mb-4 overflow-hidden border bg-card text-card-foreground p-0" >
123+ < Card className = "mb-4 overflow-hidden border bg-card text-card-foreground p-0 py-0 gap-1 " >
107124 { /* Header Section */ }
108- < div className = "flex flex-col gap-3 border-b p-2 pt-4 bg-muted/20" >
125+ < div className = "flex flex-col gap-2 border-b p-2 pb-2 pt-3 bg-muted/20" >
109126 < div className = "flex items-center justify-between" >
110127 < div className = "flex flex-col gap-2" >
111128 { /* Top Row: List Icon + Email */ }
@@ -210,24 +227,31 @@ export function ProviderQuotaCard({
210227 </ div >
211228
212229 { /* Summary Content Section */ }
213- < CardContent className = "p -2 space-y-4 " >
230+ < CardContent className = "px -2 py-1 space-y-2 " >
214231 { error ? (
215232 < div className = "py-2 text-sm text-destructive flex items-center gap-2" >
216233 < div className = "h-2 w-2 rounded-full bg-destructive" > </ div >
217234 { error }
218235 </ div >
219236 ) : (
220- < div className = "space-y-4 " >
237+ < div className = "space-y-2 " >
221238 < div className = "text-xs font-semibold uppercase tracking-wider text-muted-foreground flex items-center gap-2" >
222239 { t ( 'quotaCard.usage' ) }
223240 </ div >
224241
225- { groupedItems . length === 0 && ! loading && (
242+ { groupedItems . length === 0 && ! loading && ! isSuspended && (
226243 < div className = "text-sm italic text-muted-foreground" > { t ( 'quotaCard.noUsage' ) } </ div >
227244 ) }
228245
246+ { /* Suspended State */ }
247+ { isSuspended && (
248+ < div className = "flex flex-col items-center justify-center py-8 gap-3" >
249+ < Ban className = "h-12 w-12 text-yellow-500" />
250+ < span className = "text-lg font-semibold text-yellow-600" > Temporarily Suspended</ span >
251+ </ div >
252+ ) }
229253
230- { groupedItems . map ( ( group , idx ) => (
254+ { ! isSuspended && groupedItems . map ( ( group , idx ) => (
231255 < div key = { idx } className = "space-y-2" >
232256 < div className = "flex items-center justify-between text-sm" >
233257 < div className = "flex items-center gap-2" >
0 commit comments