diff --git a/app/server/public/css/style.css b/app/server/public/css/style.css index 0599f58..9666030 100644 --- a/app/server/public/css/style.css +++ b/app/server/public/css/style.css @@ -60,9 +60,14 @@ input, textarea { font: inherit; color: inherit; border: 0; outline: none; backg } .header-title { font-size: 15px; line-height: 1.3; - max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + min-width: 0; max-width: 100%; overflow: hidden; + white-space: nowrap; display: flex; align-items: center; gap: 5px; justify-content: center; } +/* 文字层可收缩,过长时末尾省略号(flex 容器本身不响应 text-overflow,须包 span) */ +.header-title-text { + min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; +} .header-mode-icon { width: 17px; height: 17px; flex: none; color: var(--active); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; diff --git a/app/server/public/index.html b/app/server/public/index.html index f0707c8..4435893 100644 --- a/app/server/public/index.html +++ b/app/server/public/index.html @@ -367,7 +367,8 @@ title.className = 'header-title'; title.style.cursor = 'pointer'; title.title = '点击重命名'; - title.innerHTML = (modeIcons[state.mode] || '') + esc(state.sessionTitle || state.sessionId); + title.innerHTML = (modeIcons[state.mode] || '') + + '' + esc(state.sessionTitle || state.sessionId) + ''; title.addEventListener('click', renameSession); // 点标题重命名(同步 index) c.innerHTML = ''; c.appendChild(title);