From c40799816b3ad7c7ee9e9239ad06279e04604b7c Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Mon, 5 Mar 2018 06:51:29 +0300 Subject: [PATCH] fix(changelog): fix modal peers display --- src/app/app.js | 11 ++++++++--- src/background/menu/about_menu_template.js | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/app/app.js b/src/app/app.js index f00deeb..648cc97 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -7,6 +7,7 @@ import injectTapEventPlugin from 'react-tap-event-plugin'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; const { ipcRenderer, remote } = require('electron'); +const currentWindow = remote.getCurrentWindow() //var io = require("socket.io-client"); //window.torrentSocket = io(document.location.protocol + '//' + document.location.hostname + (process.env.NODE_ENV === 'production' ? '/' : ':8095/')); @@ -110,9 +111,13 @@ class App extends Component {
-
0 ? 'green' : 'grey'}}> - rats peers: {window.peers} {window.peers > 0 ? ' (p2p rats search enabled)' : ' (p2p rats search not available at this moment)'} -
+ { + !currentWindow.isModal() + && +
0 ? 'green' : 'grey'}}> + rats peers: {window.peers} {window.peers > 0 ? ' (p2p rats search enabled)' : ' (p2p rats search not available at this moment)'} +
+ }
); diff --git a/src/background/menu/about_menu_template.js b/src/background/menu/about_menu_template.js index ef30671..7ec59c2 100644 --- a/src/background/menu/about_menu_template.js +++ b/src/background/menu/about_menu_template.js @@ -20,7 +20,7 @@ export const aboutMenuTemplate = { slashes: true })) win.webContents.on('did-finish-load', () => { - win.send('url', '/changelog') + setTimeout(() => win.send('url', '/changelog'), 0) }); const handleRedirect = (e, url) => {