Skip to content

Commit feb7fa4

Browse files
committed
feat(quota): assign provider-specific icons for "Other" group to improve visual representation
style(quota): refine card layout and spacing for a more compact design
1 parent 68af013 commit feb7fa4

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

src/components/quota/ProviderQuotaCard.tsx

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,27 @@ export function ProviderQuotaCard({
8383
// Determine icon based on group name
8484
let icon: string | undefined;
8585
const lowerName = name.toLowerCase();
86+
const lowerProvider = provider.toLowerCase();
87+
8688
if (lowerName.includes('claude')) {
8789
icon = '/claude/claude.png';
8890
} else if (lowerName.includes('gemini')) {
8991
icon = '/gemini/gemini.png';
9092
} else if (lowerName.includes('gpt') || lowerName.includes('o1')) {
9193
icon = '/openai/openai.png';
92-
} else if (isAntigravity) {
93-
// For Antigravity "Other" group, default to OpenAI icon
94-
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+
}
95107
}
96108

97109
return {
@@ -108,9 +120,9 @@ export function ProviderQuotaCard({
108120
const isSuspended = plan?.toLowerCase() === 'suspended';
109121

110122
return (
111-
<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">
112124
{/* Header Section */}
113-
<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">
114126
<div className="flex items-center justify-between">
115127
<div className="flex flex-col gap-2">
116128
{/* Top Row: List Icon + Email */}
@@ -215,14 +227,14 @@ export function ProviderQuotaCard({
215227
</div>
216228

217229
{/* Summary Content Section */}
218-
<CardContent className="p-2 space-y-4">
230+
<CardContent className="px-2 py-1 space-y-2">
219231
{error ? (
220232
<div className="py-2 text-sm text-destructive flex items-center gap-2">
221233
<div className="h-2 w-2 rounded-full bg-destructive"></div>
222234
{error}
223235
</div>
224236
) : (
225-
<div className="space-y-4">
237+
<div className="space-y-2">
226238
<div className="text-xs font-semibold uppercase tracking-wider text-muted-foreground flex items-center gap-2">
227239
{t('quotaCard.usage')}
228240
</div>

0 commit comments

Comments
 (0)