From 9c8a1a829f75f9783596a48c8cf91260d61c02c4 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Sun, 7 Jul 2019 18:00:04 -0400 Subject: [PATCH] added a way to reopen sengi page --- main-electron.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/main-electron.js b/main-electron.js index 7398cae6..63e7eb0a 100644 --- a/main-electron.js +++ b/main-electron.js @@ -19,12 +19,20 @@ function createWindow() { }); var server = http.createServer(requestHandler).listen(9527); - win.loadURL("http://localhost:9527"); + const sengiUrl = "http://localhost:9527"; + win.loadURL(sengiUrl); const template = [ { label: "View", submenu: [ + { + label: "Return on Sengi", + click() { + win.loadURL(sengiUrl); + } + }, + { type: "separator" }, { role: "reload" }, { role: "forcereload" }, { type: "separator" }, @@ -75,7 +83,17 @@ function createWindow() { }, { label: "View", - submenu: [{ role: "reload" }, { role: "forcereload" }] + submenu: [ + { + label: "Return on Sengi", + click() { + win.loadURL(sengiUrl); + } + }, + { type: "separator" }, + { role: "reload" }, + { role: "forcereload" } + ] }, { role: "help",