@@ -8,25 +8,10 @@ export const RequestCard: Component<
88 onSelect ?: ( id : string ) => void ;
99 } ,
1010 { } ,
11- data - status - class = {
12- this. request . status ! == undefined
13- ? String ( Math . floor ( this . request . status / 100 ) )
14- : ""
15- }
1611 { }
1712> = function ( ) {
1813 return (
19- < span
20- class = {
21- this . request . status !== undefined
22- ? `request-status status-${ Math . floor (
23- this . request . status / 100
24- ) } `
25- : "request-status"
26- }
27- >
28- { this . request . status ?? "…" }
29- </ span >
14+ < div
3015 class = { use ( this . selected ) . map (
3116 ( selected ) => `request-row ${ selected ? "selected" : "" } `
3217 ) }
@@ -35,7 +20,15 @@ export const RequestCard: Component<
3520 >
3621 < div class = "request-main" >
3722 < span class = "request-method" > { this . request . method } </ span >
38- < span class = "request-status" > { this . request . status ?? "…" } </ span >
23+ < span
24+ class = {
25+ this . request . status !== undefined
26+ ? `request-status status-${ Math . floor ( this . request . status / 100 ) } `
27+ : "request-status"
28+ }
29+ >
30+ { this . request . status ?? "…" }
31+ </ span >
3932 < span class = "request-duration" >
4033 { this . request . durationMs !== undefined
4134 ? `${ this . request . durationMs } ms`
@@ -92,13 +85,22 @@ RequestCard.style = css`
9285 .request-method {
9386 font-weight : 600 ;
9487 color : # fff ;
95- background : rgba ( 148 , 163 , 184 , 0.15 ) ;
96- border : 1 px solid rgba ( 148 , 163 , 184 , 0.35 ) ;
97- color : # e2e8f0 ;
88+ padding : 0.15 em 0.5 em ;
89+ border-radius : 6 px ;
90+ background : rgba ( 59 , 130 , 246 , 0.2 ) ;
9891 border : 1px solid rgba (59 , 130 , 246 , 0.35 );
9992 letter-spacing : 0.02em ;
10093 }
10194 .request-status {
95+ padding : 0.15em 0.45em ;
96+ border-radius : 6px ;
97+ background : rgba (148 , 163 , 184 , 0.15 );
98+ border : 1px solid rgba (148 , 163 , 184 , 0.35 );
99+ color : # e2e8f0 ;
100+ min-width : 2.5em ;
101+ text-align : center;
102+ font-variant-numeric : tabular-nums;
103+ }
102104 .request-status .status-2 {
103105 background : rgba (34 , 197 , 94 , 0.15 );
104106 border : 1px solid rgba (34 , 197 , 94 , 0.35 );
@@ -119,17 +121,6 @@ RequestCard.style = css`
119121 border : 1px solid rgba (248 , 113 , 113 , 0.4 );
120122 color : # fecaca ;
121123 }
122- padding : 0.15em 0.45em ;
123- border-radius : 6px ;
124- background : rgba (34 , 197 , 94 , 0.15 );
125- border : 1px solid rgba (34 , 197 , 94 , 0.35 );
126- color : # bbf7d0 ;
127- min-width : 2.5em ;
128- text-align : center;
129- font-variant-numeric : tabular-nums;
130- white-space : nowrap;
131- overflow : hidden;
132- text-overflow : ellipsis;
133124 .request-duration ,
134125 .request-destination ,
135126 .request-time {
@@ -138,7 +129,9 @@ RequestCard.style = css`
138129 .request-url {
139130 font-size : 0.85em ;
140131 color : # e5e7eb ;
141- word-break : break-all;
132+ white-space : nowrap;
133+ overflow : hidden;
134+ text-overflow : ellipsis;
142135 }
143136 .request-type {
144137 font-size : 0.75em ;
0 commit comments