Fix small UI issue with repo toggle

This commit is contained in:
Joseph Schorr 2016-01-11 14:05:41 -05:00
parent fb43c1fb10
commit f2dff3a7e1
4 changed files with 10 additions and 5 deletions

View file

@ -15,15 +15,20 @@ angular.module('quay').directive('repoListView', function () {
},
controller: function($scope, $element, CookieService) {
$scope.resources = [];
$scope.loading = true;
$scope.showAsList = CookieService.get('quay.repoview') == 'list';
$scope.$watch('namespaces', function(namespaces) {
if (!namespaces) { return; }
$scope.loading = false;
$scope.resources = [];
namespaces.forEach(function(namespace) {
if (namespace && namespace.repositories) {
$scope.resources.push(namespace.repositories);
if (namespace.repositories.loading) {
$scope.loading = true;
}
}
});
}, true);