Show warning icon for duplicate domains

This commit is contained in:
MattIPv4 2021-05-07 16:22:13 +01:00
parent 4b6ae85630
commit f6fa039986
1 changed files with 13 additions and 9 deletions

View File

@ -49,16 +49,17 @@ THE SOFTWARE.
</div>
</div>
<template v-if="duplicateDomain">
<br />
<div class="message is-warning">
<div class="message-body">
{{ $t('templates.domainSections.server.oneOrMoreOtherDomainsAreAlsoNamed') }}
<code class="slim">{{ $props.data.domain.computed }}</code>.
{{ $t('templates.domainSections.server.thisWillCauseIssuesWithConfigGeneration') }}
</div>
<div v-if="duplicateDomain" class="field">
<div class="control">
<label class="text message is-warning">
<span class="message-body">
{{ $t('templates.domainSections.server.oneOrMoreOtherDomainsAreAlsoNamed') }}
<code class="slim">{{ $props.data.domain.computed }}</code>.
{{ $t('templates.domainSections.server.thisWillCauseIssuesWithConfigGeneration') }}
</span>
</label>
</div>
</template>
</div>
<div class="field is-horizontal">
<div class="field-label">
@ -204,6 +205,9 @@ THE SOFTWARE.
return this.$parent.$parent.$data.domains
.filter(d => d && d.server.domain.computed === this.$props.data.domain.computed).length > 1;
},
hasWarnings() {
return this.duplicateDomain;
},
},
watch: {
'$props.data.domain': {