diff --git a/src/js/setup.js b/src/js/setup.js index d21845b15..33a7766cf 100644 --- a/src/js/setup.js +++ b/src/js/setup.js @@ -12,56 +12,40 @@ app.controller('SetupController', ['$scope', 'Client', function ($scope, Client) $scope.client = Client; $scope.view = ''; - $scope.busy = true; - $scope.account = { - email: '', - displayName: '', - requireEmail: true, - username: '', - password: '' - }; - $scope.error = null; + $scope.initialized = false; $scope.apiServerOrigin = ''; $scope.webServerOrigin = ''; - $scope.activateCloudron = function () { - $scope.busy = true; - $scope.error = null; - - Client.createAdmin($scope.account.username, $scope.account.password, $scope.account.email, $scope.account.displayName, function (error) { - if (error && error.statusCode === 400) { - $scope.busy = false; - $scope.error = { username: error.message }; - $scope.account.username = ''; - $scope.ownerForm.username.$setPristine(); - setTimeout(function () { $('#inputUsername').focus(); }, 200); - return; - } else if (error) { - $scope.busy = false; - console.error('Internal error', error); - $scope.error = { generic: error.message }; - return; - } - - window.location.href = '/'; - }); - }; - - $scope.email = { + $scope.owner = { error: null, busy: false, - submit: function () { - - } - }; - - $scope.invite = { - error: null, - busy: false, + email: '', + displayName: '', + username: '', + password: '', submit: function () { + $scope.owner.busy = true; + $scope.owner.error = null; + Client.createAdmin($scope.owner.username, $scope.owner.password, $scope.owner.email, $scope.owner.displayName, function (error) { + if (error && error.statusCode === 400) { + $scope.owner.busy = false; + $scope.owner.error = { username: error.message }; + $scope.owner.username = ''; + $scope.ownerForm.username.$setPristine(); + setTimeout(function () { $('#inputUsername').focus(); }, 200); + return; + } else if (error) { + $scope.owner.busy = false; + console.error('Internal error', error); + $scope.owner.error = { generic: error.message }; + return; + } + + window.location.href = '/'; + }); } }; @@ -90,11 +74,12 @@ app.controller('SetupController', ['$scope', 'Client', function ($scope, Client) } } - function setView() { - if (search.view === 'owner') $scope.view = 'owner'; - else if (search.view === 'email') $scope.view = 'email'; - else if (search.view === 'invite') $scope.view = 'invite'; - else $scope.view = 'owner'; + function setView(view) { + if (view === 'finished') { + $scope.view = 'finished'; + } else { + $scope.view = 'owner'; + } } function init() { @@ -102,12 +87,12 @@ app.controller('SetupController', ['$scope', 'Client', function ($scope, Client) if (error) return Client.initError(error, init); redirectIfNeeded(status); - setView(); + setView(search.view); $scope.apiServerOrigin = status.apiServerOrigin; $scope.webServerOrigin = status.webServerOrigin; - $scope.busy = false; + $scope.initialized = true; // Ensure we have a good autofocus setTimeout(function () { diff --git a/src/setup.html b/src/setup.html index 38b2bbf53..cef7cc0a9 100644 --- a/src/setup.html +++ b/src/setup.html @@ -42,22 +42,15 @@ Cloudron is offline. Reconnecting... -
- -
-
- -
-
- -
+
+
-
+

Welcome to Cloudron

-

Setup Owner Account

+

Setup Admin Account


@@ -65,21 +58,22 @@
- - + +
-
- - +
+ + + Email is local to your Cloudron. A valid email is required for Let's Encrypt certificates.
-
- -

{{ error.username }}

- +
+ +

{{ owner.error.username }}

+
- - + +
Password must be atleast 8 characters
@@ -90,7 +84,7 @@
- +
@@ -98,52 +92,41 @@
-
+
-
-
-
-
-

Welcome to Cloudron

-

Setup Email Sending

-
+
+
+
+

Before you install the first app

-
-
- -
-
-
-
- -
+
+
+
+

+ A few notes about apps on your Cloudron: +

    +
  • + Apps are pre-setup to work out-of-the box. + This also includes for example email sending configurations. +
    + The dashboard will help you to ensure emails can be delivered. +
  • +
    +
  • + Cloudron has a built-in user directory and most apps are configured to use that by default. +
    + User integration and access can be configured per app. +
  • +
+

+
+
+
+ -
-
- -
-
-
-
-
-
-

Welcome to Cloudron

-

Invite your first Users

-
-
-
-
- -
-
-
-
- -
-
-
+
diff --git a/src/setupdns.html b/src/setupdns.html index c305f8da0..cd6f8433a 100644 --- a/src/setupdns.html +++ b/src/setupdns.html @@ -58,19 +58,22 @@
-
-

Domain Setup

-

{{ error.setup }}

-
+
+

Domain Setup

+

{{ error.setup }}

+
-
-
- - -
-

Apps will be installed on subdomains of this domain. You can add more domains later.

+
+
+ + +

+ Apps will be installed on subdomains of this domain, the dashboard at the my. subdomain.
+ You can add more domains later. +

+