Fixes for the DomainDialog
This commit is contained in:
@@ -9,15 +9,6 @@ const emit = defineEmits([ 'success' ]);
|
||||
|
||||
const domainsModel = DomainsModel.create();
|
||||
|
||||
// currently, validation of wildcard with various provider is done server side
|
||||
const tlsProviders = [
|
||||
{ name: 'Let\'s Encrypt Prod', value: 'letsencrypt-prod' },
|
||||
{ name: 'Let\'s Encrypt Prod - Wildcard', value: 'letsencrypt-prod-wildcard' },
|
||||
{ name: 'Let\'s Encrypt Staging', value: 'letsencrypt-staging' },
|
||||
{ name: 'Let\'s Encrypt Staging - Wildcard', value: 'letsencrypt-staging-wildcard' },
|
||||
{ name: 'Custom Wildcard Certificate', value: 'fallback' },
|
||||
];
|
||||
|
||||
const dialog = useTemplateRef('dialog');
|
||||
|
||||
const busy = ref(false);
|
||||
@@ -87,6 +78,9 @@ defineExpose({
|
||||
customNameservers.value = d.config.customNameservers;
|
||||
|
||||
dialog.value.open();
|
||||
|
||||
// ensure we trigger this once
|
||||
setTimeout(checkValidity, 100);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -97,10 +91,9 @@ defineExpose({
|
||||
:title="editing ? $t('domains.domainDialog.editTitle', { domain: domain }) : $t('domains.domainDialog.addTitle')"
|
||||
:modal="busy"
|
||||
:confirm-busy="busy"
|
||||
:confirm-active="isFormValid"
|
||||
:confirm-active="!busy && isFormValid"
|
||||
:confirm-label="$t('main.dialog.save')"
|
||||
:reject-label="busy ? null : $t('main.dialog.cancel')"
|
||||
:reject-active="!busy"
|
||||
reject-style="secondary"
|
||||
@confirm="onSubmit()"
|
||||
>
|
||||
@@ -109,6 +102,7 @@ defineExpose({
|
||||
<form ref="form" @submit.prevent="onSubmit()" autocomplete="off" @input="checkValidity()">
|
||||
<fieldset :disabled="busy">
|
||||
<input style="display: none;" type="submit" :disabled="busy"/>
|
||||
|
||||
<p class="has-error text-center" v-show="error">{{ error }}</p>
|
||||
|
||||
<FormGroup>
|
||||
|
||||
@@ -73,7 +73,6 @@ function appProgressMessage(app) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
|
||||
// TODO maybe we can share those globally
|
||||
let config = null;
|
||||
let profile = null;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { API_ORIGIN } from '../constants.js';
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
|
||||
return {
|
||||
const exposed = {
|
||||
async list() {
|
||||
let error, result;
|
||||
try {
|
||||
@@ -57,10 +57,9 @@ function create() {
|
||||
|
||||
if (error || result.status !== 204) return [error || result];
|
||||
|
||||
// TODO is this still needed on update? a syncdns should also do this
|
||||
// this is done so that an out-of-sync dkim key can be synced
|
||||
// [error] = await domainsModel.setDnsRecords({ domain: domain, type: 'mail' });
|
||||
// if (error) console.error(error); // not fatal for now
|
||||
[error] = await exposed.setDnsRecords({ domain: domain, type: 'mail' });
|
||||
if (error) console.error(error); // not fatal for now
|
||||
|
||||
return [null];
|
||||
},
|
||||
@@ -121,6 +120,8 @@ function create() {
|
||||
return [null, result.body];
|
||||
},
|
||||
};
|
||||
|
||||
return exposed;
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user