aboutsummaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2018-02-17 18:03:34 +0000
committerJames Barnett <noreply@jamesbarnett.xyz>2018-02-17 18:03:34 +0000
commit2327e4e536e3be29ffd7af54ebba6ae24265c692 (patch)
tree1441aaa24076633c08fa05da4f17f202e6301af7 /main.js
parent6e21916395fac6861783c2b930b47242ac0f4c09 (diff)
downloadsql-plus-plus-2327e4e536e3be29ffd7af54ebba6ae24265c692.tar.xz
sql-plus-plus-2327e4e536e3be29ffd7af54ebba6ae24265c692.zip
WIP - Add basic unstyled static tabs. IPC needs work
Diffstat (limited to 'main.js')
-rw-r--r--main.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/main.js b/main.js
index cc89b11..6c19d99 100644
--- a/main.js
+++ b/main.js
@@ -25,7 +25,7 @@ function createMainWindow() {
function createQueryExecutorProcess() {
queryExecutorProcess = new BrowserWindow({
- show: false
+ show: true
});
queryExecutorProcess.loadURL(url.format({
@@ -57,8 +57,18 @@ app.on("activate", () => {
}
});
-ipcMain.on("queryExecutor.runQueryComplete", (event, payload) => uiWindow.webContents.send("queryExecutor.runQueryComplete", payload));
+const { webContents } = require('electron');
+
+ipcMain.on("queryExecutor.runQueryComplete", (event, payload) => {
+ webContents.getAllWebContents().forEach((w) => {
+ w.send("queryExecutor.runQueryComplete", payload);
+ })
+});
ipcMain.on("queryExecutor.runQuery", (event, payload) => queryExecutorProcess.webContents.send("queryExecutor.runQuery", payload));
-ipcMain.on("queryExecutor.queryTableMetadataComplete", (event, payload) => uiWindow.webContents.send("queryExecutor.queryTableMetadataComplete", payload));
+ipcMain.on("queryExecutor.queryTableMetadataComplete", (event, payload) => {
+ webContents.getAllWebContents().forEach((w) => {
+ w.send("queryExecutor.queryTableMetadataComplete", payload);
+ })
+});
ipcMain.on("queryExecutor.queryTableMetadata", (event, payload) => queryExecutorProcess.webContents.send("queryExecutor.queryTableMetadata", payload)); \ No newline at end of file