Improve text for app installation and configuration

This commit is contained in:
Johannes Zellner
2017-01-29 01:00:15 -08:00
parent 1ac7570cfb
commit 836348cbc0
4 changed files with 32 additions and 27 deletions

View File

@@ -30,7 +30,7 @@
<div class="form-group" ng-class="{ 'has-error': (appConfigureForm.location.$dirty && appConfigureForm.location.$invalid) || (!appConfigureForm.location.$dirty && appConfigure.error.location) }">
<label class="control-label" for="appConfigureLocationInput">Location {{ appConfigure.error.location }} </label>
<div class="input-group form-inline">
<input type="text" class="form-control" ng-model="appConfigure.location" id="appConfigureLocationInput" name="location" placeholder="{{ appConfigure.usingAltDomain ? 'app.example.com' : 'Leave empty to use bare domain' }}" autofocus>
<input type="text" class="form-control" ng-model="appConfigure.location" id="appConfigureLocationInput" name="location" placeholder="{{ appConfigure.usingAltDomain ? 'other.domain.com' : 'Leave empty to use bare domain' }}" autofocus>
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
@@ -72,39 +72,38 @@
<br/>
<div class="form-group" ng-show="appConfigure.customAuth && !appConfigure.app.manifest.addons.email">
<label class="control-label">Access control</label>
<label class="control-label">User management</label>
<p>
This app has it's own access control and does not integrate with Cloudron Auth.
This app has it's own user management.
</p>
</div>
<div class="form-group" ng-show="!appConfigure.customAuth && appConfigure.app.sso === false">
<label class="control-label">Access control</label>
<label class="control-label">User management</label>
<p>
This app is configured to use it's own access control and does not integrate with Cloudron Auth.
This app is configured to use it's own user management.
</p>
</div>
<div class="form-group" ng-show="appConfigure.app.manifest.addons.email">
<label class="control-label">Access control</label>
<label class="control-label">User management</label>
<p>
This app authenticates all users using IMAP & SMTP and requires the mail server
to be enabled (under settings).
All users of this Cloudron have access.
</p>
</div>
<div class="form-group" ng-hide="appConfigure.customAuth || appConfigure.app.manifest.addons.email || appConfigure.app.sso === false">
<label class="control-label">Access control</label>
<label class="control-label">User management</label>
<div class="radio">
<label>
<input type="radio" ng-model="appConfigure.accessRestrictionOption" value="any">
All users
Allow all users from this Cloudron
</label>
</div>
<div class="radio">
<label>
<input type="radio" ng-model="appConfigure.accessRestrictionOption" value="groups" ng-disabled="groups.length <= 1">
Restrict to groups <span class="label label-danger" ng-show="appConfigure.accessRestrictionOption === 'groups' && !appConfigure.isAccessRestrictionValid()">Select at least one group</span>
Only allow the following user groups <span class="label label-danger" ng-show="appConfigure.accessRestrictionOption === 'groups' && !appConfigure.isAccessRestrictionValid()">Select at least one group</span>
</label>
</div>
<div ng-show="groups.length <= 1" style="margin-left: 20px;">No groups available. <a href="#/users">Create groups</a></div>
@@ -117,12 +116,14 @@
</div>
</div>
<br/>
<p ng-show="appConfigure.app.manifest.addons.email" class="text-danger">
This app only works if <a href="#/settings">Cloudron Email</a> is enabled.
</p>
<a href="" ng-click="appConfigure.advancedVisible = true" ng-hide="appConfigure.advancedVisible">Show advanced settings...</a>
<a href="" ng-click="appConfigure.advancedVisible = true" ng-hide="appConfigure.advancedVisible">Advanced settings...</a>
<div uib-collapse="!appConfigure.advancedVisible">
<div class="form-group">
<label class="control-label" for="memoryLimit">Maximum Memory Usage: <b>{{ appConfigure.memoryLimit ? appConfigure.memoryLimit / 1024 / 1024 + 'MB' : 'Default (256 MB)' }}</b></label>
<label class="control-label" for="memoryLimit">Maximum Memory Limit: <b>{{ appConfigure.memoryLimit ? appConfigure.memoryLimit / 1024 / 1024 + 'MB' : 'Default (256 MB)' }}</b></label>
<br/>
<div style="padding: 0 10px;">
<slider id="memoryLimit" ng-model="appConfigure.memoryLimit" step="134217728" tooltip="hide" ticks="appConfigure.memoryTicks" ticks-snap-bounds="67108864"></slider>

View File

@@ -1,9 +1,9 @@
'use strict';
angular.module('Application').controller('AppsController', ['$scope', '$location', '$timeout', 'Client', 'AppStore', function ($scope, $location, $timeout, Client, AppStore) {
$scope.HOST_PORT_MIN = 1024;
$scope.HOST_PORT_MAX = 65535;
$scope.installedApps = Client.getInstalledApps();
$scope.config = Client.getConfig();
$scope.user = Client.getUserInfo();

View File

@@ -36,45 +36,44 @@
<div ng-repeat="(env, info) in appInstall.portBindingsInfo">
<ng-form name="portInfo_form">
<div class="form-group" ng-class="{ 'has-error': (!appInstallForm.itemName{{$index}}.$dirty && appInstall.error.port) || (portInfo_form.itemName{{$index}}.$dirty && portInfo_form.itemName{{$index}}.$invalid) }">
<label class="control-label" for="inputPortInfo{{env}}"><input type="checkbox" ng-model="appInstall.portBindingsEnabled[env]"> {{ info.description }} ({{ hostPortMin }} - {{ hostPortMax }})</label>
<label class="control-label" for="inputPortInfo{{env}}"><input type="checkbox" ng-model="appInstall.portBindingsEnabled[env]"> {{ info.description }} ({{ HOST_PORT_MIN }} - {{ HOST_PORT_MAX }})</label>
<input type="number" class="form-control" ng-model="appInstall.portBindings[env]" ng-disabled="!appInstall.portBindingsEnabled[env]" id="inputPortInfo{{env}}" later-name="itemName{{$index}}" min="{{hostPortMin}}" max="{{hostPortMax}}" required>
</div>
</ng-form>
</div>
<div class="form-group" ng-show="appInstall.customAuth">
<label class="control-label">Access control</label>
<div class="form-group" ng-show="appInstall.customAuth && !appInstall.app.manifest.addons.email">
<label class="control-label">User management</label>
<p>
This app has it's own access control and does not use the Cloudron user management.
This app has it's own user management.
</p>
</div>
<div class="form-group" ng-show="appInstall.app.manifest.addons.email">
<label class="control-label">Access control</label>
<label class="control-label">User management</label>
<p>
This app authenticates all users using IMAP & SMTP and requires the mail server
to be enabled (under settings).
All users of this Cloudron have access.
</p>
</div>
<div class="form-group" ng-hide="appInstall.customAuth || appInstall.app.manifest.addons.email">
<label class="control-label">Access control</label>
<label class="control-label">User management</label>
<div class="radio" ng-show="appInstall.optionalSso">
<label>
<input type="radio" ng-model="appInstall.accessRestrictionOption" value="nosso">
Disable Cloudron user management
Leave user management to the app
</label>
</div>
<div class="radio">
<label>
<input type="radio" ng-model="appInstall.accessRestrictionOption" value="any">
All users
Allow all users from this Cloudron
</label>
</div>
<div class="radio">
<label>
<input type="radio" ng-model="appInstall.accessRestrictionOption" value="groups" ng-disabled="groups.length <= 1">
Restrict to groups <span class="label label-danger" ng-show="appInstall.accessRestrictionOption === 'groups' && !appInstall.isAccessRestrictionValid()">Select at least one group</span>
Only allow the following user groups <span class="label label-danger" ng-show="appInstall.accessRestrictionOption === 'groups' && !appInstall.isAccessRestrictionValid()">Select at least one group</span>
</label>
</div>
<div ng-show="groups.length <= 1" style="margin-left: 20px;">No groups available. <a href="#/users">Create groups</a></div>
@@ -87,7 +86,9 @@
</div>
</div>
<br/>
<p ng-show="appInstall.app.manifest.addons.email" class="text-danger">
This app only works if <a href="#/settings">Cloudron Email</a> is enabled.
</p>
<div class="hide">
<label class="control-label" for="appInstallCertificateInput" ng-show="config.isCustomDomain">Certificate (optional)</label>

View File

@@ -3,6 +3,9 @@
angular.module('Application').controller('AppStoreController', ['$scope', '$location', '$timeout', '$routeParams', 'Client', 'AppStore', function ($scope, $location, $timeout, $routeParams, Client, AppStore) {
Client.onReady(function () { if (!Client.getUserInfo().admin) $location.path('/'); });
$scope.HOST_PORT_MIN = 1024;
$scope.HOST_PORT_MAX = 65535;
$scope.ready = false;
$scope.apps = [];
$scope.config = Client.getConfig();