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
+3 -3
View File
@@ -108,7 +108,7 @@
<span class="icon-bar"></span>
</button>
<a class="navbar-brand navbar-brand-icon" href="#/"><img ng-src="{{ client.avatar }}" width="40" height="40"/></a>
<a class="navbar-brand" href="#/">{{ config.cloudronName || 'Cloudron' }}</a>
<a class="navbar-brand" href="#/">{{ status.cloudronName || 'Cloudron' }}</a>
</div>
<!-- /.navbar-header -->
@@ -157,8 +157,8 @@
<div ng-view id="ng-view" class="layout-content"></div>
<footer class="text-center ng-cloak">
<span class="text-muted" ng-bind-html="config.footer | markdown2html"></span>
<span class="version">v{{config.version}}</span>
<span class="text-muted" ng-bind-html="status.footer | markdown2html"></span>
<span class="version">v{{status.version}}</span>
</footer>
</div>
+2 -6
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;
});
+2 -6
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;
});
+3 -3
View File
@@ -50,7 +50,7 @@
<div class="col-md-12" style="text-align: center;">
<img width="128" height="128" style="margin-top: -84px" src="<%= apiOrigin %>/api/v1/cloudron/avatar"/>
<br/>
<h1><small>Login to</small> {{ cloudronName }}</h1>
<h1><small>Login to</small> {{ status.cloudronName || 'Cloudron' }}</h1>
</div>
</div>
<br/>
@@ -180,8 +180,8 @@
</div>
<footer class="text-center ng-cloak">
<span class="text-muted" ng-bind-html="footer | markdown2html"></span>
<span class="version">v{{version}}</span>
<span class="text-muted" ng-bind-html="status.footer | markdown2html"></span>
<span class="version">v{{status.version}}</span>
</footer>
</div>
+3 -3
View File
@@ -50,7 +50,7 @@
<div class="col-md-12" style="text-align: center;">
<img width="128" height="128" style="margin-top: -84px" src="<%= apiOrigin %>/api/v1/cloudron/avatar"/>
<br/>
<h1><small>Welcome to</small> {{ cloudronName }}</h1>
<h1><small>Welcome to</small> {{ status.cloudronName || 'Cloudron' }}</h1>
<h3>Please setup your account</h3>
</div>
</div>
@@ -136,8 +136,8 @@
</div>
<footer class="text-center ng-cloak">
<span class="text-muted" ng-bind-html="footer | markdown2html"></span>
<span class="version">v{{version}}</span>
<span class="text-muted" ng-bind-html="status.footer | markdown2html"></span>
<span class="version">v{{status.version}}</span>
</footer>
</div>