mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-27 09:21:35 +07:00
fix(ui): add width/height to context-notice SVG icon
- Fixes #47924 - Prevents SVG icon from expanding and covering entire chat window - Adds explicit 24x24px dimensions to context-notice__icon SVG Root cause: The SVG element lacked explicit width and height attributes, causing it to expand to fill the parent container when the context usage warning appears (at ~85% token limit).
This commit is contained in:
@@ -314,7 +314,7 @@ function renderContextNotice(
|
||||
const bg = `rgba(${r}, ${g}, ${b}, ${bgOpacity})`;
|
||||
return html`
|
||||
<div class="context-notice" role="status" style="--ctx-color:${color};--ctx-bg:${bg}">
|
||||
<svg class="context-notice__icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
|
||||
<svg class="context-notice__icon" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
|
||||
<span>${pct}% context used</span>
|
||||
<span class="context-notice__detail">${formatTokensCompact(used)} / ${formatTokensCompact(limit)}</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user