From d52d8872bec05c0f3e2fe62e59fa64591ddc7cd9 Mon Sep 17 00:00:00 2001 From: Le Long Date: Tue, 13 Jun 2017 17:02:06 +0200 Subject: [PATCH 1/2] use ipcRenderer as bridge for communication between electron and ui app --- app/menu/main-menu.js | 2 +- ui/js/main.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/menu/main-menu.js b/app/menu/main-menu.js index 32fc5168f..082b116ac 100644 --- a/app/menu/main-menu.js +++ b/app/menu/main-menu.js @@ -36,7 +36,7 @@ const baseTemplate = [ label: 'Help', click(item, focusedWindow) { if (focusedWindow) { - focusedWindow.loadURL(`file://${__dirname}/../dist/index.html?help`); + focusedWindow.webContents.send('open-menu', '/help'); } } } diff --git a/ui/js/main.js b/ui/js/main.js index 741c441da..78eceb235 100644 --- a/ui/js/main.js +++ b/ui/js/main.js @@ -49,6 +49,12 @@ ipcRenderer.on("open-uri-requested", (event, uri) => { } }); +ipcRenderer.on("open-menu", (event, uri) => { + if (uri && uri.startsWith("/help")) { + app.store.dispatch(doNavigate("/help")); + } +}); + document.addEventListener("click", event => { var target = event.target; while (target && target !== document) { From bbaec6bfe02c44f58e899e354b60ec7a6b1b37f0 Mon Sep 17 00:00:00 2001 From: Le Long Date: Tue, 13 Jun 2017 17:03:18 +0200 Subject: [PATCH 2/2] add changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67dbfd505..0866dc356 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Web UI version numbers should always match the corresponding version of LBRY App ## [Unreleased] ### Added - * + * * ### Changed @@ -16,7 +16,7 @@ Web UI version numbers should always match the corresponding version of LBRY App * ### Fixed - * + * Fix help menu force reloading whole app * ### Deprecated