Use http:// links when dev mode

This commit is contained in:
Yuya Ochiai
2017-03-06 22:00:21 +09:00
parent d8abb4b9c7
commit 8c851f0896
4 changed files with 20 additions and 17 deletions

View File

@@ -18,7 +18,8 @@ const appLauncher = new AutoLaunch({
function backToIndex(index) {
const target = typeof index === 'undefined' ? 0 : index;
remote.getCurrentWindow().loadURL(`file://${__dirname}/index.html?index=${target}`);
const indexURL = remote.getGlobal('isDev') ? 'http://localhost:8080/browser/index.html' : `file://${__dirname}/index.html`;
remote.getCurrentWindow().loadURL(`${indexURL}?index=${target}`);
}
const SettingsPage = React.createClass({