mirror of
https://github.com/getpaseo/paseo.git
synced 2026-08-14 12:23:16 +00:00
wip(app): keep keyboard shortcuts alive on /settings
Chrome gating currently disables shortcuts on non-workspace routes. Temporary pathname check until chromeEnabled is split into separate workspace/global concerns.
This commit is contained in:
@@ -403,6 +403,12 @@ function AppContainer({
|
|||||||
|
|
||||||
const isCompactLayout = useIsCompactFormFactor();
|
const isCompactLayout = useIsCompactFormFactor();
|
||||||
const chromeEnabled = chromeEnabledOverride ?? daemons.length > 0;
|
const chromeEnabled = chromeEnabledOverride ?? daemons.length > 0;
|
||||||
|
const pathname = usePathname();
|
||||||
|
// TODO: stop matching pathname here as a branch. `chromeEnabled` should not
|
||||||
|
// conflate workspace/project-specific chrome (sidebar, mobile gesture) with
|
||||||
|
// global concerns like keyboard shortcuts. Split those out so settings (and
|
||||||
|
// other non-workspace routes) don't need a special-case to keep shortcuts alive.
|
||||||
|
const keyboardShortcutsEnabled = chromeEnabled || pathname.startsWith("/settings");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const bp = UnistylesRuntime.breakpoint;
|
const bp = UnistylesRuntime.breakpoint;
|
||||||
@@ -434,7 +440,7 @@ function AppContainer({
|
|||||||
}, [isCompactLayout, chromeEnabled, isFocusModeEnabled, agentListOpen, sidebarWidth]);
|
}, [isCompactLayout, chromeEnabled, isFocusModeEnabled, agentListOpen, sidebarWidth]);
|
||||||
|
|
||||||
useKeyboardShortcuts({
|
useKeyboardShortcuts({
|
||||||
enabled: chromeEnabled,
|
enabled: keyboardShortcutsEnabled,
|
||||||
isMobile: isCompactLayout,
|
isMobile: isCompactLayout,
|
||||||
toggleAgentList,
|
toggleAgentList,
|
||||||
toggleFileExplorer,
|
toggleFileExplorer,
|
||||||
|
|||||||
Reference in New Issue
Block a user