diff --git a/static/js/index.js b/static/js/index.js index 3d81b45..dfc9a5f 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -320,7 +320,14 @@ function showApps() { } $('#quitCurrentApp').show(); $("#game-grid").empty(); + + // Show a spinner while the applist loads + $('#naclSpinnerMessage').text('Loading apps...'); + $('#naclSpinner').css('display', 'inline-block'); + api.getAppList().then(function (appList) { + $('#naclSpinner').hide(); + // if game grid is populated, empty it appList.forEach(function (app) { api.getBoxArt(app.id).then(function (resolvedPromise) { @@ -344,6 +351,8 @@ function showApps() { }); }); }, function (failedAppList) { + $('#naclSpinner').hide(); + console.log('Failed to get applist from host: ' + api.address); console.log('failed API object: '); console.log(api.toString());