style
This commit is contained in:
@@ -4,7 +4,10 @@ var h = require('virtual-dom/h')
|
|||||||
var prettyBytes = require('pretty-bytes')
|
var prettyBytes = require('pretty-bytes')
|
||||||
|
|
||||||
function TorrentList (state, dispatch) {
|
function TorrentList (state, dispatch) {
|
||||||
var list = state.view.client.torrents.map(function (torrent) {
|
return h('.torrent-list', getList())
|
||||||
|
|
||||||
|
function getList () {
|
||||||
|
return state.view.client.torrents.map(function (torrent) {
|
||||||
var style = {}
|
var style = {}
|
||||||
if (torrent.posterURL) {
|
if (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 + '")'
|
style['background-image'] = 'linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%), url("' + torrent.posterURL + '")'
|
||||||
@@ -60,5 +63,5 @@ function TorrentList (state, dispatch) {
|
|||||||
dispatch('openAirplay', torrent)
|
dispatch('openAirplay', torrent)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return h('.torrent-list', list)
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user