Skip to content

Commit d75244f

Browse files
committed
feat: add custom GatewayIcon for model gateway indicator
Replace generic Cloud icon with a dedicated gateway icon showing data flowing through a central hub (hexagon with arrows). More distinctive and semantically meaningful for the gateway feature.
1 parent c655e18 commit d75244f

File tree

3 files changed

+42
-5
lines changed

3 files changed

+42
-5
lines changed

src/browser/components/ModelSelector.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import React, {
77
forwardRef,
88
} from "react";
99
import { cn } from "@/common/lib/utils";
10-
import { Cloud, Settings, Star } from "lucide-react";
10+
import { Settings, Star } from "lucide-react";
11+
import { GatewayIcon } from "./icons/GatewayIcon";
1112
import { TooltipWrapper, Tooltip } from "./Tooltip";
1213
import { useSettings } from "@/browser/contexts/SettingsContext";
1314
import { useGatewayModels, isGatewaySupported } from "@/browser/hooks/useGatewayModels";
@@ -202,7 +203,7 @@ export const ModelSelector = forwardRef<ModelSelectorRef, ModelSelectorProps>(
202203
<div ref={containerRef} className="relative flex items-center gap-1">
203204
{gatewayEnabled && (
204205
<TooltipWrapper inline>
205-
<Cloud className="text-accent h-3 w-3 shrink-0 fill-current" />
206+
<GatewayIcon className="text-accent h-3 w-3 shrink-0 fill-current" />
206207
<Tooltip className="tooltip" align="center">
207208
Using Mux Gateway
208209
</Tooltip>
@@ -290,7 +291,7 @@ export const ModelSelector = forwardRef<ModelSelectorRef, ModelSelectorProps>(
290291
isGatewayEnabled(model) ? "Disable Mux Gateway" : "Enable Mux Gateway"
291292
}
292293
>
293-
<Cloud
294+
<GatewayIcon
294295
className={cn("h-3 w-3", isGatewayEnabled(model) && "fill-current")}
295296
/>
296297
</button>

src/browser/components/Settings/sections/ModelRow.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from "react";
2-
import { Check, Cloud, Pencil, Star, Trash2, X } from "lucide-react";
2+
import { Check, Pencil, Star, Trash2, X } from "lucide-react";
3+
import { GatewayIcon } from "@/browser/components/icons/GatewayIcon";
34
import { cn } from "@/common/lib/utils";
45
import { TooltipWrapper, Tooltip } from "@/browser/components/Tooltip";
56
import { ProviderWithIcon } from "@/browser/components/ProviderIcon";
@@ -106,7 +107,9 @@ export function ModelRow(props: ModelRowProps) {
106107
)}
107108
aria-label={props.isGatewayEnabled ? "Disable Mux Gateway" : "Enable Mux Gateway"}
108109
>
109-
<Cloud className={cn("h-3.5 w-3.5", props.isGatewayEnabled && "fill-current")} />
110+
<GatewayIcon
111+
className={cn("h-3.5 w-3.5", props.isGatewayEnabled && "fill-current")}
112+
/>
110113
</button>
111114
<Tooltip className="tooltip" align="center">
112115
{props.isGatewayEnabled ? "Using Mux Gateway" : "Use Mux Gateway"}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import React from "react";
2+
3+
interface GatewayIconProps extends React.SVGProps<SVGSVGElement> {
4+
className?: string;
5+
}
6+
7+
/**
8+
* Gateway icon - represents routing through Mux Gateway.
9+
* A stylized "relay" symbol showing data passing through a central hub.
10+
*/
11+
export function GatewayIcon(props: GatewayIconProps) {
12+
return (
13+
<svg
14+
xmlns="http://www.w3.org/2000/svg"
15+
viewBox="0 0 24 24"
16+
fill="none"
17+
stroke="currentColor"
18+
strokeWidth="2"
19+
strokeLinecap="round"
20+
strokeLinejoin="round"
21+
{...props}
22+
>
23+
{/* Central hexagon hub */}
24+
<path d="M12 6l5.196 3v6L12 18l-5.196-3V9z" />
25+
{/* Left incoming arrow */}
26+
<path d="M2 12h4" />
27+
<path d="M4 10l2 2-2 2" />
28+
{/* Right outgoing arrow */}
29+
<path d="M18 12h4" />
30+
<path d="M20 10l2 2-2 2" />
31+
</svg>
32+
);
33+
}

0 commit comments

Comments
 (0)