mirror of
https://github.com/Kong/insomnia.git
synced 2026-07-31 09:46:49 -04:00
Chore: Plugin window debug support in dev (#10181)
* add show/hide and start/stop plugin window support in dev app menu * change order
This commit is contained in:
@@ -25,7 +25,7 @@ import { docsBase } from '../common/documentation';
|
||||
import { getElectronStorage } from './electron-storage';
|
||||
import { ipcMainOn } from './ipc/electron';
|
||||
import { getLogDirectory } from './log';
|
||||
import { createPluginWindow, destroyPluginWindow } from './plugin-window';
|
||||
import { createPluginWindow, destroyPluginWindow, getPluginWindow } from './plugin-window';
|
||||
import { MAIN_WINDOW_SECURITY } from './window-security';
|
||||
|
||||
const DEFAULT_WIDTH = 1280;
|
||||
@@ -634,6 +634,21 @@ export function createWindow(): ElectronBrowserWindow {
|
||||
hiddenBrowserWindow ? stopHiddenBrowserWindow() : createHiddenBrowserWindow();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Show/hide plugin browser window ',
|
||||
click: () => {
|
||||
const pluginWindow = getPluginWindow();
|
||||
invariant(pluginWindow, 'pluginWindow is not defined');
|
||||
pluginWindow.isVisible() ? pluginWindow.hide() : pluginWindow.show();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Stop/start plugin browser window ',
|
||||
click: () => {
|
||||
const pluginWindow = getPluginWindow();
|
||||
pluginWindow ? destroyPluginWindow() : createPluginWindow();
|
||||
},
|
||||
},
|
||||
{
|
||||
// Simulates the OS "Open folder in Insomnia" flow without a packaged build
|
||||
// (Finder association / protocol handler only register for an installed app).
|
||||
|
||||
Reference in New Issue
Block a user