Add provisional cloudron flow

This commit is contained in:
Johannes Zellner
2025-05-12 21:56:32 +02:00
parent cb7e54acaf
commit faf6ea83fa
3 changed files with 47 additions and 4 deletions
+5 -1
View File
@@ -1,7 +1,7 @@
<script setup>
import { ref, computed, onMounted } from 'vue';
import { Button, FormGroup, TextInput, PasswordInput, EmailInput } from 'pankow';
import { Button, Checkbox, FormGroup, TextInput, PasswordInput, EmailInput } from 'pankow';
import ProvisionModel from '../models/ProvisionModel.js';
import { redirectIfNeeded } from '../utils.js';
@@ -21,12 +21,14 @@ const username = ref('');
const password = ref('');
const firstTimeLoginUrl = ref('');
const setupToken = ref('');
const acceptLicense = ref(false);
const isValid = computed(() => {
if (!displayName.value) return false;
if (!email.value) return false;
if (!username.value) return false;
if (!password.value) return false;
if (!acceptLicense.value) return false;
return true;
});
@@ -120,6 +122,8 @@ onMounted(async () => {
<small class="text-danger">{{ formError.password }}</small>
</FormGroup>
<Checkbox v-model="acceptLicense" label="Accept Cloudron License" required/>
<Button :disabled="busy || !isValid" :loading="busy" @click="onOwnerSubmit()">Create Admin</Button>
</fieldset>
</form>