From acd980091d119f1d1f25f1beb05e5771a68fbae6 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Sat, 7 Mar 2026 16:23:11 +0100 Subject: [PATCH] Update latency-detail-modal.tsx --- AppImage/components/latency-detail-modal.tsx | 88 +++++++------------- 1 file changed, 29 insertions(+), 59 deletions(-) diff --git a/AppImage/components/latency-detail-modal.tsx b/AppImage/components/latency-detail-modal.tsx index fa725cd4..7cb5577b 100644 --- a/AppImage/components/latency-detail-modal.tsx +++ b/AppImage/components/latency-detail-modal.tsx @@ -233,7 +233,7 @@ const generateLatencyReport = (report: ReportData) => { * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1a1a2e; background: #fff; font-size: 13px; line-height: 1.5; } - @page { margin: 10mm 12mm 12mm 12mm; size: A4; } + @page { margin: 15mm 15mm 20mm 15mm; size: A4; } @media print { .no-print { display: none !important; } .page-break { page-break-before: always; } @@ -250,7 +250,7 @@ const generateLatencyReport = (report: ReportData) => { .rpt-footer { color: #4b5563; } } @media screen { - body { max-width: 850px; margin: 0 auto; padding: 12px 16px; padding-top: 50px; } + body { max-width: 1000px; margin: 0 auto; padding: 24px 32px; padding-top: 64px; } } /* Top bar for screen only */ @@ -274,72 +274,43 @@ const generateLatencyReport = (report: ReportData) => { .hide-mobile { } @media print { .top-bar { display: none; } body { padding-top: 0; } } @media screen and (max-width: 600px) { - .top-bar { padding: 8px 12px; } + .top-bar { padding: 10px 12px; } .hide-mobile { display: none !important; } - .top-bar .close-btn { padding: 8px 14px; font-size: 13px; } + .top-bar .close-btn { padding: 8px 16px; font-size: 14px; } .top-bar .close-btn .close-text { display: inline; } - body { padding: 10px; padding-top: 52px; } - /* Scale down content to fit mobile screen while preserving print layout */ - .rpt-header { flex-wrap: wrap; gap: 8px; padding: 8px 0; } - .rpt-header-left { gap: 8px; } - .rpt-header-left img { height: 32px; } - .rpt-header-left h1 { font-size: 16px; } - .rpt-header-left p { font-size: 9px; } - .rpt-header-right { font-size: 9px; } - .exec-box { flex-wrap: wrap; gap: 12px; padding: 12px; } - .latency-gauge { width: 120px; } - .latency-gauge svg { width: 120px; height: 80px; } - .gauge-num { font-size: 24px; } - .gauge-unit { font-size: 11px; } - .gauge-status { font-size: 8px; } - .exec-text h3 { font-size: 14px; } - .exec-text p { font-size: 11px; } - .latency-range { gap: 16px; flex-wrap: wrap; } - .range-label { font-size: 9px; } - .range-value { font-size: 14px; } - .section-title { font-size: 11px; } - .card { padding: 8px; } - .card-value { font-size: 12px; } - .card-c .card-value { font-size: 16px; } - .card-label { font-size: 9px; } - .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 4px; } - .grid-3 { gap: 4px; } - .threshold-item p { font-size: 10px; } - .info-box { padding: 10px; } - .info-box h4, .info-box p { font-size: 10px; } - .rpt-footer { font-size: 9px; flex-wrap: wrap; gap: 4px; } + body { padding-top: 60px; } } /* Header */ .rpt-header { display: flex; align-items: center; justify-content: space-between; - padding: 8px 0; border-bottom: 2px solid #0f172a; margin-bottom: 12px; + padding: 18px 0; border-bottom: 3px solid #0f172a; margin-bottom: 22px; } - .rpt-header-left { display: flex; align-items: center; gap: 10px; } - .rpt-header-left img { height: 36px; width: auto; } - .rpt-header-left h1 { font-size: 18px; font-weight: 700; color: #0f172a; margin: 0; } - .rpt-header-left p { font-size: 9px; color: #64748b; margin: 0; } - .rpt-header-right { text-align: right; font-size: 9px; color: #64748b; line-height: 1.4; } - .rpt-header-right .rid { font-family: monospace; font-size: 8px; color: #94a3b8; } + .rpt-header-left { display: flex; align-items: center; gap: 14px; } + .rpt-header-left img { height: 44px; width: auto; } + .rpt-header-left h1 { font-size: 22px; font-weight: 700; color: #0f172a; } + .rpt-header-left p { font-size: 11px; color: #64748b; } + .rpt-header-right { text-align: right; font-size: 11px; color: #64748b; line-height: 1.6; } + .rpt-header-right .rid { font-family: monospace; font-size: 10px; color: #94a3b8; } /* Sections */ - .section { margin-bottom: 16px; } + .section { margin-bottom: 22px; } .section-title { - font-size: 12px; font-weight: 700; color: #0f172a; text-transform: uppercase; - letter-spacing: 0.05em; padding-bottom: 4px; border-bottom: 2px solid #e2e8f0; margin-bottom: 10px; + font-size: 14px; font-weight: 700; color: #0f172a; text-transform: uppercase; + letter-spacing: 0.05em; padding-bottom: 5px; border-bottom: 2px solid #e2e8f0; margin-bottom: 12px; } /* Executive summary */ .exec-box { - display: flex; align-items: center; gap: 20px; padding: 16px; - background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 12px; + display: flex; align-items: center; gap: 24px; padding: 20px; + background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 16px; } .score-ring { width: 96px; height: 96px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 4px solid; flex-shrink: 0; } - .score-num { font-size: 28px; font-weight: 800; line-height: 1; } - .score-unit { font-size: 12px; font-weight: 600; opacity: 0.8; } + .score-num { font-size: 32px; font-weight: 800; line-height: 1; } + .score-unit { font-size: 14px; font-weight: 600; opacity: 0.8; } .score-lbl { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; } .exec-text { flex: 1; } .exec-text h3 { font-size: 16px; margin-bottom: 4px; } @@ -866,9 +837,9 @@ export function LatencyDetailModal({ open, onOpenChange, currentLatency }: Laten Network Latency -
+
{!isRealtime && (