@@ -163,13 +163,7 @@ function dispatch (action, ...args) {
|
||||
if (action === 'back') {
|
||||
// TODO
|
||||
// window.history.back()
|
||||
if (state.url === '/player') {
|
||||
restoreBounds()
|
||||
closeServer()
|
||||
}
|
||||
state.url = '/'
|
||||
state.title = config.APP_NAME
|
||||
update()
|
||||
closePlayer()
|
||||
}
|
||||
if (action === 'forward') {
|
||||
// TODO
|
||||
@@ -404,6 +398,17 @@ function openPlayer (torrent) {
|
||||
})
|
||||
}
|
||||
|
||||
function closePlayer () {
|
||||
state.url = '/'
|
||||
state.title = config.APP_NAME
|
||||
if (state.isFullScreen) {
|
||||
electron.ipcRenderer.send('toggleFullScreen')
|
||||
}
|
||||
restoreBounds()
|
||||
closeServer()
|
||||
update()
|
||||
}
|
||||
|
||||
function deleteTorrent (torrent) {
|
||||
var ix = state.saved.torrents.findIndex((x) => x.infoHash === torrent.infoHash)
|
||||
if (ix > -1) state.saved.torrents.splice(ix, 1)
|
||||
|
||||
Reference in New Issue
Block a user