Better UX feedback when deleting repos

This commit is contained in:
Joseph Schorr 2014-01-20 17:03:16 -05:00
parent cbf80281ba
commit 0bfa172543
2 changed files with 6 additions and 1 deletions

View file

@ -622,6 +622,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
$scope.permissions = {'team': [], 'user': []};
$scope.logsShown = 0;
$scope.deleting = false;
$scope.loadLogs = function() {
$scope.logsShown++;
@ -777,6 +778,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
'repository': namespace + '/' + name
};
$scope.deleting = true;
ApiService.deleteRepository(null, params).then(function() {
$scope.repo = null;
@ -784,6 +786,7 @@ function RepoAdminCtrl($scope, Restangular, ApiService, $routeParams, $rootScope
document.location = '/repository/';
}, 1000);
}, function() {
$scope.deleting = true;
$('#cannotchangeModal').modal({});
});
};
@ -1479,6 +1482,7 @@ function OrgAdminCtrl($rootScope, $scope, Restangular, $routeParams, UserService
$scope.changeEmailForm.$setPristine();
$scope.organization = org;
}, function(resp) {
$scope.changingOrganization = false;
$scope.changeEmailError = result.data.message;
$timeout(function() {
$('#changeEmailForm').popover('show');

View file

@ -1,5 +1,6 @@
<div class="container" ng-show="deleting"><div class="quay-spinner"></div></div>
<div class="resource-view" resource="repository" error-message="'No repository found'"></div>
<div class="container repo repo-admin" ng-show="repo">
<div class="container repo repo-admin" ng-show="repo && !deleting">
<div class="header row">
<a href="{{ '/repository/' + repo.namespace + '/' + repo.name }}" class="back"><i class="fa fa-chevron-left"></i></a>
<h3>