mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Add back View > Toggle Sidebar item (#1548)
* Add View > Toggle Sidebar item back * Remove from _globalKeyMap to prevent double toggle * Remove sidebar toggle hotkeys
This commit is contained in:
parent
45d0a498cd
commit
4bfb6eb200
@ -98,8 +98,6 @@ export const hotKeyRefs = {
|
||||
|
||||
TOGGLE_MAIN_MENU: defineHotKey('toggleMainMenu', 'Toggle Main Menu'),
|
||||
|
||||
SIDEBAR_TOGGLE: defineHotKey('sidebar_toggle', 'Toggle Sidebar'),
|
||||
|
||||
REQUEST_QUICK_SWITCH: defineHotKey('request_quickSwitch', 'Switch Requests'),
|
||||
|
||||
SHOW_RECENT_REQUESTS: defineHotKey('request_showRecent', 'Show Recent Requests'),
|
||||
@ -189,11 +187,6 @@ const defaultRegistry: HotKeyRegistry = {
|
||||
keyComb(true, true, false, false, keyboardKeys.comma.keyCode),
|
||||
),
|
||||
|
||||
[hotKeyRefs.SIDEBAR_TOGGLE.id]: keyBinds(
|
||||
keyComb(false, false, false, true, keyboardKeys.backslash.keyCode),
|
||||
keyComb(true, false, false, false, keyboardKeys.backslash.keyCode),
|
||||
),
|
||||
|
||||
[hotKeyRefs.REQUEST_QUICK_SWITCH.id]: keyBinds(
|
||||
keyComb(false, false, false, true, keyboardKeys.p.keyCode),
|
||||
keyComb(true, false, false, false, keyboardKeys.p.keyCode),
|
||||
|
@ -205,6 +205,18 @@ export function createWindow() {
|
||||
saveZoomFactor(zoomFactor);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Toggle Sidebar',
|
||||
accelerator: 'CmdOrCtrl+\\',
|
||||
click: () => {
|
||||
const w = BrowserWindow.getFocusedWindow();
|
||||
if (!w || !w.webContents) {
|
||||
return;
|
||||
}
|
||||
|
||||
w.webContents.send('toggle-sidebar');
|
||||
},
|
||||
},
|
||||
{
|
||||
label: `Toggle ${MNEMONIC_SYM}DevTools`,
|
||||
click: () => mainWindow.toggleDevTools(),
|
||||
|
@ -41,7 +41,6 @@ const HOT_KEY_DEFS: Array<HotKeyDefinition> = [
|
||||
hotKeyRefs.REQUEST_FOCUS_URL,
|
||||
hotKeyRefs.RESPONSE_FOCUS,
|
||||
hotKeyRefs.REQUEST_TOGGLE_HTTP_METHOD_MENU,
|
||||
hotKeyRefs.SIDEBAR_TOGGLE,
|
||||
hotKeyRefs.SIDEBAR_FOCUS_FILTER,
|
||||
hotKeyRefs.REQUEST_TOGGLE_HISTORY,
|
||||
hotKeyRefs.SHOW_AUTOCOMPLETE,
|
||||
|
@ -246,7 +246,6 @@ class App extends PureComponent {
|
||||
await this._handleSetRequestPinned(this.props.activeRequest, !(metas && metas.pinned));
|
||||
},
|
||||
],
|
||||
[hotKeyRefs.SIDEBAR_TOGGLE, this._handleToggleSidebar],
|
||||
[hotKeyRefs.PLUGIN_RELOAD, this._handleReloadPlugins],
|
||||
[
|
||||
hotKeyRefs.ENVIRONMENT_UNCOVER_VARIABLES,
|
||||
|
Loading…
Reference in New Issue
Block a user