From 6435202fa1c7b55bb95f12cfabfa9a023968485a Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sat, 7 Mar 2026 21:37:24 +0100 Subject: [PATCH] Update latency-detail-modal.tsx --- AppImage/components/latency-detail-modal.tsx | 57 ++++++++------------ 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/AppImage/components/latency-detail-modal.tsx b/AppImage/components/latency-detail-modal.tsx index e5c34b19..94a7d039 100644 --- a/AppImage/components/latency-detail-modal.tsx +++ b/AppImage/components/latency-detail-modal.tsx @@ -323,16 +323,26 @@ const generateLatencyReport = (report: ReportData) => { .exec-text h3 { font-size: 16px; margin-bottom: 4px; } .exec-text p { font-size: 12px; color: #64748b; line-height: 1.5; } - /* Latency gauge - responsive */ + /* Latency gauge - CSS only, no SVG */ .latency-gauge { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; - width: 120px; max-width: 120px; + width: 96px; } - .latency-gauge svg { width: 100%; height: auto; } - .gauge-value { display: flex; align-items: baseline; gap: 2px; margin-top: -8px; } - .gauge-num { font-size: 24px; font-weight: 800; line-height: 1; } + .gauge-ring { + width: 96px; height: 96px; border-radius: 50%; display: flex; flex-direction: column; + align-items: center; justify-content: center; flex-shrink: 0; + position: relative; + } + .gauge-ring::before { + content: ''; position: absolute; inset: 0; border-radius: 50%; + background: conic-gradient(from 180deg, #16a34a 0deg 60deg, #22c55e 60deg 90deg, #ca8a04 90deg 135deg, #dc2626 135deg 180deg, #e2e8f0 180deg 360deg); + -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 8px)); + mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 8px)); + } + .gauge-value { display: flex; align-items: baseline; gap: 2px; z-index: 1; } + .gauge-num { font-size: 28px; font-weight: 800; line-height: 1; } .gauge-unit { font-size: 12px; font-weight: 600; opacity: 0.8; } - .gauge-status { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; } + .gauge-status { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; z-index: 1; } /* Latency range display */ .latency-range { @@ -343,15 +353,7 @@ const generateLatencyReport = (report: ReportData) => { .range-label { font-size: 9px; font-weight: 600; color: #94a3b8; text-transform: uppercase; } .range-value { font-size: 14px; font-weight: 700; } - /* Print styles for gauge */ - @media print { - .latency-gauge { width: 140px; max-width: 140px; } - .gauge-num { font-size: 28px; } - .gauge-unit { font-size: 13px; } - .gauge-status { font-size: 10px; } - .latency-range { gap: 20px; } - .range-value { font-size: 16px; } - } + /* Grids */ .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; } @@ -494,26 +496,13 @@ const generateLatencyReport = (report: ReportData) => {
1. Executive Summary
- - - - - - - - - - - - - 0 - 300+ - -
- ${report.isRealtime ? (realtimeStats?.avg?.toFixed(0) ?? 'N/A') : report.stats.avg} - ms +
+
+ ${report.isRealtime ? (realtimeStats?.avg?.toFixed(0) ?? 'N/A') : report.stats.avg} + ms +
+
${statusText}
-
${statusText}

Network Latency Assessment${report.isRealtime ? ' (Real-time)' : ''}