The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix hotkeys for tasks page (#1034)
brendanlaschke0ad35549ace1
diff --git a/front/src/AppNavbar.tsx b/front/src/AppNavbar.tsxindex 544db676b13..0b6f09bc4ae 100644--- a/front/src/AppNavbar.tsx+++ b/front/src/AppNavbar.tsx@@ -49,6 +49,7 @@ export function AppNavbar() {<NavItemlabel="Tasks"to="/tasks"+ active={currentPath === '/tasks'}icon={<IconCheckbox size={theme.icon.size.md} />}/><NavTitle label="Workspace" />diff --git a/front/src/modules/command-menu/components/CommandMenu.tsx b/front/src/modules/command-menu/components/CommandMenu.tsxindex 765f7dc149d..842c6322a56 100644--- a/front/src/modules/command-menu/components/CommandMenu.tsx+++ b/front/src/modules/command-menu/components/CommandMenu.tsx@@ -98,6 +98,11 @@ export function CommandMenu() {label: 'Go to Settings',shortcuts: ['G', 'S'],},+ {+ to: '/tasks',+ label: 'Go to Tasks',+ shortcuts: ['G', 'T'],+ },];const matchingCommand = commands.find(@@ -162,7 +167,6 @@ export function CommandMenu() {{matchingCommand && (<StyledGroup heading="Navigate"><CommandMenuItem- key={matchingCommand.shortcuts?.join('')}to={matchingCommand.to}label={matchingCommand.label}shortcuts={matchingCommand.shortcuts}@@ -222,8 +226,10 @@ export function CommandMenu() {{!matchingCommand && (<StyledGroup heading="Navigate">{commands- .filter((cmd) =>- cmd.shortcuts?.join('').includes(search?.toUpperCase()),+ .filter(+ (cmd) =>+ cmd.shortcuts?.join('').includes(search?.toUpperCase()) ||+ cmd.label?.toUpperCase().includes(search?.toUpperCase()),).map((cmd) => (<CommandMenuItemdiff --git a/front/src/modules/types/PageHotkeyScope.ts b/front/src/modules/types/PageHotkeyScope.tsindex 04205d0fea9..5882480f67c 100644--- a/front/src/modules/types/PageHotkeyScope.ts+++ b/front/src/modules/types/PageHotkeyScope.ts@@ -11,4 +11,5 @@ export enum PageHotkeyScope {OpportunitiesPage = 'opportunities-page',ProfilePage = 'profile-page',WorkspaceMemberPage = 'workspace-member-page',+ TaskPage = 'task-page',}diff --git a/front/src/sync-hooks/AuthAutoRouter.tsx b/front/src/sync-hooks/AuthAutoRouter.tsxindex fe9eec3f507..44758b2a929 100644--- a/front/src/sync-hooks/AuthAutoRouter.tsx+++ b/front/src/sync-hooks/AuthAutoRouter.tsx@@ -91,6 +91,11 @@ export function AuthAutoRouter() {setHotkeyScope(PageHotkeyScope.OpportunitiesPage, { goto: true });break;}+ case isMatchingLocation(AppPath.TasksPage): {+ setHotkeyScope(PageHotkeyScope.TaskPage, { goto: true });+ break;+ }+case isMatchingLocation(AppPath.SignIn): {setHotkeyScope(PageHotkeyScope.SignInUp);break;diff --git a/front/src/sync-hooks/GotoHotkeysHooks.tsx b/front/src/sync-hooks/GotoHotkeysHooks.tsxindex c9b480f34db..da782c71925 100644--- a/front/src/sync-hooks/GotoHotkeysHooks.tsx+++ b/front/src/sync-hooks/GotoHotkeysHooks.tsx@@ -5,6 +5,7 @@ export function GotoHotkeysHooks() {useGoToHotkeys('c', '/companies');useGoToHotkeys('o', '/opportunities');useGoToHotkeys('s', '/settings/profile');+ useGoToHotkeys('t', '/tasks');return <></>;}