v2: 移除header-sub,在header-title前添加模式SVG图标作为标识区分
This commit is contained in:
@@ -55,18 +55,18 @@ input, textarea { font: inherit; color: inherit; border: 0; outline: none; backg
|
|||||||
.header .icon-btn:active { background: var(--surface); }
|
.header .icon-btn:active { background: var(--surface); }
|
||||||
.header-center {
|
.header-center {
|
||||||
flex: 1; min-width: 0;
|
flex: 1; min-width: 0;
|
||||||
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
display: flex; align-items: center; justify-content: center;
|
||||||
gap: 1px; text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.header-title {
|
.header-title {
|
||||||
font-size: 15px; font-weight: 600; line-height: 1.3;
|
font-size: 15px; font-weight: 600; line-height: 1.3;
|
||||||
max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||||||
|
display: flex; align-items: center; gap: 5px; justify-content: center;
|
||||||
}
|
}
|
||||||
.header-sub {
|
.header-mode-icon {
|
||||||
font-size: 11px; color: var(--gray); line-height: 1.3;
|
width: 17px; height: 17px; flex: none;
|
||||||
max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
|
||||||
}
|
}
|
||||||
.header-sub .mode { color: var(--active); }
|
|
||||||
|
|
||||||
/* ================= 主内容区 ================= */
|
/* ================= 主内容区 ================= */
|
||||||
main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
||||||
|
|||||||
@@ -350,10 +350,12 @@
|
|||||||
function renderHeader() {
|
function renderHeader() {
|
||||||
const c = $('header-center');
|
const c = $('header-center');
|
||||||
if (state.view !== 'chat' || !state.sessionId) { c.innerHTML = ''; return; }
|
if (state.view !== 'chat' || !state.sessionId) { c.innerHTML = ''; return; }
|
||||||
// 会话状态改由顶部 phase-bar 状态胶囊展示(自 index 同步);标题下仅保留模式文案
|
const modeIcons = {
|
||||||
|
secretary: '<svg class="header-mode-icon" viewBox="0 0 24 24"><path d="M6 3h12l4 6-10 13L2 9z"></path><polyline points="2 9 22 9"></polyline><polyline points="10 3 8 9 12 22"></polyline><polyline points="14 3 16 9 12 22"></polyline></svg>',
|
||||||
|
vision: '<svg class="header-mode-icon" viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>',
|
||||||
|
};
|
||||||
c.innerHTML =
|
c.innerHTML =
|
||||||
'<div class="header-title">' + esc(state.sessionTitle || state.sessionId) + '</div>' +
|
'<div class="header-title">' + (modeIcons[state.mode] || '') + esc(state.sessionTitle || state.sessionId) + '</div>';
|
||||||
'<div class="header-sub"><span class="mode">' + esc(MODES[state.mode].label) + '</span></div>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------- 模式切换区 ----------
|
// ---------- 模式切换区 ----------
|
||||||
|
|||||||
Reference in New Issue
Block a user