From 8d1611adda7d2526b9300937294bee553c624b46 Mon Sep 17 00:00:00 2001 From: kicer Date: Thu, 3 Sep 2026 19:19:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E4=BB=BB=E5=8A=A1=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E5=8A=A0=E8=BF=9B=E5=BA=A6=E6=9D=A1?= =?UTF-8?q?=20+=20=E5=9B=BE=E7=89=87=E9=A2=84=E8=A7=88=E5=A4=8D=E7=94=A8?= =?UTF-8?q?=20img-viewer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 面板上传改 XHR + onprogress:多文件并行,进度条显示总进度(已发字节/总字节) 1.2s 后自动收起,失败/成功分别 toast - 任务文件中的图片预览改用 openImageViewer (与消息里单击图片同一查看器) 支持双指缩放+拖动+双击放大,大图也能看完 - blob URL 通过 state.lastImgBlobUrl 缓存,新开图片时回收旧的避免泄漏 - 移除 fs-img-frame 配套样式(不再需要) --- app/server/public/css/style.css | 16 +++++++ app/server/public/index.html | 77 +++++++++++++++++++++++---------- 2 files changed, 70 insertions(+), 23 deletions(-) diff --git a/app/server/public/css/style.css b/app/server/public/css/style.css index 220b7be..8f74544 100644 --- a/app/server/public/css/style.css +++ b/app/server/public/css/style.css @@ -343,6 +343,22 @@ footer { flex: none; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0 background: var(--active-soft); color: var(--active); cursor: pointer; } .files-panel-header .file-upload:active { background: var(--active); color: #fff; } +/* 上传总进度条(header 中间,上传中显示) */ +.files-panel-progress { + flex: 1; min-width: 0; height: 6px; margin: 0 10px; + background: var(--surface); border-radius: 3px; overflow: hidden; position: relative; +} +.files-panel-progress .bar { + height: 100%; width: 0; + background: linear-gradient(90deg, var(--active) 0%, #6b8cff 100%); + border-radius: 3px; + transition: width .12s linear; +} +.files-panel-progress .pct { + position: absolute; right: 0; top: 50%; transform: translateY(-50%); + font-size: 10px; color: var(--gray); background: var(--page); padding: 0 4px; line-height: 1; + white-space: nowrap; pointer-events: none; +} .files-panel-header .file-upload svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; diff --git a/app/server/public/index.html b/app/server/public/index.html index 6852d00..41dbb70 100644 --- a/app/server/public/index.html +++ b/app/server/public/index.html @@ -113,6 +113,10 @@
任务文件 +