Limit log-peek hover to the status text, not the whole bar

.stfront no longer flex:1 across the bar — it hugs the icon+command text
(max 70%), with an inert spacer filling the rest, so the peek only appears
when hovering the actual text.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Bonchellon
2026-07-07 14:59:28 +03:00
parent 15140918ad
commit 0615c02742
3 changed files with 6 additions and 3 deletions

View File

@ -251,12 +251,13 @@ body.resizing{cursor:col-resize!important;user-select:none}
/* bottom status bar (always visible) + hover log peek */
.statusbar{flex:0 0 26px;display:flex;align-items:center;gap:10px;padding:0 12px;border-top:1px solid var(--border);
background:var(--bar);font-size:11.5px;color:var(--muted);position:relative;user-select:none;z-index:60}
.stfront{display:flex;align-items:center;gap:10px;flex:1;min-width:0;height:100%;cursor:default}
.stfront{display:flex;align-items:center;gap:10px;flex:0 1 auto;min-width:0;max-width:70%;height:100%;cursor:default}
.stspace{flex:1}
.stdot{width:16px;height:16px;display:grid;place-items:center;flex:0 0 auto;color:var(--add)}
.stdot svg{width:12px;height:12px}
.stdot.busy{color:var(--accent-2)}
.ldr.sm{width:12px;height:12px;border-width:2px}
.stlast{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:11px}
.stlast{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:11px}
.stlog{display:flex;align-items:center;gap:6px;flex:0 0 auto;border:1px solid var(--border);background:var(--panel);
color:var(--muted);border-radius:7px;padding:3px 10px;cursor:pointer;font-size:11.5px}
.stlog:hover{color:var(--txt);border-color:var(--accent)}

View File

@ -682,10 +682,11 @@ function Workbench({ info, session, light, toggleTheme, lang, setLang, zoom, set
{logOpen && <LogPanel logs={logs} onClose={() => setLogOpen(false)} onClear={() => setLogs([])} />}
<div className="statusbar">
<span className="stfront" onMouseEnter={showPeek} onMouseLeave={hidePeek}>
<span className="stfront" onMouseEnter={showPeek} onMouseLeave={hidePeek} title={t("Recent commands")}>
<span className={"stdot" + ((busy || scanning || !!transfer) ? " busy" : "")}>{(busy || scanning || !!transfer) ? <span className="ldr sm" /> : I.check}</span>
<span className="stlast">{logs.length ? `${logs[logs.length - 1].cmd} ${logCount(logs[logs.length - 1])}` : "p4 — ready"}</span>
</span>
<span className="stspace" />
<button className="stlog" onClick={() => setLogOpen((o) => !o)} title="Ctrl+L">{I.log}<span>Log</span></button>
{peek && logs.length > 0 && (
<div className="logpeek" onMouseEnter={showPeek} onMouseLeave={hidePeek}>

View File

@ -172,6 +172,7 @@ const D: Record<string, Tr> = {
"Clear": { ru: "Очистить", de: "Leeren", fr: "Effacer", es: "Limpiar" },
"item(s)": { ru: "элем.", de: "Einträge", fr: "élément(s)", es: "elemento(s)" },
"No commands yet.": { ru: "Пока нет команд.", de: "Noch keine Befehle.", fr: "Aucune commande pour linstant.", es: "Aún no hay comandos." },
"Recent commands": { ru: "Последние команды", de: "Letzte Befehle", fr: "Commandes récentes", es: "Comandos recientes" },
"Light ☀": { ru: "Светлая ☀", de: "Hell ☀", fr: "Clair ☀", es: "Claro ☀" },
"Dark ☾": { ru: "Тёмная ☾", de: "Dunkel ☾", fr: "Sombre ☾", es: "Oscuro ☾" },
"Server version": { ru: "Версия сервера", de: "Serverversion", fr: "Version du serveur", es: "Versión del servidor" },