From 3fde2d6ec5ec972591af05550adf01262f8f22e6 Mon Sep 17 00:00:00 2001 From: kicer Date: Thu, 10 Sep 2026 08:36:08 +0800 Subject: [PATCH] =?UTF-8?q?UI=EF=BC=9A=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=BA=E8=BE=93=E5=85=A5=E5=8C=BA=E4=B8=8A?= =?UTF-8?q?=E6=96=B9=E6=96=87=E4=BB=B6=E5=8D=A1=E7=89=87=EF=BC=88=E5=9B=BE?= =?UTF-8?q?=E6=A0=87+=E5=90=8D=E7=A7=B0+=E7=B1=BB=E5=9E=8B/=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=EF=BC=8C=E9=80=90=E5=8D=A1=E8=BF=9B=E5=BA=A6=E9=81=AE?= =?UTF-8?q?=E7=BD=A9=EF=BC=8C=E5=8F=AF=E6=A8=AA=E5=90=91=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - file-input 上传流程为每个文件建一张圆角卡片:左侧类型图标(图片/文档),右侧文件名(超长省略+title 全名)与「TYPE · 大小」行 - 上传中卡片盖半透明进度遮罩(百分比+底部进度线),完成收遮罩显示关闭 X,失败红字「上传失败」可关 - 卡片行 overflow-x 横向滚动,新卡自动滚入视野;切换会话/新建会话时清空 - 文件面板内原有总进度条保留不变 --- app/server/public/css/style.css | 42 +++++++++++++++++++ app/server/public/index.html | 73 +++++++++++++++++++++++++++++++-- 2 files changed, 111 insertions(+), 4 deletions(-) diff --git a/app/server/public/css/style.css b/app/server/public/css/style.css index 52c8502..0135627 100644 --- a/app/server/public/css/style.css +++ b/app/server/public/css/style.css @@ -286,6 +286,48 @@ footer { flex: none; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0 } .attach-chip .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; } .attach-chip .rm { color: var(--gray); display: flex; } +/* 上传文件卡片行(输入区上方):逐卡进度遮罩;卡多时横向滚动 */ +.up-cards { + display: flex; gap: 8px; margin-bottom: 8px; + overflow-x: auto; overflow-y: hidden; + scrollbar-width: thin; padding-bottom: 2px; + -webkit-overflow-scrolling: touch; +} +.up-cards::-webkit-scrollbar { height: 4px; } +.up-cards::-webkit-scrollbar-thumb { background: #ccd0da; border-radius: 2px; } +.up-card { + position: relative; flex: 0 0 auto; + display: flex; align-items: center; gap: 8px; + width: 210px; max-width: 62vw; + background: var(--surface); border: 1px solid #e3e6ee; border-radius: 12px; + padding: 9px 10px; overflow: hidden; +} +.up-ico { color: var(--gray); display: flex; flex: none; } +.up-info { flex: 1; min-width: 0; } +.up-name { font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.up-meta { font-size: 11px; color: var(--gray); margin-top: 2px; } +.up-x { + position: absolute; right: 5px; top: 5px; z-index: 2; + width: 18px; height: 18px; border-radius: 50%; border: none; cursor: pointer; padding: 0; + background: rgba(0, 0, 0, .06); color: var(--gray); + display: flex; align-items: center; justify-content: center; +} +.up-x:hover { background: rgba(0, 0, 0, .12); color: var(--ink); } +.up-x .ic { width: 11px; height: 11px; stroke-width: 2.4; } +.up-mask { + position: absolute; inset: 0; z-index: 1; + background: rgba(255, 255, 255, .78); + display: flex; align-items: center; justify-content: center; +} +.up-pct { font-size: 12px; font-weight: 600; color: var(--active); } +.up-card.err .up-pct { color: #c0392b; } +/* 底部进度线:宽度由 --up-p 驱动;终态(完成/失败)收起 */ +.up-card::after { + content: ''; position: absolute; left: 0; bottom: 0; height: 3px; z-index: 1; + width: var(--up-p, 0%); background: var(--active); + border-radius: 0 2px 2px 0; transition: width .25s; +} +.up-card.done::after, .up-card.err::after { display: none; } .input-shell { display: flex; flex-direction: column; diff --git a/app/server/public/index.html b/app/server/public/index.html index 9c75a5c..902a561 100644 --- a/app/server/public/index.html +++ b/app/server/public/index.html @@ -121,6 +121,7 @@