mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-12-03 03:29:51 +00:00
menubar: dock preference to keep every ring out at rest (#1560)
This commit is contained in:
parent
2a7d9588d8
commit
d5880796bc
4 changed files with 22 additions and 1 deletions
|
|
@ -130,6 +130,10 @@ the user's login. Like `ClaudeCredentialStore.refreshAfter401` on macOS, we re-r
|
|||
own credential file for a token it has already rotated, and report a transient failure when
|
||||
there isn't one yet.
|
||||
|
||||
The `keepExpanded` dock preference (Settings > General > Capacity Dock > Keep expanded) makes
|
||||
the rail read as pinned, so every selected ring stays out at rest and the hover-out collapse
|
||||
never runs.
|
||||
|
||||
## Build a production package
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -699,7 +699,9 @@ export function Dock() {
|
|||
orderedRef.current = ordered
|
||||
const loading = quota.fetchedAt === null && quota.error === null
|
||||
|
||||
const expanded = isExpanded(interaction)
|
||||
// With the preference on the rail never rests on one ring: it reads as pinned, so every
|
||||
// selected row stays out and the hover-out collapse has nothing to do.
|
||||
const expanded = prefs.keepExpanded || isExpanded(interaction)
|
||||
useEffect(() => {
|
||||
if (expanded) setPresentationExpanded(true)
|
||||
}, [expanded])
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ export type DockPrefs = {
|
|||
providers: string[]
|
||||
/// Latches once the user edits the provider set, so auto-seeding stops second-guessing them.
|
||||
manualSelection: boolean
|
||||
/// Keeps every selected ring out at rest instead of collapsing to the resting provider.
|
||||
keepExpanded: boolean
|
||||
}
|
||||
|
||||
export const DEFAULT_DOCK_PREFS: DockPrefs = {
|
||||
|
|
@ -53,6 +55,7 @@ export const DEFAULT_DOCK_PREFS: DockPrefs = {
|
|||
gaugeShape: 'circle',
|
||||
providers: [],
|
||||
manualSelection: false,
|
||||
keepExpanded: false,
|
||||
}
|
||||
|
||||
export function parseDockPrefs(raw: Record<string, unknown>): DockPrefs {
|
||||
|
|
@ -65,6 +68,7 @@ export function parseDockPrefs(raw: Record<string, unknown>): DockPrefs {
|
|||
gaugeShape: raw.gaugeShape === 'squircle' ? 'squircle' : 'circle',
|
||||
providers: Array.isArray(raw.providers) ? raw.providers.filter((p): p is string => typeof p === 'string') : [],
|
||||
manualSelection: raw.manualSelection === true,
|
||||
keepExpanded: raw.keepExpanded === true,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -367,6 +367,17 @@ function CapacityDockSection({ quota }: { quota: QuotaState }) {
|
|||
}
|
||||
/>
|
||||
)}
|
||||
<Row
|
||||
label="Keep expanded"
|
||||
hint="Every ring stays out. Off, the rail rests on one ring and opens when you hover it."
|
||||
control={
|
||||
<Switch
|
||||
ariaLabel="Keep the Capacity Dock expanded"
|
||||
on={prefs.keepExpanded}
|
||||
onToggle={() => apply({ keepExpanded: !prefs.keepExpanded })}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<Row
|
||||
label="Size"
|
||||
control={
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue