Skip to content

Commit 1b73ba8

Browse files
authored
fix(provider-usage): limit rail to four providers and add divider (#285)
1 parent d8cdf2a commit 1b73ba8

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/renderer/components/providers/ProviderUsageRail.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,19 @@ export function ProviderUsageRail(props: { orientation?: "row" | "column" }) {
252252
startTransition(() => setUsageSetting("providerOrder", next));
253253
}
254254

255-
const items = providers.map((p, index) => (
256-
<ProviderUsageRailItem key={p.id} id={p.id} label={p.label} index={index} group={group} />
257-
));
255+
const items = providers
256+
.slice(0, 4)
257+
.map((p, index) => (
258+
<ProviderUsageRailItem key={p.id} id={p.id} label={p.label} index={index} group={group} />
259+
));
258260

259261
// Collapsed icon rail: a centered column of circles.
260262
if (orientation === "column") {
261263
return (
262264
<DragDropProvider sensors={sensors} onDragEnd={handleDragEnd}>
263-
<div className="flex w-full flex-col items-center gap-1.5">{items}</div>
265+
<div className="mb-1 flex w-full flex-col items-center gap-1.5 border-b border-[var(--hairline)] pb-2">
266+
{items}
267+
</div>
264268
</DragDropProvider>
265269
);
266270
}

0 commit comments

Comments
 (0)