Added graphic when gamelist error

This commit is contained in:
Jorys_Paulin
2018-05-05 16:52:25 +02:00
parent c15ddb8597
commit 3234ffd4ea
2 changed files with 7 additions and 2 deletions

View File

@@ -484,6 +484,8 @@ function showApps(host) {
$('#naclSpinnerMessage').text('Loading apps...');
$('#naclSpinner').css('display', 'inline-block');
$("div.game-container").remove();
host.getAppList().then(function(appList) {
if(appList.length == 0) { // TODO: Add placeholder graphic
console.error('%c[index.js, showApps]', 'User\'s applist is empty')
@@ -491,7 +493,6 @@ function showApps(host) {
return; // We stop the function right here
}
// if game grid is populated, empty it
$("div.game-container").remove();
$('#naclSpinner').hide();
$("#game-grid").show();
@@ -543,7 +544,10 @@ function showApps(host) {
$(outerDiv).append(img);
});
}, function(failedAppList) {
$('#naclSpinner').hide(); // TODO: Add placeholder graphic
$('#naclSpinner').hide();
var img = new Image();
img.src = 'static/res/applist_error.svg'
$("#game-grid").html(img)
snackbarLog('Unable to get your games')
console.error('%c[index.js, showApps]', 'Failed to get applist from host: ' + host.hostname, '\n Host object:', host, host.toString());
});