Add UI to make user local

This commit is contained in:
Johannes Zellner
2022-04-24 22:11:35 +02:00
parent a8a995ca05
commit b3570a9faa
3 changed files with 57 additions and 2 deletions

View File

@@ -773,6 +773,32 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
}
};
$scope.makeLocal = {
busy: false,
user: null,
show: function (user) {
$scope.makeLocal.busy = false;
$scope.makeLocal.user = user;
$('#makeLocalModal').modal('show');
},
submit: function () {
$scope.makeLocal.busy = false;
Client.makeUserLocal($scope.makeLocal.user.id, function (error) {
if (error) return console.error('Failed to make user local.', error);
$scope.makeLocal.busy = false;
refreshUsers();
$('#makeLocalModal').modal('hide');
});
}
};
$scope.invitation = {
busy: false,
inviteLink: '',