Show cloudron name in account setup view
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}]);
|
||||
|
||||
Reference in New Issue
Block a user