From 4a9c527d6eaa01bbaec5b9dc38cd50c7caf5dc1f Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 17 Jul 2026 13:55:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=9B=E5=BA=A6=E6=9D=A1=E6=94=B9?= =?UTF-8?q?=E7=94=A8=20table=20=E5=AE=9E=E7=8E=B0=20(Gmail=20=E5=85=BC?= =?UTF-8?q?=E5=AE=B9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 嵌套 div 被 Gmail 过滤导致进度条消失, 且后续 HTML 丢失。 改用 table 实现: 灰色背景轨道 200px, 蓝色填充按利用率百分比。 50% → 100px 蓝色长条, 0% → 无蓝色填充 --- mailer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mailer.py b/mailer.py index 5813e1f..f34f380 100644 --- a/mailer.py +++ b/mailer.py @@ -568,11 +568,14 @@ def _render_html(data: dict, base_url: str) -> str: # 24h 趋势 HTML if data["stats_24h"]: s = data["stats_24h"] + # 进度条: 用 table 实现 (Gmail 兼容), 宽 200px, 蓝色按利用率百分比填充 sample_rows = "".join( f'{_fmt_ts(smp.timestamp, "%m-%d %H:%M")}' f'{smp.utilization:.1f}%' f'' - f'{smp.utilization:.1f}%' + f'' + f'' + f'
' f'' for smp in data["samples_24h"] )