Allow to resubmit app email settings if service task failed

This commit is contained in:
Johannes Zellner
2025-07-23 17:31:56 +02:00
parent 88d66dee6e
commit 12f7a3fca0
+5 -8
View File
@@ -2,8 +2,9 @@
const props = defineProps([ 'app' ]);
import { Button, Radiobutton, InputGroup, FormGroup, TextInput, SingleSelect } from '@cloudron/pankow';
import { ref, onMounted } from 'vue';
import { Button, Radiobutton, InputGroup, FormGroup, TextInput, SingleSelect } from '@cloudron/pankow';
import { ISTATES } from '../../constants.js';
import AppsModel from '../../models/AppsModel.js';
import DomainsModel from '../../models/DomainsModel.js';
import MailboxesModel from '../../models/MailboxesModel.js';
@@ -135,7 +136,7 @@ onMounted(async () => {
<p v-html="$t('app.email.from.enableDescription', { domain: app.domain, domainConfigLink: ('/#/email/' + app.domain) })"></p>
<form @submit.prevent="onSendmailSubmit()" autocomplete="off">
<fieldset :disabled="enableMailbox === 0 || sendmailBusy || app.error || app.taskId">
<fieldset :disabled="enableMailbox === 0 || sendmailBusy || (app.error && app.error.details.installationState !== ISTATES.PENDING_SERVICES_CHANGE) || app.taskId">
<input type="submit" style="display: none;" :disabled="!sendmailMailboxName"/>
<FormGroup>
@@ -157,9 +158,7 @@ onMounted(async () => {
<p v-if="sendmailOptional" style="padding-left: 20px;">{{ $t('app.email.from.disableDescription') }}</p>
</FormGroup>
<br/>
<Button @click="onSendmailSubmit()" :loading="sendmailBusy" :disabled="sendmailBusy || app.error || app.taskId" v-tooltip="app.error ? 'App is in error state' : (app.taskId ? 'App is busy' : '')">{{ $t('app.email.from.saveAction') }}</Button>
<Button @click="onSendmailSubmit()" :loading="sendmailBusy" :disabled="sendmailBusy || (app.error && app.error.details.installationState !== ISTATES.PENDING_SERVICES_CHANGE) || app.taskId">{{ $t('app.email.from.saveAction') }}</Button>
</div>
<hr v-if="hasSendmail && hasRecvmail"/>
@@ -182,9 +181,7 @@ onMounted(async () => {
<p style="padding-left: 20px;">{{ $t('app.email.inbox.disableDescription') }}</p>
</FormGroup>
<br/>
<Button @click="onRecvmailSubmit()" :disabled="recvmailBusy || app.error || app.taskId" :loading="recvmailBusy" v-tooltip="app.error ? 'App is in error state' : (app.taskId ? 'App is busy' : '')">{{ $t('app.email.from.saveAction') }}</Button>
<Button @click="onRecvmailSubmit()" :disabled="recvmailBusy || (app.error && app.error.details.installationState !== ISTATES.PENDING_SERVICES_CHANGE) || app.taskId" :loading="recvmailBusy">{{ $t('app.email.from.saveAction') }}</Button>
</div>
</div>
</template>