Video player polish
No header on Linux and OSX, just a back button on mouseover ESC exits fullscreen, or if already not in fullscreen, goes back More accurate scrub position Removed the calc(100% -38x) hack, replaced with flexbox
This commit is contained in:
@@ -84,6 +84,17 @@ function init () {
|
||||
electron.ipcRenderer.send('addTorrentFromPaste')
|
||||
})
|
||||
|
||||
document.addEventListener('keydown', function (e) {
|
||||
console.log('keydown ' + e.which)
|
||||
if (e.which === 27) { /* ESC means either exit fullscreen or go back */
|
||||
if (state.view.isFullScreen) {
|
||||
dispatch('toggleFullScreen')
|
||||
} else {
|
||||
dispatch('back')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('focus', function () {
|
||||
state.view.isFocused = true
|
||||
if (state.view.dock.badge > 0) electron.ipcRenderer.send('setBadge', '')
|
||||
|
||||
Reference in New Issue
Block a user