Never hide the busy state on setup when it suceeded

In that case the whole page gets redirected and to avoid page flickering
we keep it at busy until the browser tears the whole page apart.
This commit is contained in:
Johannes Zellner
2017-03-16 09:58:17 +01:00
parent 74f2cd156f
commit 3c8d0b1b37

View File

@@ -26,12 +26,12 @@ app.controller('SetupController', ['$scope', '$http', 'Client', function ($scope
$scope.busy = true;
Client.createAdmin($scope.account.username, $scope.account.password, $scope.account.email, $scope.account.displayName, $scope.setupToken || $scope.instanceId, function (error) {
$scope.busy = false;
if (error && error.statusCode === 403) {
$scope.busy = false;
$scope.error = $scope.provider === 'ami' ? 'Wrong instance id' : 'Wrong setup token';
return;
} else if (error) {
$scope.busy = false;
console.error('Internal error', error);
$scope.error = error;
return;