fix(ui): move focus toggle to top bar
This commit is contained in:
@@ -49,6 +49,7 @@
|
|||||||
- Cron: clamp timer delay to avoid TimeoutOverflowWarning. Thanks @emanuelst for PR #412.
|
- Cron: clamp timer delay to avoid TimeoutOverflowWarning. Thanks @emanuelst for PR #412.
|
||||||
- Web UI: allow reconnect + password URL auth for the control UI and always scrub auth params from the URL. Thanks @oswalpalash for PR #414.
|
- Web UI: allow reconnect + password URL auth for the control UI and always scrub auth params from the URL. Thanks @oswalpalash for PR #414.
|
||||||
- Web UI: add Connect button on Overview to apply connection changes. Thanks @wizaj for PR #385.
|
- Web UI: add Connect button on Overview to apply connection changes. Thanks @wizaj for PR #385.
|
||||||
|
- Web UI: keep Focus toggle on the top bar (swap with theme toggle) so it stays visible. (#440)
|
||||||
- ClawdbotKit: fix SwiftPM resource bundling path for `tool-display.json`. Thanks @fcatuhe for PR #398.
|
- ClawdbotKit: fix SwiftPM resource bundling path for `tool-display.json`. Thanks @fcatuhe for PR #398.
|
||||||
- Tools: add Telegram/WhatsApp reaction tools (with per-provider gating). Thanks @zats for PR #353.
|
- Tools: add Telegram/WhatsApp reaction tools (with per-provider gating). Thanks @zats for PR #353.
|
||||||
- Tools: flatten literal-union schemas for Claude on Vertex AI. Thanks @carlulsoe for PR #409.
|
- Tools: flatten literal-union schemas for Claude on Vertex AI. Thanks @carlulsoe for PR #409.
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
--shell-pad: 8px;
|
--shell-pad: 8px;
|
||||||
--shell-gap: 0px;
|
--shell-gap: 0px;
|
||||||
--shell-nav-col: 0px;
|
--shell-nav-col: 0px;
|
||||||
--shell-topbar-row: 0px;
|
--shell-topbar-row: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.shell--chat-focus .content {
|
.shell--chat-focus .content {
|
||||||
@@ -54,15 +54,6 @@
|
|||||||
max-height: max(0px, var(--topbar-height, 92px));
|
max-height: max(0px, var(--topbar-height, 92px));
|
||||||
}
|
}
|
||||||
|
|
||||||
.shell--chat-focus .topbar {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-10px);
|
|
||||||
max-height: 0px;
|
|
||||||
padding: 0;
|
|
||||||
border-width: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand {
|
.brand {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
|
|||||||
@@ -208,6 +208,16 @@ export function renderApp(state: AppViewState) {
|
|||||||
<span>Health</span>
|
<span>Health</span>
|
||||||
<span class="mono">${state.connected ? "OK" : "Offline"}</span>
|
<span class="mono">${state.connected ? "OK" : "Offline"}</span>
|
||||||
</div>
|
</div>
|
||||||
|
${isChat
|
||||||
|
? renderChatFocusToggle(
|
||||||
|
state.settings.chatFocusMode,
|
||||||
|
() =>
|
||||||
|
state.applySettings({
|
||||||
|
...state.settings,
|
||||||
|
chatFocusMode: !state.settings.chatFocusMode,
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
: nothing}
|
||||||
${renderThemeToggle(state)}
|
${renderThemeToggle(state)}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
@@ -416,16 +426,10 @@ export function renderApp(state: AppViewState) {
|
|||||||
disabledReason: chatDisabledReason,
|
disabledReason: chatDisabledReason,
|
||||||
error: state.lastError,
|
error: state.lastError,
|
||||||
sessions: state.sessionsResult,
|
sessions: state.sessionsResult,
|
||||||
focusMode: state.settings.chatFocusMode,
|
|
||||||
onRefresh: () => {
|
onRefresh: () => {
|
||||||
state.resetToolStream();
|
state.resetToolStream();
|
||||||
return loadChatHistory(state);
|
return loadChatHistory(state);
|
||||||
},
|
},
|
||||||
onToggleFocusMode: () =>
|
|
||||||
state.applySettings({
|
|
||||||
...state.settings,
|
|
||||||
chatFocusMode: !state.settings.chatFocusMode,
|
|
||||||
}),
|
|
||||||
onDraftChange: (next) => (state.chatMessage = next),
|
onDraftChange: (next) => (state.chatMessage = next),
|
||||||
onSend: () => state.handleSendChat(),
|
onSend: () => state.handleSendChat(),
|
||||||
})
|
})
|
||||||
@@ -555,6 +559,19 @@ function renderThemeToggle(state: AppViewState) {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renderChatFocusToggle(focusMode: boolean, onToggle: () => void) {
|
||||||
|
return html`
|
||||||
|
<button
|
||||||
|
class="btn ${focusMode ? "active" : ""}"
|
||||||
|
@click=${onToggle}
|
||||||
|
aria-pressed=${focusMode}
|
||||||
|
title="Toggle focus mode (hide sidebar + page header)"
|
||||||
|
>
|
||||||
|
Focus
|
||||||
|
</button>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
function renderSunIcon() {
|
function renderSunIcon() {
|
||||||
return html`
|
return html`
|
||||||
<svg class="theme-icon" viewBox="0 0 24 24" aria-hidden="true">
|
<svg class="theme-icon" viewBox="0 0 24 24" aria-hidden="true">
|
||||||
|
|||||||
@@ -22,9 +22,7 @@ export type ChatProps = {
|
|||||||
disabledReason: string | null;
|
disabledReason: string | null;
|
||||||
error: string | null;
|
error: string | null;
|
||||||
sessions: SessionsListResult | null;
|
sessions: SessionsListResult | null;
|
||||||
focusMode: boolean;
|
|
||||||
onRefresh: () => void;
|
onRefresh: () => void;
|
||||||
onToggleFocusMode: () => void;
|
|
||||||
onDraftChange: (next: string) => void;
|
onDraftChange: (next: string) => void;
|
||||||
onSend: () => void;
|
onSend: () => void;
|
||||||
};
|
};
|
||||||
@@ -66,14 +64,6 @@ export function renderChat(props: ChatProps) {
|
|||||||
</div>
|
</div>
|
||||||
<div class="chat-header__right">
|
<div class="chat-header__right">
|
||||||
<div class="muted">Thinking: ${props.thinkingLevel ?? "inherit"}</div>
|
<div class="muted">Thinking: ${props.thinkingLevel ?? "inherit"}</div>
|
||||||
<button
|
|
||||||
class="btn ${props.focusMode ? "active" : ""}"
|
|
||||||
@click=${props.onToggleFocusMode}
|
|
||||||
aria-pressed=${props.focusMode}
|
|
||||||
title="Toggle focus mode (hide header + sidebar)"
|
|
||||||
>
|
|
||||||
Focus
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user