From b83679fa4a84a3d7883b6b85f03ad456723b26cb Mon Sep 17 00:00:00 2001 From: Igor Gassmann Date: Mon, 4 Dec 2017 22:08:08 -0300 Subject: [PATCH] Migrate to index.html to generated one by electron-webpack --- src/main/main.js | 5 ++++- src/renderer/main.js | 4 ++-- src/renderer/scss/_gui.scss | 2 ++ static/index.html | 22 ---------------------- 4 files changed, 8 insertions(+), 25 deletions(-) delete mode 100644 static/index.html diff --git a/src/main/main.js b/src/main/main.js index d09f95be6..accf28754 100644 --- a/src/main/main.js +++ b/src/main/main.js @@ -39,6 +39,9 @@ if (isDebug) { // Misc constants const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest'; const DAEMON_PATH = process.env.LBRY_DAEMON || path.join(__static, 'daemon/lbrynet-daemon'); +const rendererUrl = isDebug + ? `http://localhost:${process.env.ELECTRON_WEBPACK_WDS_PORT}` + : `file://${__dirname}/index.html` let client = jayson.client.http({ host: 'localhost', @@ -134,7 +137,7 @@ function createWindow () { if (isDebug) { win.webContents.openDevTools(); } - win.loadURL(`file://${__static}/index.html`) + win.loadURL(rendererUrl) if (openUri) { // We stored and received a URI that an external app requested before we had a window object win.webContents.on('did-finish-load', () => { win.webContents.send('open-uri-requested', openUri); diff --git a/src/renderer/main.js b/src/renderer/main.js index 759b2a179..772d66937 100644 --- a/src/renderer/main.js +++ b/src/renderer/main.js @@ -76,7 +76,7 @@ var init = function() { , - canvas + app ); } @@ -87,7 +87,7 @@ var init = function() { , - canvas + app ); } }; diff --git a/src/renderer/scss/_gui.scss b/src/renderer/scss/_gui.scss index 8a2ba2deb..5adb7686c 100644 --- a/src/renderer/scss/_gui.scss +++ b/src/renderer/scss/_gui.scss @@ -1,3 +1,5 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700); + html { height: 100%; diff --git a/static/index.html b/static/index.html deleted file mode 100644 index eb3946690..000000000 --- a/static/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - LBRY - - - - - - - - - - - - - -
- - -