From b48a2bcf8cced00ca7aa362d029b8d07079716e9 Mon Sep 17 00:00:00 2001 From: kicer Date: Thu, 3 Sep 2026 20:46:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E6=8A=BD=E5=B1=89=E5=88=A0?= =?UTF-8?q?=E9=99=A4=20=E2=80=94=20modal=20=E5=8A=A0=20checkbox=20+=20?= =?UTF-8?q?=E6=BB=91=E5=8A=A8=E5=88=B0=E4=BD=8D=E7=9B=B4=E6=8E=A5=E5=BC=B9?= =?UTF-8?q?=20modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1) 删除会话 modal 加「同时删除任务文件夹」勾选框,默认勾选 - HTML 复用现有 .del-dir 样式,加 #confirm-check-wrap #confirm-check - confirmModal(title, text, okText, danger, opts) 新增 opts.checkbox 支持 勾选状态通过 state._confirmChecked 传出(不破坏现有调用方签名) - deleteSession 调 confirmModal 时传 checkbox,确认后用 _confirmChecked 决定 ?delete_dir=true/false 2) 移动端右滑到位直接弹删除 modal,不再露大红钮 - onUp 滑到 60+ 直接调 deleteSession(item.dataset.id) - 起手已 swiped + 右滑回去(moved>=60 但 dx>0):视为滑回去,弹回原位 - 删除大红钮 .conv-del 相关 DOM/CSS 全部清理 3) 桌面端 .conv-del-inline 行为不变(hover/focus 露出,点击弹 modal) --- app/server/public/css/style.css | 23 +++--------------- app/server/public/index.html | 43 +++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/app/server/public/css/style.css b/app/server/public/css/style.css index 2a5d761..0c6544e 100644 --- a/app/server/public/css/style.css +++ b/app/server/public/css/style.css @@ -453,34 +453,17 @@ footer { flex: none; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0 .conv-item .st-dot.queued { background: var(--active); } .conv-item .st-dot.active { background: #1c7a2e; animation: pill-pulse 1.2s ease-in-out infinite; } .conv-item .st-dot.held { background: #b8860b; } -/* 会话行包装:负责裁剪 + 提供 conv-del 绝对定位的参照 - conv-del(外层大红按钮)是 conv-item 的兄弟(不在 transform 子树内), - 这样 swiped 状态 transform:translateX(-60px) 不会一起带走删除按钮 - conv-del-inline 是 conv-item 的子元素,仅桌面端 hover/focus-within 露出 */ +/* 会话行包装:为桌面端 hover 的内联 × 提供定位;移动端不需要 swiped 类 + (滑到位直接弹 modal,不再保留 swiped 状态) */ .conv-wrap { position: relative; - overflow: hidden; border-radius: 12px; } .conv-item { position: relative; - transition: transform .18s ease, background .12s; + transition: background .12s; width: 100%; } -.conv-wrap.swiped .conv-item { transform: translateX(-60px); } - -/* 移动端右滑用的大红钮:默认完全不渲染,swiped 才露 */ -.conv-wrap .conv-del { - display: none; - position: absolute; right: 0; top: 0; bottom: 0; - width: 60px; - background: #c0392b; border: 0; color: #fff; - font-size: 18px; line-height: 1; padding: 0; cursor: pointer; - align-items: center; justify-content: center; - border-radius: 0 12px 12px 0; -} -.conv-wrap.swiped .conv-del { display: flex; } -.conv-wrap .conv-del:active { background: #a83224; } /* 桌面端用的内联小 ×:默认隐藏,hover/focus 露出 */ .conv-item .conv-del-inline { diff --git a/app/server/public/index.html b/app/server/public/index.html index 8f758b6..ea70563 100644 --- a/app/server/public/index.html +++ b/app/server/public/index.html @@ -187,6 +187,7 @@