diff --git a/dashboard/activation.html b/dashboard/activation.html index 669086de1..b20eb843e 100644 --- a/dashboard/activation.html +++ b/dashboard/activation.html @@ -1,153 +1,27 @@ - - - - + + + + + + + + + - Cloudron Setup - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cloudron is offline. Reconnecting... - -
-
-
-
-
-
-
-

Welcome to Cloudron

-

Set up Admin Account

-

{{ owner.error.generic }}

-
-
-
-
-
-
-
- - -
-
- - - A valid email is required for Let's Encrypt certificates. This email is local to your Cloudron. -
-
- - - {{ owner.error.username }} -
-
- - - Password must be at least 8 characters   -
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-

Cloudron is ready to use

-
-
-

-     Before you start: -

    -
  • - User management: Cloudron has a central user directory. When installing an app, - you can set it up to authenticate against this directory. -
  • -
    -
  • - Email Configuration: Apps are configured to send email based on the settings in the Email view. - This saves you the trouble of having to configure mail settings inside each app. -
  • -
    -
  • - Backups: Store your backups on storage services completely independent from your server. - You can use backups to seamlessly migrate your setup to another server. -
  • -
    -
  • - Updates: The Cloudron team tracks upstream releases and publishes app updates after testing. - Your apps are kept fresh & secure. -
  • -
-

-
-
- -
-
-
-
- - - - + Cloudron Setup + + + +
+ + diff --git a/dashboard/src/activation.js b/dashboard/src/activation.js new file mode 100644 index 000000000..f7b8f5d33 --- /dev/null +++ b/dashboard/src/activation.js @@ -0,0 +1,16 @@ +import { createApp } from 'vue'; + +import '@fontsource/noto-sans'; + +import i18n from './i18n.js'; +import ActivationView from './views/ActivationView.vue'; + +import './style.css'; + +(async function init() { + const app = createApp(ActivationView); + + app.use(await i18n()); + + app.mount('#app'); +})(); diff --git a/dashboard/src/models/CloudronModel.js b/dashboard/src/models/CloudronModel.js index c1f63257e..6ab5cf777 100644 --- a/dashboard/src/models/CloudronModel.js +++ b/dashboard/src/models/CloudronModel.js @@ -84,6 +84,17 @@ function create() { if (error || result.status !== 200) return [error || result]; return [null]; }, + async createAdmin(data) { + let error, result; + try { + result = await fetcher.post(`${API_ORIGIN}/api/v1/provision/activate`, data); + } catch (e) { + error = e; + } + + if (error || result.status !== 201) return [error || result]; + return [null, result.token]; + }, }; } diff --git a/dashboard/src/style.css b/dashboard/src/style.css index bffc893fc..3885aac66 100644 --- a/dashboard/src/style.css +++ b/dashboard/src/style.css @@ -235,4 +235,19 @@ tr:hover .table-actions { fieldset > * { margin: 6px 0; -} \ No newline at end of file +} + +/* Animations */ +.slide-fade-enter-active { + transition: all 0.2s ease-out; +} + +.slide-fade-leave-active { + transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1); +} + +.slide-fade-enter-from, +.slide-fade-leave-to { + transform: translateX(20px); + opacity: 0; +} diff --git a/dashboard/src/views/ActivationView.vue b/dashboard/src/views/ActivationView.vue new file mode 100644 index 000000000..6c81079bd --- /dev/null +++ b/dashboard/src/views/ActivationView.vue @@ -0,0 +1,154 @@ + + + + + diff --git a/dashboard/src/views/AppConfigureView.vue b/dashboard/src/views/AppConfigureView.vue index 81346187a..86178ba3c 100644 --- a/dashboard/src/views/AppConfigureView.vue +++ b/dashboard/src/views/AppConfigureView.vue @@ -248,20 +248,6 @@ onBeforeUnmount(() => {