aboutsummaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'main.js')
-rw-r--r--main.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/main.js b/main.js
index 6cb76c8..88c25b9 100644
--- a/main.js
+++ b/main.js
@@ -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