diff --git a/package.json b/package.json
index 7ae16d7f..b90c848c 100644
--- a/package.json
+++ b/package.json
@@ -16,7 +16,7 @@
"create-torrent": "^3.22.1",
"debug": "^2.2.0",
"drag-drop": "^2.3.1",
- "hyperx": "^1.4.0",
+ "hyperx": "^2.0.0",
"network-address": "^1.1.0",
"pretty-bytes": "^3.0.0",
"throttleit": "^1.0.0",
diff --git a/renderer/views/app.js b/renderer/views/app.js
index b691ba06..ad257ca1 100644
--- a/renderer/views/app.js
+++ b/renderer/views/app.js
@@ -18,9 +18,9 @@ function App (state, dispatch) {
}
return hx`
-
+
${Header(state, dispatch)}
-
${getView()}
+ ${getView()}
`
}
diff --git a/renderer/views/header.js b/renderer/views/header.js
index eb9bd3cf..d9bf393c 100644
--- a/renderer/views/header.js
+++ b/renderer/views/header.js
@@ -6,13 +6,13 @@ var hx = hyperx(h)
function Header (state, dispatch) {
return hx`
-
+
@@ -20,13 +20,13 @@ function Header (state, dispatch) {
function getTitle () {
if (process.platform === 'darwin') {
- return hx`${state.view.title}`
+ return hx`${state.view.title}
`
}
}
function plusButton () {
if (state.view.url !== '/player') {
- return hx`add`
+ return hx`add`
}
}
diff --git a/renderer/views/player.js b/renderer/views/player.js
index 49c8f08b..d8bdb88a 100644
--- a/renderer/views/player.js
+++ b/renderer/views/player.js
@@ -26,7 +26,7 @@ function Player (state, dispatch) {
// Show the video as large as will fit in the window, play immediately
return hx`
-
+
- dispatch('playPause')}>
+ dispatch('playPause')}>
${state.video.isPaused ? 'play_arrow' : 'pause'}
@@ -104,14 +104,14 @@ function renderLoadingBar (state) {
// Output an list of rectangles to show loading progress
return hx`
-
+
${parts.map(function (part) {
var style = {
left: (100 * part.start / numParts) + '%',
width: (100 * part.count / numParts) + '%'
}
- return hx`
`
+ return hx``
})}
`
diff --git a/renderer/views/torrent-list.js b/renderer/views/torrent-list.js
index 1c387bdd..e510d96c 100644
--- a/renderer/views/torrent-list.js
+++ b/renderer/views/torrent-list.js
@@ -11,7 +11,7 @@ function TorrentList (state, dispatch) {
: []
var list = torrents.map((torrent) => renderTorrent(state, dispatch, torrent))
- return hx`${list}`
+ return hx`${list}
`
}
// Renders a torrent in the torrent list
@@ -29,14 +29,15 @@ function renderTorrent (state, dispatch, torrent) {
var elements = [
renderTorrentMetadata(torrent),
hx`
- dispatch('deleteTorrent', torrent)}>
close
`,
hx`
dispatch('openPlayer', torrent)}>
play_arrow
@@ -46,7 +47,7 @@ function renderTorrent (state, dispatch, torrent) {
if (state.view.chromecast) {
elements.push(hx`
dispatch('openChromecast', torrent)}>
cast
@@ -56,23 +57,23 @@ function renderTorrent (state, dispatch, torrent) {
if (state.view.devices.airplay) {
elements.push(hx`
dispatch('openAirplay', torrent)}>
airplay
`)
}
- return hx`${elements}`
+ return hx`${elements}
`
}
// Renders the torrent name and download progress
function renderTorrentMetadata (torrent) {
return hx`
-
- ${torrent.name || 'Loading torrent...'}
-
- ${Math.floor(100 * torrent.progress)}%
+