Add duplicate domain warning
This commit is contained in:
parent
bc04209423
commit
799bb56431
|
@ -28,6 +28,8 @@ export default {
|
||||||
domain: 'Domain',
|
domain: 'Domain',
|
||||||
path: 'Path',
|
path: 'Path',
|
||||||
documentRoot: 'Document root',
|
documentRoot: 'Document root',
|
||||||
|
oneOrMoreOtherDomainsAreAlsoNamed: 'One or more other domains are also named',
|
||||||
|
thisWillCauseIssuesWithConfigGeneration: 'This will cause issues with config generation.',
|
||||||
wwwSubdomain: 'www subdomain',
|
wwwSubdomain: 'www subdomain',
|
||||||
cdnSubdomain: 'CDN subdomain',
|
cdnSubdomain: 'CDN subdomain',
|
||||||
redirectSubdomains: 'Redirect subdomains',
|
redirectSubdomains: 'Redirect subdomains',
|
||||||
|
|
|
@ -49,6 +49,17 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<template v-if="duplicateDomain">
|
||||||
|
<br />
|
||||||
|
<div class="message is-warning">
|
||||||
|
<div class="message-body">
|
||||||
|
{{ i18n.templates.domainSections.server.oneOrMoreOtherDomainsAreAlsoNamed }}
|
||||||
|
<code class="slim">{{ $props.data.domain.computed }}</code>.
|
||||||
|
{{ i18n.templates.domainSections.server.thisWillCauseIssuesWithConfigGeneration }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<div class="field is-horizontal">
|
<div class="field is-horizontal">
|
||||||
<div class="field-label">
|
<div class="field-label">
|
||||||
<label class="label">{{ i18n.templates.domainSections.server.wwwSubdomain }}</label>
|
<label class="label">{{ i18n.templates.domainSections.server.wwwSubdomain }}</label>
|
||||||
|
@ -192,7 +203,13 @@ THE SOFTWARE.
|
||||||
i18n,
|
i18n,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: computedFromDefaults(defaults, 'server'), // Getters & setters for the delegated data
|
computed: {
|
||||||
|
...computedFromDefaults(defaults, 'server'), // Getters & setters for the delegated data
|
||||||
|
duplicateDomain() {
|
||||||
|
return this.$parent.$parent.$data.domains
|
||||||
|
.filter(d => d && d.server.domain.computed === this.$props.data.domain.computed).length > 1;
|
||||||
|
},
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$props.data.domain': {
|
'$props.data.domain': {
|
||||||
handler(data) {
|
handler(data) {
|
||||||
|
|
Loading…
Reference in New Issue