Show cloudron name in account setup view

This commit is contained in:
Johannes Zellner
2020-03-05 17:08:10 -08:00
parent dffaaf067d
commit 392da50f2c
2 changed files with 14 additions and 3 deletions

View File

@@ -11,9 +11,11 @@ app.controller('SetupAccountController', ['$scope', '$http', function ($scope, $
var API_ORIGIN = '<%= apiOrigin %>' || window.location.origin;
$scope.initialized = false;
$scope.busy = false;
$scope.error = null;
$scope.view = 'setup';
$scope.cloudronName = 'Cloudron';
$scope.existingUsername = !!search.username;
$scope.username = search.username || '';
@@ -69,4 +71,13 @@ app.controller('SetupAccountController', ['$scope', '$http', function ($scope, $
}).error(error);
};
$http.get(API_ORIGIN + '/api/v1/cloudron/status').success(function (data, status) {
$scope.initialized = true;
if (status !== 200) return;
$scope.cloudronName = data.cloudronName;
}).error(function () {
$scope.initialized = false;
});
}]);