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:
parent
d345e32333
commit
1ebf03d21b
2 changed files with 8 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue