diff --git a/src/views/appstore.html b/src/views/appstore.html index 0d6af16c0..987cadca3 100644 --- a/src/views/appstore.html +++ b/src/views/appstore.html @@ -351,7 +351,7 @@
-
+
{{ 'appstore.unstable' | tr }}
diff --git a/src/views/appstore.js b/src/views/appstore.js index 62a5dae45..ba0d225dc 100644 --- a/src/views/appstore.js +++ b/src/views/appstore.js @@ -480,11 +480,20 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran $scope.popularApps = []; $scope.apps = apps.filter(function (app) { + // on searches we give highe priority if title or tagline matches + app.priority = 0; + + if (app.manifest.title.toUpperCase().indexOf(token) !== -1) { + app.priority = 2; + return true; + } + if (app.manifest.tagline.toUpperCase().indexOf(token) !== -1) { + app.priority = 1; + return true; + } if (app.manifest.id.toUpperCase().indexOf(token) !== -1) return true; - if (app.manifest.title.toUpperCase().indexOf(token) !== -1) return true; - if (app.manifest.tagline.toUpperCase().indexOf(token) !== -1) return true; - if (app.manifest.tags.join().toUpperCase().indexOf(token) !== -1) return true; if (app.manifest.description.toUpperCase().indexOf(token) !== -1) return true; + if (app.manifest.tags.join().toUpperCase().indexOf(token) !== -1) return true; return false; }); });