Better loading state for the repo-list page
This commit is contained in:
parent
2933aa3272
commit
6b9258ef67
2 changed files with 13 additions and 4 deletions
|
@ -21,10 +21,12 @@
|
|||
$scope.page = 1;
|
||||
$scope.publicPageCount = null;
|
||||
$scope.allRepositories = {};
|
||||
$scope.loading = true;
|
||||
|
||||
// When loading the UserService, if the user is logged in, create a list of
|
||||
// relevant namespaces and collect the relevant repositories.
|
||||
UserService.updateUserIn($scope, function(user) {
|
||||
$scope.loading = false;
|
||||
if (!user.anonymous) {
|
||||
// Add our user to our list of namespaces.
|
||||
$scope.namespaces = [{
|
||||
|
|
|
@ -10,8 +10,11 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Loading -->
|
||||
<div class="cor-loader" ng-if="loading"></div>
|
||||
|
||||
<!-- Not signed in -->
|
||||
<div class="co-main-content-panel" ng-if="user.anonymous" >
|
||||
<div class="co-main-content-panel" ng-if="!loading && user.anonymous">
|
||||
<!-- The user is not logged in -->
|
||||
<div class="cor-container signin-container row">
|
||||
|
||||
|
@ -24,7 +27,7 @@
|
|||
</div>
|
||||
|
||||
<!-- Signed in -->
|
||||
<div class="row" ng-if="!user.anonymous">
|
||||
<div class="row" ng-if="!loading && !user.anonymous">
|
||||
<div class="col-lg-3 col-lg-push-9 col-md-3 col-md-push-9 col-sm-12">
|
||||
<div class="co-main-content-panel repo-list-namespaces">
|
||||
<h4>Users and Organizations</h4>
|
||||
|
@ -46,11 +49,15 @@
|
|||
<div class="col-lg-9 col-lg-pull-3 col-md-9 col-md-pull-3 col-sm-12">
|
||||
<div class="repo-list-panel co-main-content-panel">
|
||||
<!-- Starred Repository Listing -->
|
||||
<div class="repo-list-grid" repositories="starred_repositories.value" starred="true" toggle-star="toggleStar(repository)"></div>
|
||||
<div class="resource-view" resource="starred_repositories">
|
||||
<div class="repo-list-grid" repositories="starred_repositories.value" starred="true" toggle-star="toggleStar(repository)"></div>
|
||||
</div>
|
||||
|
||||
<!-- User and Org Repository Listings -->
|
||||
<div ng-repeat="namespace in namespaces">
|
||||
<div class="repo-list-grid" repositories="namespace.repositories.value" starred="false" user="user" namespace="namespace" toggle-star="toggleStar(repository)"></div>
|
||||
<div class="resource-view" resource="namespace">
|
||||
<div class="repo-list-grid" repositories="namespace.repositories.value" starred="false" user="user" namespace="namespace" toggle-star="toggleStar(repository)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Reference in a new issue