@@ -3,6 +3,7 @@ import { DropdownInput } from "@components/DropdownInput";
33import { Popover , PopoverContent , PopoverTrigger } from "@components/Popover" ;
44import TextWithTooltip from "@components/ui/TextWithTooltip" ;
55import { VirtualScrollAreaList } from "@components/VirtualScrollAreaList" ;
6+ import { getOperatingSystem } from "@hooks/useOperatingSystem" ;
67import { useSearch } from "@hooks/useSearch" ;
78import useFetchApi from "@utils/api" ;
89import { cn } from "@utils/helpers" ;
@@ -11,7 +12,9 @@ import { ChevronsUpDown, MapPin } from "lucide-react";
1112import * as React from "react" ;
1213import { memo , useEffect , useState } from "react" ;
1314import { useElementSize } from "@/hooks/useElementSize" ;
15+ import { OperatingSystem } from "@/interfaces/OperatingSystem" ;
1416import { Peer } from "@/interfaces/Peer" ;
17+ import { OSLogo } from "@/modules/peers/PeerOSCell" ;
1518
1619const MapPinIcon = memo ( ( ) => < MapPin size = { 12 } /> ) ;
1720MapPinIcon . displayName = "MapPinIcon" ;
@@ -169,6 +172,7 @@ export function PeerSelector({
169172 items = { filteredItems }
170173 onSelect = { togglePeer }
171174 renderItem = { ( option ) => {
175+ const os = getOperatingSystem ( option . os ) ;
172176 return (
173177 < >
174178 < div
@@ -179,6 +183,17 @@ export function PeerSelector({
179183 : "text-nb-gray-300" ,
180184 ) }
181185 >
186+ < div
187+ className = { cn (
188+ "flex items-center justify-center grayscale brightness-[100%] contrast-[40%]" ,
189+ "w-4 h-4 shrink-0" ,
190+ os === OperatingSystem . WINDOWS && "p-[2.5px]" ,
191+ os === OperatingSystem . APPLE && "p-[2.5px]" ,
192+ os === OperatingSystem . FREEBSD && "p-[1.5px]" ,
193+ ) }
194+ >
195+ < OSLogo os = { option . os } />
196+ </ div >
182197 < TextWithTooltip text = { option . name } maxChars = { 20 } />
183198 </ div >
184199
@@ -202,4 +217,4 @@ export function PeerSelector({
202217 </ PopoverContent >
203218 </ Popover >
204219 ) ;
205- }
220+ }
0 commit comments