11'use client' ;
22
3- import { Fragment } from 'react' ;
3+ import { Fragment } from 'react' ;
44import { Dialog , Transition } from '@headlessui/react' ;
55
66/*
@@ -18,6 +18,7 @@ interface ImageModalProps {
1818 mjd ?: number ;
1919 filename ?: string ;
2020 rows ?: Array < {
21+ color ?: string ;
2122 epoch : string ;
2223 r_in : string ;
2324 r_out : string ;
@@ -74,6 +75,7 @@ export function ImageModal({
7475 < table className = "min-w-full text-sm border border-gray-300 rounded overflow-hidden" >
7576 < thead className = "bg-gray-100 text-black font-semibold" >
7677 < tr >
78+ < th className = "px-3 py-2 text-left" > </ th >
7779 < th className = "px-3 py-2 text-left" > Epoch</ th >
7880 < th className = "px-3 py-2 text-left" > r_in</ th >
7981 < th className = "px-3 py-2 text-left" > r_out</ th >
@@ -83,10 +85,22 @@ export function ImageModal({
8385 < tbody >
8486 { details . rows . map ( ( row , idx ) => (
8587 < tr key = { idx } className = "border-t hover:bg-gray-50" >
88+ < td className = "px-3 py-1" >
89+ { row . color ? (
90+ < div
91+ className = "w-4 h-4 rounded-full border border-gray-300"
92+ style = { { backgroundColor : row . color } }
93+ title = { row . color }
94+ />
95+ ) : (
96+ < div className = "w-4 h-4 rounded-full border border-gray-200 bg-white" title = "No color" />
97+ ) }
98+ </ td >
8699 < td className = "px-3 py-1 font-mono text-black" > { row . epoch } </ td >
87100 < td className = "px-3 py-1 font-mono text-black" > { row . r_in } </ td >
88101 < td className = "px-3 py-1 font-mono text-black" > { row . r_out } </ td >
89- < td className = "px-3 py-1 text-blue-600 font-semibold" > { row . y . toFixed ( 2 ) } </ td >
102+ < td className = "px-3 py-1 text-black font-semibold" > { row . y . toFixed ( 2 ) } </ td >
103+ { /* <td className="px-3 py-1 text-blue-600 font-semibold">{row.y.toFixed(2)}</td> */ }
90104 </ tr >
91105 ) ) }
92106 </ tbody >
0 commit comments