- 在 js/app.js:728-766 新增 buildDeleteButtonHtml,并在 js/app.js:1000-1034 将浮动删除按钮植入用户、AI

与错误消息气泡,同时阻断事件冒泡以免干扰 SVG 点击;带 SVG 的消息亦在 js/app.js:1042-1054 注入同样的
    删除入口。
  - 通过 js/app.js:870-924 的 confirmDeleteMessage 与 deleteMessagePermanently,删除前弹出不可恢复提示,
    确认后同步清理当前模式的对话历史、关联 SVG 缓存以及本地存储,必要时自动回退至占位视图。
  - 在 css/style.css:235-266 定义 message-with-delete 与 message-delete-btn,实现右上角高亮悬浮按钮及
    hover 反馈,保证在深浅背景下均可清晰识别。
This commit is contained in:
史悦
2025-10-27 09:51:28 +08:00
parent 4b14bb26dd
commit c83c36baa6
2 changed files with 114 additions and 7 deletions

View File

@@ -232,6 +232,39 @@ iconify-icon {
transition: color 0.2s ease;
}
/* 消息删除浮动按钮 */
.message-with-delete {
position: relative;
padding-right: 48px;
}
.message-delete-btn {
position: absolute;
top: 8px;
right: 8px;
width: 30px;
height: 30px;
border-radius: 9999px;
border: 2px solid #1f2937;
background: rgba(255, 255, 255, 0.92);
color: #dc2626;
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.message-delete-btn:hover {
background: #dc2626;
color: #ffffff;
transform: scale(1.05);
}
.message-delete-btn iconify-icon {
font-size: 16px;
}
.svg-placeholder-block {
position: relative;
}