chore(ui): 清掉操作成功的冗余提示,统一各处垃圾桶图标

这些 toast 说的东西界面已经摆在眼前:撤回后的文字就在输入框里、复制按钮自己变勾、
删除完列表自己少一行、深度思考按钮自己变色。弹出来反而挡住会话内容,统一去掉。
保留全部失败提示,以及带额外信息的(终止时清了几条队列、清空后文件仍保留)。

垃圾桶在前端有四份画法(盖沿 polyline、桶身一体、线条 path 三种混写),统一成
盖沿+提手+桶身+两道竖线这一套;尺寸与描边跟随各自上下文(20px/2、13px/1.8、14px/1.9),
只求形状一致,不改各处的视觉粗细。
This commit is contained in:
2026-11-13 15:12:05 +08:00
parent 7b1ef9a479
commit 0433e61941
4 changed files with 6 additions and 11 deletions
+1 -1
View File
@@ -273,7 +273,7 @@
<svg viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
</button>
<button class="files-fab del" id="files-bulk-delete" title="批量删除" aria-label="批量删除" disabled>
<svg viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg>
<svg viewBox="0 0 24 24"><path d="M3 6h18"/><path d="M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>
</button>
</div>
</div>
+2 -3
View File
@@ -17,7 +17,7 @@
const SVG_VCS = '<svg class="ic sm" viewBox="0 0 24 24"><circle cx="6" cy="5" r="2"/><circle cx="6" cy="19" r="2"/><circle cx="18" cy="7" r="2"/><path d="M6 7v10"/><path d="M18 9v1a4 4 0 0 1-4 4H9"/></svg>';
const SVG_EYE = '<svg class="ic sm" viewBox="0 0 24 24"><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="2.6"/></svg>';
const SVG_DL = '<svg viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>';
const SVG_DEL = '<svg viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>';
const SVG_DEL = '<svg viewBox="0 0 24 24"><path d="M3 6h18"/><path d="M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>';
const SVG_REVEAL_SM = '<svg viewBox="0 0 24 24"><path d="M14 4h6v6"/><path d="M20 4l-9 9"/><path d="M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5"/></svg>';
let localCapable = false; // local 启动器:才显示「在 Finder/终端中打开」
@@ -195,7 +195,6 @@
sel.delete(rel);
invalidate(true);
renderBody();
toast('已删除');
} catch (e) { toast('删除失败:' + e.message); }
}
@@ -349,7 +348,7 @@
sel.clear();
invalidate(true);
renderBody();
toast(fail ? ('已删除 ' + done + ' 项,' + fail + ' 项失败') : ('已删除 ' + done + ' 项'));
if (fail) toast('已删除 ' + done + ' 项,' + fail + ' 项失败'); // 全成功时列表自己就空了,不弹
}
function onTreeClick(e) {
+2 -4
View File
@@ -49,8 +49,7 @@
// 深度思考开关:每次发消息随 body 传给后端,后端会合并该模型的 thinking_params
$('deep-think-btn').addEventListener('click', () => {
state.deepThink = !state.deepThink;
$('deep-think-btn').classList.toggle('on', state.deepThink);
toast(state.deepThink ? '深度思考已开启' : '深度思考已关闭');
$('deep-think-btn').classList.toggle('on', state.deepThink); // 按钮态即反馈,不再弹 toast
});
// ---------- 任务文件面板(底部浮层:点输入行右侧文件夹按钮展开,遮罩盖住输入区) ----------
@@ -666,8 +665,7 @@
ok++;
} catch (e) { fail++; toast('删除失败:' + name + ' ' + e.message); }
}
if (ok) toast('已删除 ' + ok + ' 项');
loadFiles(); // 重新拉取并重置选中
loadFiles(); // 重新拉取并重置选中;失败已逐条提示,全成功时不弹汇总
}
$('files-bulk-download').addEventListener('click', bulkDownload);
$('files-bulk-delete').addEventListener('click', bulkDelete);
+1 -3
View File
@@ -35,7 +35,7 @@
'<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>' +
'</button>' +
'<button class="conv-del" data-del="' + esc(s.id) + '" title="删除会话" aria-label="删除会话">' +
'<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>' +
'<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6"/><path d="M14 11v6"/></svg>' +
'</button>' +
'</div>';
}
@@ -96,7 +96,6 @@
syncUrl();
setView('welcome'); // 复用 newChat 同样的视图切换路径
}
toast('已删除会话');
loadSessionList();
} catch (e) { toast('删除失败:' + e.message); }
}
@@ -365,7 +364,6 @@
const title = String(t).trim();
try {
await req('PATCH', '/api/sessions/' + state.sessionId, { title: title });
toast('已重命名');
state.sessionTitle = title;
renderHeader();
loadSessionList();