Pick public info from status object

This commit is contained in:
Johannes Zellner
2020-03-06 17:50:34 -08:00
parent 52a8081d0f
commit 34c8baa744
5 changed files with 13 additions and 21 deletions

View File

@@ -32,9 +32,7 @@ app.controller('LoginController', ['$scope', '$http', function ($scope, $http) {
$scope.mode = '';
$scope.busy = false;
$scope.error = false;
$scope.cloudronName = 'Cloudron';
$scope.footer = '';
$scope.version = '';
$scope.status = null;
$scope.username = '';
$scope.password = '';
$scope.totpToken = '';
@@ -139,9 +137,7 @@ app.controller('LoginController', ['$scope', '$http', function ($scope, $http) {
if (status !== 200) return;
$scope.cloudronName = data.cloudronName;
$scope.footer = data.footer;
$scope.version = data.version;
$scope.status = data.status;
}).error(function () {
$scope.initialized = false;
});

View File

@@ -33,9 +33,7 @@ app.controller('SetupAccountController', ['$scope', '$http', function ($scope, $
$scope.busy = false;
$scope.error = null;
$scope.view = 'setup';
$scope.cloudronName = 'Cloudron';
$scope.footer = '';
$scope.version = '';
$scope.status = null;
$scope.existingUsername = !!search.username;
$scope.username = search.username || '';
@@ -96,9 +94,7 @@ app.controller('SetupAccountController', ['$scope', '$http', function ($scope, $
if (status !== 200) return;
$scope.cloudronName = data.cloudronName;
$scope.footer = data.footer;
$scope.version = data.version;
$scope.status = data;
}).error(function () {
$scope.initialized = false;
});