diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2018-02-18 21:20:37 +0000 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2018-02-18 21:20:37 +0000 |
| commit | 52f6783f63d2e2f52e06d14a97b5e00eab8ac1c0 (patch) | |
| tree | 2ab9f938b1c38ebbf46176208cf4fc31f406aefc /main.js | |
| parent | 0c0fdc4e61d07d8883c382a4dd9d1afaa1874c33 (diff) | |
| download | sql-plus-plus-52f6783f63d2e2f52e06d14a97b5e00eab8ac1c0.tar.xz sql-plus-plus-52f6783f63d2e2f52e06d14a97b5e00eab8ac1c0.zip | |
Add new connection dialog box - WIP
Diffstat (limited to 'main.js')
| -rw-r--r-- | main.js | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -5,6 +5,7 @@ const url = require("url"); let uiWindow; let queryExecutorProcess; +let newConnectionDialog; function createMainWindow() { uiWindow = new BrowserWindow({ @@ -25,7 +26,7 @@ function createMainWindow() { function createQueryExecutorProcess() { queryExecutorProcess = new BrowserWindow({ - show: true + show: false }); queryExecutorProcess.loadURL(url.format({ @@ -57,6 +58,27 @@ app.on("activate", () => { } }); +function createNewConnectionDialog() { + newConnectionDialog = new BrowserWindow({ + width: 400, + height: 470 + }); + newConnectionDialog.loadURL(url.format({ + pathname: path.join(__dirname, "new-connection.html"), + protocol: "file:", + slashes: true + })); + + newConnectionDialog.on("closed", () => { + newConnectionDialog = null; + }); +} + +ipcMain.on("instanceManager.openNewConnectionDialog", (event, payload) => { + createNewConnectionDialog(); +}); + + const { webContents } = require('electron'); // TODO - only send messages to instance manager which will route request to correct webView, rather than |