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
|
@ -1,7 +1,3 @@
|
|||
.repo-list-table {
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.repo-list-table .repo-name-icon .avatar {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
|
|
@ -2,3 +2,7 @@
|
|||
float: right;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.repo-list-view-element {
|
||||
min-height: 40px;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
<div class="repo-list-view-element">
|
||||
<!-- Toggle -->
|
||||
<div class="repo-list-toggleb btn-group">
|
||||
<div class="repo-list-toggleb btn-group" ng-show="!loading">
|
||||
<i class="btn btn-default fa fa-th-large" ng-class="!showAsList ? 'active' : ''"
|
||||
ng-click="setShowAsList(false)" title="Grid View" data-container="body" bs-tooltip></i>
|
||||
<i class="btn btn-default fa fa-th-list" ng-class="showAsList ? 'active' : ''"
|
||||
|
|
|
@ -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