diff --git a/webadmin/src/theme.scss b/webadmin/src/theme.scss index 92e6d1f47..6e6cda6d2 100644 --- a/webadmin/src/theme.scss +++ b/webadmin/src/theme.scss @@ -92,7 +92,6 @@ html { } .highlight { - transition: background-color 500ms; } .highlight:hover { @@ -147,6 +146,12 @@ html { cursor: pointer; } +.appstore-item-content-testing { + background-color: rgb(201, 201, 201); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 64px 64px; +} + .appstore-item-content-title { text-overflow: ellipsis; white-space: nowrap; diff --git a/webadmin/src/views/appstore.html b/webadmin/src/views/appstore.html index 29634c681..90bdf5ae3 100644 --- a/webadmin/src/views/appstore.html +++ b/webadmin/src/views/appstore.html @@ -94,11 +94,13 @@ Media Sync Code Hosting Wiki +
+ Testing
-
+
diff --git a/webadmin/src/views/appstore.js b/webadmin/src/views/appstore.js index 8a4204c02..d9a00402a 100644 --- a/webadmin/src/views/appstore.js +++ b/webadmin/src/views/appstore.js @@ -20,6 +20,25 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca mediaLinks: [] }; + + function getAppList(callback) { + AppStore.getApps(function (error, apps) { + if (error) return callback(error); + + Client.getNonApprovedApps(function (error, result) { + if (error) return callback(error); + + // add testing tag to the manifest for UI and search reasons + result.forEach(function (app) { + app.manifest.tags.push('testing'); + }); + + callback(null, apps.concat(result)); + }); + }); + } + + // TODO does not support testing apps in search $scope.search = function () { if (!$scope.searchString) return $scope.showCategory(null, $scope.cachedCategory); @@ -49,7 +68,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca $scope.ready = false; - AppStore.getApps(function (error, apps) { + getAppList(function (error, apps) { if (error) return $timeout($scope.showCategory.bind(null, event), 1000); if (!$scope.category) { @@ -156,28 +175,21 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca function refresh() { $scope.ready = false; - AppStore.getApps(function (error, apps) { + getAppList(function (error, apps) { if (error) { console.error(error); return $timeout(refresh, 1000); } - Client.getNonApprovedApps(function (error, result) { - if (error) { - console.error(error); - return $timeout(refresh, 1000); - } + $scope.apps = apps; - $scope.apps = apps.concat(result); + // show install app dialog immediately if an app id was passed in the query + if ($routeParams.appId) { + var found = apps.filter(function (app) { return (app.id === $routeParams.appId); }); + if (found.length) $scope.showInstall(found[0]); + } - // show install app dialog immediately if an app id was passed in the query - if ($routeParams.appId) { - var found = apps.filter(function (app) { return (app.id === $routeParams.appId); }); - if (found.length) $scope.showInstall(found[0]); - } - - $scope.ready = true; - }); + $scope.ready = true; }); }