@@ -163,13 +163,7 @@ function dispatch (action, ...args) {
|
|||||||
if (action === 'back') {
|
if (action === 'back') {
|
||||||
// TODO
|
// TODO
|
||||||
// window.history.back()
|
// window.history.back()
|
||||||
if (state.url === '/player') {
|
closePlayer()
|
||||||
restoreBounds()
|
|
||||||
closeServer()
|
|
||||||
}
|
|
||||||
state.url = '/'
|
|
||||||
state.title = config.APP_NAME
|
|
||||||
update()
|
|
||||||
}
|
}
|
||||||
if (action === 'forward') {
|
if (action === 'forward') {
|
||||||
// TODO
|
// 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) {
|
function deleteTorrent (torrent) {
|
||||||
var ix = state.saved.torrents.findIndex((x) => x.infoHash === torrent.infoHash)
|
var ix = state.saved.torrents.findIndex((x) => x.infoHash === torrent.infoHash)
|
||||||
if (ix > -1) state.saved.torrents.splice(ix, 1)
|
if (ix > -1) state.saved.torrents.splice(ix, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user