From f2607f76644db74bc4b2e75a2f53bf2cb1faea57 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Sun, 8 Jun 2025 09:34:13 +0800 Subject: [PATCH] style: optimize log display for more compact layout - Move log message to same line as timestamp and level - Reduce padding and font sizes for tighter spacing - Optimize log data display with left border and indentation - Add responsive design for mobile devices - Achieve more compact display with fewer lines per log entry --- internal/version/VERSION | 2 +- report.go | 82 ++++++++++++++++++++++++++++------------ 2 files changed, 59 insertions(+), 25 deletions(-) diff --git a/internal/version/VERSION b/internal/version/VERSION index 67f81f2c..28bfdc1d 100644 --- a/internal/version/VERSION +++ b/internal/version/VERSION @@ -1 +1 @@ -v5.0.0-beta-2506080929 +v5.0.0-beta-2506080934 diff --git a/report.go b/report.go index 0fd30978..a4a03605 100644 --- a/report.go +++ b/report.go @@ -746,9 +746,10 @@ const htmlTemplate = ` .log-entry { border-bottom: 1px solid #e9ecef; - padding: 8px 12px; + padding: 4px 8px; font-family: monospace; - font-size: 0.85em; + font-size: 0.8em; + line-height: 1.2; } .log-entry:last-child { @@ -775,20 +776,25 @@ const htmlTemplate = ` display: flex; align-items: center; gap: 10px; - margin-bottom: 4px; + margin-bottom: 2px; + flex-wrap: nowrap; } .log-time { color: #6c757d; - font-size: 0.8em; + font-size: 0.75em; + white-space: nowrap; + min-width: 180px; } .log-level { - padding: 2px 6px; - border-radius: 4px; - font-size: 0.7em; + padding: 1px 4px; + border-radius: 3px; + font-size: 0.65em; font-weight: bold; text-transform: uppercase; + min-width: 45px; + text-align: center; } .log-level.debug { @@ -813,19 +819,21 @@ const htmlTemplate = ` .log-message { color: #495057; - margin-bottom: 4px; word-wrap: break-word; + flex: 1; + margin-left: 10px; } .log-data { - background: #e9ecef; - border: 1px solid #dee2e6; - border-radius: 4px; - padding: 4px 6px; - font-size: 0.8em; + background: #f8f9fa; + border-left: 3px solid #dee2e6; + padding: 2px 6px; + margin: 2px 0 2px 195px; + font-size: 0.75em; color: #6c757d; - max-height: 100px; + max-height: 80px; overflow-y: auto; + word-break: break-all; } .controls { @@ -931,6 +939,32 @@ const htmlTemplate = ` .screenshot-item.small .screenshot-image img { max-height: 150px; } + + .log-header { + flex-direction: column; + align-items: flex-start; + gap: 4px; + } + + .log-time { + min-width: auto; + font-size: 0.7em; + } + + .log-level { + min-width: 35px; + font-size: 0.6em; + } + + .log-message { + margin-left: 0; + font-size: 0.75em; + } + + .log-data { + margin-left: 10px; + font-size: 0.7em; + } } @@ -1143,16 +1177,16 @@ const htmlTemplate = `

📋 Step Logs

{{range $logEntry := $stepLogs}} -
-
- {{$logEntry.Time}} - {{$logEntry.Level}} -
-
{{$logEntry.Message}}
- {{if $logEntry.Data}} -
{{safeHTML (toJSON $logEntry.Data)}}
- {{end}} -
+
+
+ {{$logEntry.Time}} + {{$logEntry.Level}} + {{$logEntry.Message}} +
+ {{if $logEntry.Data}} +
{{safeHTML (toJSON $logEntry.Data)}}
+ {{end}} +
{{end}}