Fix loading help menu #235
3 changed files with 9 additions and 3 deletions
|
@ -8,7 +8,7 @@ Web UI version numbers should always match the corresponding version of LBRY App
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Added
|
### Added
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -16,7 +16,7 @@ Web UI version numbers should always match the corresponding version of LBRY App
|
||||||
*
|
*
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
*
|
* Fix help menu force reloading whole app
|
||||||
*
|
*
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
|
@ -36,7 +36,7 @@ const baseTemplate = [
|
||||||
label: 'Help',
|
label: 'Help',
|
||||||
click(item, focusedWindow) {
|
click(item, focusedWindow) {
|
||||||
if (focusedWindow) {
|
if (focusedWindow) {
|
||||||
focusedWindow.loadURL(`file://${__dirname}/../dist/index.html?help`);
|
focusedWindow.webContents.send('open-menu', '/help');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 => {
|
document.addEventListener("click", event => {
|
||||||
var target = event.target;
|
var target = event.target;
|
||||||
while (target && target !== document) {
|
while (target && target !== document) {
|
||||||
|
|
Loading…
Reference in a new issue