44 TooltipProvider ,
55 TooltipTrigger ,
66} from "@components/Tooltip" ;
7+ import { Barcode , Laptop } from "lucide-react" ;
78import Image from "next/image" ;
89import React , { useMemo } from "react" ;
910import { FaWindows } from "react-icons/fa6" ;
@@ -14,7 +15,7 @@ import FreeBSDLogo from "@/assets/os-icons/FreeBSD.png";
1415import { getOperatingSystem } from "@/hooks/useOperatingSystem" ;
1516import { OperatingSystem } from "@/interfaces/OperatingSystem" ;
1617
17- export function PeerOSCell ( { os } : { os : string } ) {
18+ export function PeerOSCell ( { os, serial } : { os : string , serial ? : string } ) {
1819 return (
1920 < TooltipProvider >
2021 < Tooltip delayDuration = { 1 } >
@@ -34,13 +35,50 @@ export function PeerOSCell({ os }: { os: string }) {
3435 </ div >
3536 </ TooltipTrigger >
3637 < TooltipContent >
37- < div className = { "text-neutral-300 flex flex-col gap-1" } > { os } </ div >
38+ < ListItem
39+ icon = { < Laptop size = { 14 } /> }
40+ label = { "OS" }
41+ value = { os }
42+ />
43+ { ( serial !== undefined ) &&
44+ < ListItem
45+
46+ icon = { < Barcode size = { 14 } /> }
47+ label = { "Serial" }
48+ value = { serial }
49+ />
50+ }
3851 </ TooltipContent >
3952 </ Tooltip >
4053 </ TooltipProvider >
4154 ) ;
4255}
4356
57+ const ListItem = ( {
58+ icon,
59+ label,
60+ value,
61+ } : {
62+ icon : React . ReactNode ;
63+ label : string ;
64+ value : string | React . ReactNode ;
65+ } ) => {
66+ return (
67+ < div
68+ className = {
69+ "flex justify-between gap-5 border-b border-nb-gray-920 py-2 px-4 last:border-b-0 text-xs"
70+ }
71+ >
72+ < div className = { "flex items-center gap-2 text-nb-gray-100 font-medium" } >
73+ { icon }
74+ { label }
75+ </ div >
76+ < div className = { "text-nb-gray-400" } > { value } </ div >
77+ </ div >
78+ ) ;
79+ } ;
80+
81+
4482export function OSLogo ( { os } : { os : string } ) {
4583 const icon = useMemo ( ( ) => {
4684 return getOperatingSystem ( os ) ;
0 commit comments