模式行二轮微调:抽屉列表行去掉prof-badge(只留头部标题,画蛇添足),chooseProfile随删无意义的renderDrawerList重画(本地缓存同步保留);.msw-prof锁行盒——label行高30px/select定高30px+line-height 28px,模式字样与下拉框严格垂直对齐
This commit is contained in:
@@ -95,8 +95,8 @@
|
||||
.prof-badge.prof-lab .ic, .prof-badge.prof-zero .ic { color: var(--active); }
|
||||
/* 弹窗模式行:下拉选中(取代纵向选项组,省垂直空间) */
|
||||
.msw-prof { display: flex; align-items: center; gap: 6px; padding: 10px 12px; font-size: 13px; color: var(--ink); border-top: 1px solid #dde1ea; }
|
||||
.msw-prof-label { flex: none; }
|
||||
.msw-prof select { flex: 1; min-width: 0; border: 1px solid #dde1ea; border-radius: 8px; padding: 5px 8px; font-size: 13px; background: #fff; color: var(--ink); }
|
||||
.msw-prof-label { flex: none; line-height: 30px; }
|
||||
.msw-prof select { flex: 1; min-width: 0; height: 30px; box-sizing: border-box; border: 1px solid #dde1ea; border-radius: 8px; padding: 0 8px; font-size: 13px; line-height: 28px; background: #fff; color: var(--ink); }
|
||||
/* welcome 头像兼做「选择模型/模式」入口(与聊天态的「选择模型」同一弹窗) */
|
||||
.logo-badge { cursor: pointer; }
|
||||
</style>
|
||||
|
||||
@@ -199,8 +199,8 @@
|
||||
}
|
||||
|
||||
// ---------- 会话模式徽标 ----------
|
||||
// 会话绑定 profile 时在标题(头部/抽屉行)显示小图标:''=默认不显示;颜色统一 --active(CSS .prof-*),靠形状区分;
|
||||
// 未知名兑底圆点;tooltip 提示当前模式,不另显文字。
|
||||
// 会话绑定 profile 时仅头部标题前显示小图标(抽屉列表不显,避免画蛇添足):''=默认不显示;
|
||||
// 颜色统一 --active(CSS .prof-*),靠形状区分;未知名兑底圆点;tooltip 提示当前模式,不另显文字。
|
||||
const PROFILE_BADGES = {
|
||||
lab: '<svg viewBox="0 0 24 24" class="ic"><path fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" d="M10 2v6.6L4.8 18.5a1.8 1.8 0 0 0 1.6 2.7h11.2a1.8 1.8 0 0 0 1.6-2.7L14 8.6V2"/><line x1="8.5" y1="2" x2="15.5" y2="2"/></svg>',
|
||||
zero: '<svg viewBox="0 0 24 24" class="ic"><circle fill="none" stroke="currentColor" stroke-width="1.8" cx="12" cy="12" r="9"/><line stroke="currentColor" stroke-width="1.8" stroke-linecap="round" x1="8" y1="12" x2="16" y2="12"/></svg>',
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if (g !== lastGroup) { html += '<div class="group-label">' + esc(g) + '</div>'; lastGroup = g; }
|
||||
html += '<div class="conv-wrap' + (s.has_schedule ? ' scheduled' : '') + '">' +
|
||||
'<button class="conv-item' + (s.id === state.sessionId ? ' active' : '') + '" data-id="' + esc(s.id) + '">' +
|
||||
profileBadgeHtml(s.profile) + '<span class="conv-title">' + esc(s.title || s.id) + '</span>' + drawerStatusDot(s) +
|
||||
'<span class="conv-title">' + esc(s.title || s.id) + '</span>' + drawerStatusDot(s) +
|
||||
'</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>' +
|
||||
@@ -541,9 +541,8 @@
|
||||
return toast('切换失败:' + e.message);
|
||||
}
|
||||
state.profile = name;
|
||||
const row = (state.sessions || []).find(x => x.id === state.sessionId); // 同步本地缓存后重画抽屉(纯本地,不重拉网络列表)
|
||||
const row = (state.sessions || []).find(x => x.id === state.sessionId); // 只同步本地缓存保数据一致(抽屉不显模式徽标,无需重画)
|
||||
if (row) row.profile = name;
|
||||
renderDrawerList();
|
||||
} else {
|
||||
state.pendingProfile = name;
|
||||
state.profile = name;
|
||||
|
||||
Reference in New Issue
Block a user