Show cloudron name in login view
This commit is contained in:
@@ -13,6 +13,7 @@ app.controller('LoginController', ['$scope', '$http', function ($scope, $http) {
|
||||
$scope.mode = '';
|
||||
$scope.busy = false;
|
||||
$scope.error = false;
|
||||
$scope.cloudronName = 'Cloudron';
|
||||
$scope.username = '';
|
||||
$scope.password = '';
|
||||
$scope.totpToken = '';
|
||||
@@ -112,6 +113,16 @@ app.controller('LoginController', ['$scope', '$http', function ($scope, $http) {
|
||||
setTimeout(function () { $('#inputNewPassword').focus(); }, 200);
|
||||
};
|
||||
|
||||
$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;
|
||||
});
|
||||
|
||||
// Init into the correct view
|
||||
if (search.passwordReset) $scope.showPasswordReset();
|
||||
else if (search.resetToken) $scope.showNewPassword();
|
||||
|
||||
Reference in New Issue
Block a user