Merge pull request #720 from dmitrylyzo/exit_on_back

Add app exit on "Go back"
This commit is contained in:
dkanada
2020-01-31 01:05:15 +09:00
committed by GitHub
6 changed files with 67 additions and 14 deletions
+6 -2
View File
@@ -1,4 +1,4 @@
define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playbackManager, focusManager, appRouter, dom) {
define(['playbackManager', 'focusManager', 'appRouter', 'dom', 'apphost'], function (playbackManager, focusManager, appRouter, dom, appHost) {
'use strict';
var lastInputTime = new Date().getTime();
@@ -96,7 +96,11 @@ define(['playbackManager', 'focusManager', 'appRouter', 'dom'], function (playba
appRouter.showSettings();
break;
case 'back':
appRouter.back();
if (appRouter.canGoBack()) {
appRouter.back();
} else if (appHost.supports('exit')) {
appHost.exit();
}
break;
case 'forward':
break;
+4 -2
View File
@@ -226,7 +226,8 @@ define([
autoFocus: false,
anonymous: true,
startup: true,
controller: "auth/login"
controller: "auth/login",
type: "login"
});
defineRoute({
path: "/metadataimages.html",
@@ -312,7 +313,8 @@ define([
autoFocus: false,
anonymous: true,
startup: true,
controller: "auth/selectserver"
controller: "auth/selectserver",
type: "selectserver"
});
defineRoute({
path: "/serveractivity.html",