Fix small UI issue with repo toggle
This commit is contained in:
parent
fb43c1fb10
commit
f2dff3a7e1
4 changed files with 10 additions and 5 deletions
|
@ -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);
|
||||
|
|
Reference in a new issue