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();
|
page.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pages of "no return" (Go back).
|
||||||
|
*/
|
||||||
|
var startPages = ['home', 'login'];
|
||||||
|
|
||||||
function canGoBack() {
|
function canGoBack() {
|
||||||
var curr = current();
|
var curr = current();
|
||||||
if (!curr) {
|
if (!curr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!document.querySelector('.dialogContainer') && curr.type === 'home') {
|
if (!document.querySelector('.dialogContainer') && startPages.indexOf(curr.type) !== -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return page.canGoBack();
|
return page.canGoBack();
|
||||||
|
|
|
@ -226,7 +226,8 @@ define([
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
anonymous: true,
|
anonymous: true,
|
||||||
startup: true,
|
startup: true,
|
||||||
controller: "auth/login"
|
controller: "auth/login",
|
||||||
|
type: "login"
|
||||||
});
|
});
|
||||||
defineRoute({
|
defineRoute({
|
||||||
path: "/metadataimages.html",
|
path: "/metadataimages.html",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue