diff --git a/src/views/appstore.html b/src/views/appstore.html
index 226d70ce2..a9f6db9d7 100644
--- a/src/views/appstore.html
+++ b/src/views/appstore.html
@@ -273,6 +273,7 @@
+ Popular
All
Analytics
diff --git a/src/views/appstore.js b/src/views/appstore.js
index df7152dd0..509d3a790 100644
--- a/src/views/appstore.js
+++ b/src/views/appstore.js
@@ -363,21 +363,19 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.cachedCategory = $scope.category;
- $scope.ready = false;
-
AppStore.getAppsFast(function (error, apps) {
if (error) return $timeout($scope.showCategory.bind(null, event), 1000);
if (!$scope.category) {
$scope.apps = apps;
+ } else if ($scope.category === 'featured') {
+ $scope.apps = apps.filter(function (app) { return app.featured; });
} else {
$scope.apps = apps.filter(function (app) {
return app.manifest.tags.some(function (tag) { return $scope.category === tag; });
});
}
- $scope.ready = true;
-
document.getElementById('appstoreGrid').scrollIntoView();
});
};
@@ -533,9 +531,13 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
fetchUsers();
fetchGroups();
+ // start with featured apps listing
+ $scope.showCategory(null, 'featured');
+
// domains is required since we populate the dropdown with domains[0]
Client.getDomains(function (error, result) {
if (error) console.error(error);
+
$scope.domains = result;
// show install app dialog immediately if an app id was passed in the query