move more state into state.view
This commit is contained in:
@@ -11,10 +11,10 @@ function App (state, dispatch) {
|
||||
Header(state, dispatch),
|
||||
h('.content', [
|
||||
(function () {
|
||||
if (state.player === 'local') {
|
||||
return Player(state, dispatch)
|
||||
} else {
|
||||
if (state.view.url === '/') {
|
||||
return TorrentList(state, dispatch)
|
||||
} else if (state.view.url === '/player') {
|
||||
return Player(state, dispatch)
|
||||
}
|
||||
})()
|
||||
])
|
||||
|
||||
@@ -14,7 +14,7 @@ function Header (state, dispatch) {
|
||||
}, 'chevron_right')
|
||||
]),
|
||||
(function () {
|
||||
if (state.player !== 'local') {
|
||||
if (state.url !== '/player') {
|
||||
return h('.nav.right', [
|
||||
h('i.icon.add', {
|
||||
onclick: onAddTorrent
|
||||
|
||||
@@ -42,7 +42,7 @@ function TorrentList (state, dispatch) {
|
||||
}
|
||||
})(),
|
||||
(function () {
|
||||
if (state.view.airplay) {
|
||||
if (state.view.devices.airplay) {
|
||||
return h('i.btn.icon.airplay', {
|
||||
className: !torrent.ready ? 'disabled' : '',
|
||||
onclick: openAirplay
|
||||
|
||||
Reference in New Issue
Block a user