fixed duplicate quit app buttons from appearing

This commit is contained in:
R. Aidan Campbell 2016-08-27 09:12:55 -04:00
parent 4ec8decd45
commit 8929f5840b

View File

@ -336,8 +336,10 @@ function showApps() {
console.log(api.toString());
});
});
$(".mdl-layout__header-row").append($("<div>", {html:$("<img src=static\\res\\ic_remove_circle_white_24px.svg\>"), class: 'cancel-current', id: 'quitCurrentApp'}).append($("<span>", {html: 'Quit Current App', class:"game-title"})));
$('#quitCurrentApp').on('click', function() {api.quitApp(); api.refreshServerInfo(); });
if($('#quitCurrentApp').length === 0) {
$(".mdl-layout__header-row").append($("<div>", {html:$("<img src=static\\res\\ic_remove_circle_white_24px.svg\>"), class: 'cancel-current', id: 'quitCurrentApp'}).append($("<span>", {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);