diff --git a/packages/insomnia-app/app/common/hotkeys.ts b/packages/insomnia-app/app/common/hotkeys.ts index da68cc0e80..5baf567213 100644 --- a/packages/insomnia-app/app/common/hotkeys.ts +++ b/packages/insomnia-app/app/common/hotkeys.ts @@ -70,7 +70,6 @@ export const hotKeyRefs: Record = { 'Show Keyboard Shortcuts', ), PREFERENCES_SHOW_GENERAL: defineHotKey('preferences_showGeneral', 'Show App Preferences'), - TOGGLE_MAIN_MENU: defineHotKey('toggleMainMenu', 'Toggle Main Menu'), REQUEST_QUICK_SWITCH: defineHotKey('request_quickSwitch', 'Switch Requests'), SHOW_RECENT_REQUESTS: defineHotKey('request_showRecent', 'Show Recent Requests'), SHOW_RECENT_REQUESTS_PREVIOUS: defineHotKey( @@ -131,10 +130,6 @@ const defaultRegistry: HotKeyRegistry = { keyComb(false, false, false, true, keyboardKeys.comma.keyCode), keyComb(true, false, false, false, keyboardKeys.comma.keyCode), ), - [hotKeyRefs.TOGGLE_MAIN_MENU.id]: keyBinds( - keyComb(false, true, false, true, keyboardKeys.comma.keyCode), - keyComb(true, true, false, false, keyboardKeys.comma.keyCode), - ), [hotKeyRefs.REQUEST_QUICK_SWITCH.id]: keyBinds( keyComb(false, false, false, true, keyboardKeys.p.keyCode), keyComb(true, false, false, false, keyboardKeys.p.keyCode), diff --git a/packages/insomnia-app/app/ui/components/dropdowns/workspace-dropdown.tsx b/packages/insomnia-app/app/ui/components/dropdowns/workspace-dropdown.tsx index 2aa1694f74..cda1a17fa5 100644 --- a/packages/insomnia-app/app/ui/components/dropdowns/workspace-dropdown.tsx +++ b/packages/insomnia-app/app/ui/components/dropdowns/workspace-dropdown.tsx @@ -7,7 +7,6 @@ import { AUTOBIND_CFG } from '../../../common/constants'; import { database as db } from '../../../common/database'; import { getWorkspaceLabel } from '../../../common/get-workspace-label'; import { hotKeyRefs } from '../../../common/hotkeys'; -import { executeHotKey } from '../../../common/hotkeys-listener'; import { RENDER_PURPOSE_NO_RENDER } from '../../../common/render'; import { isRequest } from '../../../models/request'; import { isRequestGroup } from '../../../models/request-group'; @@ -23,7 +22,6 @@ import { DropdownButton } from '../base/dropdown/dropdown-button'; import { DropdownDivider } from '../base/dropdown/dropdown-divider'; import { DropdownHint } from '../base/dropdown/dropdown-hint'; import { DropdownItem } from '../base/dropdown/dropdown-item'; -import { KeydownBinder } from '../keydown-binder'; import { showError, showModal } from '../modals'; import { showGenerateConfigModal } from '../modals/generate-config-modal'; import { SettingsModal, TAB_INDEX_EXPORT } from '../modals/settings-modal'; @@ -111,12 +109,6 @@ export class UnconnectedWorkspaceDropdown extends PureComponent { showModal(WorkspaceSettingsModal); } - _handleKeydown(event: KeyboardEvent) { - executeHotKey(event, hotKeyRefs.TOGGLE_MAIN_MENU, () => { - this._dropdown?.toggle(true); - }); - } - async _handleGenerateConfig(label: string) { const { activeApiSpec } = this.props; if (!activeApiSpec) { @@ -145,72 +137,70 @@ export class UnconnectedWorkspaceDropdown extends PureComponent { } return ( - - )} - > - -
- {activeWorkspaceName} -
- - {isLoading ? : null} -
- - {getWorkspaceLabel(activeWorkspace).singular} Settings - - + )} + > + +
+ {activeWorkspaceName} +
+ + {isLoading ? : null} +
+ + {getWorkspaceLabel(activeWorkspace).singular} Settings + + - - Import/Export - + + Import/Export + - {actionPlugins.length > 0 && Plugins} - {actionPlugins.map((p: WorkspaceAction) => ( - this._handlePluginClick(p, activeWorkspace)} - stayOpenAfterClick - > - {loadingActions[p.label] ? ( - - ) : ( - - )} - {p.label} - - ))} - {isDesign(activeWorkspace) && ( - <> - {configGeneratorPlugins.length > 0 && ( - Config Generators - )} - {configGeneratorPlugins.map((p: ConfigGenerator) => ( - - - {p.label} - - ))} - - )} -
-
+ {actionPlugins.length > 0 && Plugins} + {actionPlugins.map((p: WorkspaceAction) => ( + this._handlePluginClick(p, activeWorkspace)} + stayOpenAfterClick + > + {loadingActions[p.label] ? ( + + ) : ( + + )} + {p.label} + + ))} + {isDesign(activeWorkspace) && ( + <> + {configGeneratorPlugins.length > 0 && ( + Config Generators + )} + {configGeneratorPlugins.map((p: ConfigGenerator) => ( + + + {p.label} + + ))} + + )} + ); } }