Split state into temp and saved

Also stop using IPC to calculate window width

Add default torrents--the Blender Foundation videos--not displayed yet
This commit is contained in:
DC
2016-03-05 15:44:57 -08:00
parent c2b5f7a7bb
commit 5b383d3ed0
9 changed files with 618 additions and 72 deletions

View File

@@ -10,9 +10,9 @@ var TorrentList = require('./torrent-list')
function App (state, dispatch) {
function getView () {
if (state.view.url === '/') {
if (state.temp.url === '/') {
return TorrentList(state, dispatch)
} else if (state.view.url === '/player') {
} else if (state.temp.url === '/player') {
return Player(state, dispatch)
}
}
@@ -20,8 +20,8 @@ function App (state, dispatch) {
// Show the header only when we're outside of fullscreen
// Also don't show it in the video player except in OSX
var isOSX = process.platform === 'darwin'
var isVideo = state.view.url === '/player'
var isFullScreen = state.view.isFullScreen
var isVideo = state.temp.url === '/player'
var isFullScreen = state.temp.isFullScreen
var header = !isFullScreen && (!isVideo || isOSX) ? Header(state, dispatch) : null
return hx`