diff --git a/static/js/index.js b/static/js/index.js index 078f128..b1019cf 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -487,16 +487,18 @@ function showApps(host) { $("div.game-container").remove(); host.getAppList().then(function(appList) { - if(appList.length == 0) { // TODO: Add placeholder graphic + $('#naclSpinner').hide(); + $("#game-grid").show(); + + if(appList.length == 0) { console.error('%c[index.js, showApps]', 'User\'s applist is empty') + var img = new Image() + img.src = 'static/res/applist_empty.svg' + document.getElementById('game-grid').appendChild(img) snackbarLog('Your game list is empty') return; // We stop the function right here } // if game grid is populated, empty it - - $('#naclSpinner').hide(); - $("#game-grid").show(); - const sortedAppList = sortTitles(appList, 'ASC'); sortedAppList.forEach(function(app) { diff --git a/static/res/applist_empty.svg b/static/res/applist_empty.svg new file mode 100644 index 0000000..e6aa737 --- /dev/null +++ b/static/res/applist_empty.svg @@ -0,0 +1 @@ + \ No newline at end of file