4
4
TooltipProvider ,
5
5
TooltipTrigger ,
6
6
} from "@components/Tooltip" ;
7
+ import { Barcode , Laptop } from "lucide-react" ;
7
8
import Image from "next/image" ;
8
9
import React , { useMemo } from "react" ;
9
10
import { FaWindows } from "react-icons/fa6" ;
@@ -14,7 +15,7 @@ import FreeBSDLogo from "@/assets/os-icons/FreeBSD.png";
14
15
import { getOperatingSystem } from "@/hooks/useOperatingSystem" ;
15
16
import { OperatingSystem } from "@/interfaces/OperatingSystem" ;
16
17
17
- export function PeerOSCell ( { os } : { os : string } ) {
18
+ export function PeerOSCell ( { os, serial } : { os : string , serial ? : string } ) {
18
19
return (
19
20
< TooltipProvider >
20
21
< Tooltip delayDuration = { 1 } >
@@ -34,13 +35,50 @@ export function PeerOSCell({ os }: { os: string }) {
34
35
</ div >
35
36
</ TooltipTrigger >
36
37
< 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
+ }
38
51
</ TooltipContent >
39
52
</ Tooltip >
40
53
</ TooltipProvider >
41
54
) ;
42
55
}
43
56
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
+
44
82
export function OSLogo ( { os } : { os : string } ) {
45
83
const icon = useMemo ( ( ) => {
46
84
return getOperatingSystem ( os ) ;
0 commit comments