diff --git a/src/js/login.js b/src/js/login.js index d536d92f0..305260795 100644 --- a/src/js/login.js +++ b/src/js/login.js @@ -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(); diff --git a/src/login.html b/src/login.html index 5dd26db54..9f43e539e 100644 --- a/src/login.html +++ b/src/login.html @@ -38,7 +38,7 @@ -
+
@@ -46,7 +46,7 @@

-

Cloudron Login

+

Login to {{ cloudronName }}


@@ -84,7 +84,7 @@

-

Password Reset

+

Password reset


@@ -110,7 +110,7 @@

-

Password Reset Email Sent

+

Password reset email sent


@@ -124,7 +124,7 @@

-

Set New Password

+

Set new password