1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Exit app on "go back" at login page

This commit is contained in:
Dmitry Lyzo 2020-01-25 01:18:07 +03:00
parent d345e32333
commit 1ebf03d21b
2 changed files with 8 additions and 2 deletions

View file

@ -545,13 +545,18 @@ define(['loading', 'globalize', 'events', 'viewManager', 'layoutManager', 'skinM
page.back();
}
/**
* Pages of "no return" (Go back).
*/
var startPages = ['home', 'login'];
function canGoBack() {
var curr = current();
if (!curr) {
return false;
}
if (!document.querySelector('.dialogContainer') && curr.type === 'home') {
if (!document.querySelector('.dialogContainer') && startPages.indexOf(curr.type) !== -1) {
return false;
}
return page.canGoBack();