Only show the headers if we have more than one domain with apps

This commit is contained in:
Johannes Zellner
2019-03-25 16:32:15 +01:00
parent 2621b5c047
commit 75642d785e
2 changed files with 7 additions and 1 deletions

View File

@@ -21,6 +21,12 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
return !!$scope.installedApps.find(function (a) { return a.domain === domain.domain; });
};
$scope.moreThanOneDomainHasApps = function () {
return $scope.installedApps.map(function (a) { return a.domain; }).filter(function (item, pos, self) {
return self.indexOf(item) === pos;
}).length > 1;
};
$scope.appConfigure = {
busy: false,
error: {},