@ -49,6 +49,7 @@ export function AppNavbar() {
|
|||||||
<NavItem
|
<NavItem
|
||||||
label="Tasks"
|
label="Tasks"
|
||||||
to="/tasks"
|
to="/tasks"
|
||||||
|
active={currentPath === '/tasks'}
|
||||||
icon={<IconCheckbox size={theme.icon.size.md} />}
|
icon={<IconCheckbox size={theme.icon.size.md} />}
|
||||||
/>
|
/>
|
||||||
<NavTitle label="Workspace" />
|
<NavTitle label="Workspace" />
|
||||||
|
|||||||
@ -98,6 +98,11 @@ export function CommandMenu() {
|
|||||||
label: 'Go to Settings',
|
label: 'Go to Settings',
|
||||||
shortcuts: ['G', 'S'],
|
shortcuts: ['G', 'S'],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
to: '/tasks',
|
||||||
|
label: 'Go to Tasks',
|
||||||
|
shortcuts: ['G', 'T'],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const matchingCommand = commands.find(
|
const matchingCommand = commands.find(
|
||||||
@ -162,7 +167,6 @@ export function CommandMenu() {
|
|||||||
{matchingCommand && (
|
{matchingCommand && (
|
||||||
<StyledGroup heading="Navigate">
|
<StyledGroup heading="Navigate">
|
||||||
<CommandMenuItem
|
<CommandMenuItem
|
||||||
key={matchingCommand.shortcuts?.join('')}
|
|
||||||
to={matchingCommand.to}
|
to={matchingCommand.to}
|
||||||
label={matchingCommand.label}
|
label={matchingCommand.label}
|
||||||
shortcuts={matchingCommand.shortcuts}
|
shortcuts={matchingCommand.shortcuts}
|
||||||
@ -222,8 +226,10 @@ export function CommandMenu() {
|
|||||||
{!matchingCommand && (
|
{!matchingCommand && (
|
||||||
<StyledGroup heading="Navigate">
|
<StyledGroup heading="Navigate">
|
||||||
{commands
|
{commands
|
||||||
.filter((cmd) =>
|
.filter(
|
||||||
cmd.shortcuts?.join('').includes(search?.toUpperCase()),
|
(cmd) =>
|
||||||
|
cmd.shortcuts?.join('').includes(search?.toUpperCase()) ||
|
||||||
|
cmd.label?.toUpperCase().includes(search?.toUpperCase()),
|
||||||
)
|
)
|
||||||
.map((cmd) => (
|
.map((cmd) => (
|
||||||
<CommandMenuItem
|
<CommandMenuItem
|
||||||
|
|||||||
@ -11,4 +11,5 @@ export enum PageHotkeyScope {
|
|||||||
OpportunitiesPage = 'opportunities-page',
|
OpportunitiesPage = 'opportunities-page',
|
||||||
ProfilePage = 'profile-page',
|
ProfilePage = 'profile-page',
|
||||||
WorkspaceMemberPage = 'workspace-member-page',
|
WorkspaceMemberPage = 'workspace-member-page',
|
||||||
|
TaskPage = 'task-page',
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,6 +91,11 @@ export function AuthAutoRouter() {
|
|||||||
setHotkeyScope(PageHotkeyScope.OpportunitiesPage, { goto: true });
|
setHotkeyScope(PageHotkeyScope.OpportunitiesPage, { goto: true });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case isMatchingLocation(AppPath.TasksPage): {
|
||||||
|
setHotkeyScope(PageHotkeyScope.TaskPage, { goto: true });
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case isMatchingLocation(AppPath.SignIn): {
|
case isMatchingLocation(AppPath.SignIn): {
|
||||||
setHotkeyScope(PageHotkeyScope.SignInUp);
|
setHotkeyScope(PageHotkeyScope.SignInUp);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -5,6 +5,7 @@ export function GotoHotkeysHooks() {
|
|||||||
useGoToHotkeys('c', '/companies');
|
useGoToHotkeys('c', '/companies');
|
||||||
useGoToHotkeys('o', '/opportunities');
|
useGoToHotkeys('o', '/opportunities');
|
||||||
useGoToHotkeys('s', '/settings/profile');
|
useGoToHotkeys('s', '/settings/profile');
|
||||||
|
useGoToHotkeys('t', '/tasks');
|
||||||
|
|
||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user