diff --git a/index.html b/index.html index ff72d25..2ab423d 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,10 @@ Moonlight
+
+ + Quit Current App +
diff --git a/static/js/index.js b/static/js/index.js index 5fef39f..ea38c9d 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -312,6 +312,7 @@ function showApps() { console.log('Moved into showApps, but `api` did not initialize properly! Failing.'); return; } + $('#quitCurrentApp').show(); $("#game-grid").empty(); api.getAppList().then(function (appList) { // if game grid is populated, empty it @@ -336,11 +337,6 @@ function showApps() { console.log(api.toString()); }); }); - if($('#quitCurrentApp').length === 0) { - $(".mdl-layout__header-row").append($("
", {html:$(""), class: 'cancel-current', id: 'quitCurrentApp'}).append($("", {html: 'Quit Current App', class:"game-title"}))); - $('#quitCurrentApp').on('click', function() {api.quitApp(); api.refreshServerInfo(); }); - } - }, function (failedAppList) { console.log('Failed to get applist from host: ' + api.address); console.log('failed API object: '); @@ -354,6 +350,7 @@ function showApps() { function showHostsAndSettingsMode() { console.log('entering show hosts and settings mode.'); $('#backIcon').hide(); + $('#quitCurrentApp').hide(); $(".mdl-layout__header").show(); $("#main-content").children().not("#listener, #loadingSpinner, #naclSpinner").show(); $("#game-grid").hide();