Migrate to index.html to generated one by electron-webpack

This commit is contained in:
Igor Gassmann 2017-12-04 22:08:08 -03:00
parent 086b511154
commit b83679fa4a
4 changed files with 8 additions and 25 deletions

View file

@ -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);

View file

@ -76,7 +76,7 @@ var init = function() {
<SnackBar />
</div>
</Provider>,
canvas
app
);
}
@ -87,7 +87,7 @@ var init = function() {
<Provider store={store}>
<SplashScreen onReadyToLaunch={onDaemonReady} />
</Provider>,
canvas
app
);
}
};

View file

@ -1,3 +1,5 @@
@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700);
html
{
height: 100%;

View file

@ -1,22 +0,0 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>LBRY</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700" rel="stylesheet">
<link href="./css/all.css" rel="stylesheet" type="text/css" media="screen,print" />
<link rel="icon" type="image/png" href="img/fav/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="img/fav/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="img/fav/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="img/fav/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="img/fav/favicon-16x16.png" sizes="16x16">
<meta name="msapplication-TileColor" content="#155B4A">
<meta name="msapplication-TileImage" content="/img/fav/mstile-144x144.png">
<meta name="theme-color" content="#155B4A">
</head>
<body>
<div id="canvas"></div>
<script src="./js/bundle.js"></script>
</body>
</html>