Patch up the client remove ui
This commit is contained in:
@@ -150,11 +150,14 @@
|
||||
<h4 class="modal-title">Remove API Client</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
Removing API client {{ clientRemove.appId }} will also remove all access from scripts and apps using those credentials.
|
||||
<p>
|
||||
Removing client <b>{{ clientRemove.client.appId }}</b> will also remove all access from scripts and apps using those credentials.
|
||||
You may want to consult the other Cloudron admins first.
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-success" ng-click="clientRemove.submit()" ng-disabled="clientRemove.busy"><i class="fa fa-spinner fa-pulse" ng-show="clientRemove.busy"></i> Remove API Client</button>
|
||||
<button type="button" class="btn btn-danger" ng-click="clientRemove.submit()" ng-disabled="clientRemove.busy"><i class="fa fa-spinner fa-pulse" ng-show="clientRemove.busy"></i> Remove API Client</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -210,7 +210,7 @@ angular.module('Application').controller('AccountController', ['$scope', '$locat
|
||||
client: {},
|
||||
|
||||
show: function (client) {
|
||||
$scope.clientRemove.busy = true;
|
||||
$scope.clientRemove.busy = false;
|
||||
$scope.clientRemove.client = client;
|
||||
$('#clientRemoveModal').modal('show');
|
||||
},
|
||||
@@ -218,9 +218,16 @@ angular.module('Application').controller('AccountController', ['$scope', '$locat
|
||||
submit: function () {
|
||||
$scope.clientRemove.busy = true;
|
||||
|
||||
$scope.clientRemove.busy = false;
|
||||
Client.delOAuthClient($scope.clientRemove.client.id, function (error) {
|
||||
if (error) console.error(error);
|
||||
|
||||
$('#clientRemoveModal').modal('hide');
|
||||
$scope.clientRemove.busy = false;
|
||||
$scope.clientRemove.client = {};
|
||||
|
||||
refresh();
|
||||
|
||||
$('#clientRemoveModal').modal('hide');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user