Closes #8737 - Refactored actions by creating hooks to add the possibility to register actions programatically. - Small fixes from #8610 review - Fixed shortcuts display inside the command menu - Removed `actionMenuEntriesComponentState` and introduced `actionMenuEntriesComponentSelector`
58 lines
1.3 KiB
TypeScript
58 lines
1.3 KiB
TypeScript
import {
|
|
IconBuildingSkyscraper,
|
|
IconCheckbox,
|
|
IconSettings,
|
|
IconTargetArrow,
|
|
IconUser,
|
|
} from 'twenty-ui';
|
|
|
|
import { Command, CommandType } from '../types/Command';
|
|
|
|
export const COMMAND_MENU_NAVIGATE_COMMANDS: { [key: string]: Command } = {
|
|
people: {
|
|
id: 'go-to-people',
|
|
to: '/objects/people',
|
|
label: 'Go to People',
|
|
type: CommandType.Navigate,
|
|
firstHotKey: 'G',
|
|
secondHotKey: 'P',
|
|
Icon: IconUser,
|
|
},
|
|
companies: {
|
|
id: 'go-to-companies',
|
|
to: '/objects/companies',
|
|
label: 'Go to Companies',
|
|
type: CommandType.Navigate,
|
|
firstHotKey: 'G',
|
|
secondHotKey: 'C',
|
|
Icon: IconBuildingSkyscraper,
|
|
},
|
|
opportunities: {
|
|
id: 'go-to-activities',
|
|
to: '/objects/opportunities',
|
|
label: 'Go to Opportunities',
|
|
type: CommandType.Navigate,
|
|
firstHotKey: 'G',
|
|
secondHotKey: 'O',
|
|
Icon: IconTargetArrow,
|
|
},
|
|
settings: {
|
|
id: 'go-to-settings',
|
|
to: '/settings/profile',
|
|
label: 'Go to Settings',
|
|
type: CommandType.Navigate,
|
|
firstHotKey: 'G',
|
|
secondHotKey: 'S',
|
|
Icon: IconSettings,
|
|
},
|
|
tasks: {
|
|
id: 'go-to-tasks',
|
|
to: '/objects/tasks',
|
|
label: 'Go to Tasks',
|
|
type: CommandType.Navigate,
|
|
firstHotKey: 'G',
|
|
secondHotKey: 'T',
|
|
Icon: IconCheckbox,
|
|
},
|
|
};
|