Add Maildomain status view
This commit is contained in:
@@ -9,6 +9,7 @@ import { Button, TableView, Checkbox, InputDialog, Dialog, FormGroup, TextInput,
|
||||
import Section from '../components/Section.vue';
|
||||
import SettingsItem from '../components/SettingsItem.vue';
|
||||
import CatchAllSettingsItem from '../components/CatchAllSettingsItem.vue';
|
||||
import MailDomainStatus from '../components/MailDomainStatus.vue';
|
||||
import DomainsModel from '../models/DomainsModel.js';
|
||||
import MailModel from '../models/MailModel.js';
|
||||
import ProfileModel from '../models/ProfileModel.js';
|
||||
@@ -51,10 +52,7 @@ async function onAskIncomingToggle(value) {
|
||||
const [error] = await mailModel.setEnabled(domain.value, false);
|
||||
if (error) return console.error(error);
|
||||
|
||||
// TODO this has to be done in the backend here! reconfigureEmailApps();
|
||||
|
||||
refreshBusy.value = true;
|
||||
setTimeout(refreshMailConfig, 2000);
|
||||
await refreshMailConfig();
|
||||
}
|
||||
|
||||
async function onEnableIncoming() {
|
||||
@@ -70,11 +68,10 @@ async function onEnableIncoming() {
|
||||
if (error) console.error(error);
|
||||
}
|
||||
|
||||
setTimeout(async () => {
|
||||
await refreshMailConfig();
|
||||
enableIncomingDialog.value.close();
|
||||
enableIncomeBusy.value = false;
|
||||
}, 2000);
|
||||
await refreshMailConfig();
|
||||
|
||||
enableIncomingDialog.value.close();
|
||||
enableIncomeBusy.value = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -117,6 +114,7 @@ async function onSubmitSignature() {
|
||||
|
||||
|
||||
async function refreshMailConfig() {
|
||||
refreshBusy.value = true;
|
||||
|
||||
const [error, result] = await mailModel.config(domain.value);
|
||||
if (error) return console.error(error);
|
||||
@@ -200,6 +198,9 @@ onMounted(async () => {
|
||||
|
||||
</Section>
|
||||
|
||||
<!-- v-if here ensures the prop is already set when passed down to MailDomainStatus -->
|
||||
<MailDomainStatus v-if="domain" :domain="domain"/>
|
||||
|
||||
<Section :title="$t('emails.settings.title')">
|
||||
<SettingsItem>
|
||||
<FormGroup>
|
||||
|
||||
Reference in New Issue
Block a user