UI progress, material icons
This commit is contained in:
@@ -5,15 +5,19 @@ var h = require('virtual-dom/h')
|
||||
function Header (state, dispatch) {
|
||||
return h('.header', [
|
||||
h('.title', state.title),
|
||||
h('.nav.left-nav', [
|
||||
h('a.back.icon-left-open.disabled'),
|
||||
h('a.forward.icon-right-open')
|
||||
h('.nav.left', [
|
||||
h('i.icon.back.disabled', 'chevron_left'),
|
||||
h('i.icon.forward', 'chevron_right')
|
||||
]),
|
||||
h('.nav.right-nav', [
|
||||
h('a.add.icon-plus', {
|
||||
onclick: onAddTorrent
|
||||
})
|
||||
])
|
||||
(function () {
|
||||
if (state.player !== 'local') {
|
||||
return h('.nav.right', [
|
||||
h('i.icon.add', {
|
||||
onclick: onAddTorrent
|
||||
}, 'add')
|
||||
])
|
||||
}
|
||||
})()
|
||||
])
|
||||
|
||||
function onAddTorrent (e) {
|
||||
|
||||
@@ -6,7 +6,7 @@ function TorrentList (state, dispatch) {
|
||||
var list = state.torrents.map(function (torrent) {
|
||||
var style = {}
|
||||
if (torrent.posterURL) {
|
||||
style['background-image'] = 'linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)), url("' + torrent.posterURL + '")'
|
||||
style['background-image'] = 'linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%), url("' + torrent.posterURL + '")'
|
||||
}
|
||||
return h('.torrent', {
|
||||
style: style
|
||||
@@ -22,24 +22,24 @@ function TorrentList (state, dispatch) {
|
||||
})()
|
||||
])
|
||||
]),
|
||||
h('a.btn.play', {
|
||||
h('i.btn.icon.play', {
|
||||
className: !torrent.ready ? 'disabled' : '',
|
||||
onclick: openPlayer
|
||||
}, '▶'),
|
||||
}, 'play_arrow'),
|
||||
(function () {
|
||||
if (state.chromecast) {
|
||||
return h('a.btn.chromecast', {
|
||||
return h('i.btn.icon.chromecast', {
|
||||
className: !torrent.ready ? 'disabled' : '',
|
||||
onclick: openChromecast
|
||||
}, 'C')
|
||||
}, 'cast')
|
||||
}
|
||||
})(),
|
||||
(function () {
|
||||
if (state.airplay) {
|
||||
return h('a.btn.airplay', {
|
||||
return h('i.btn.icon.airplay', {
|
||||
className: !torrent.ready ? 'disabled' : '',
|
||||
onclick: openAirplay
|
||||
}, 'A')
|
||||
}, 'airplay')
|
||||
}
|
||||
})()
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user