Add a default email for the Let's Encrypt email field
parent
62178fd7d2
commit
e103c015d6
|
@ -138,7 +138,7 @@ limitations under the License.
|
||||||
<input v-model="letsEncryptEmail"
|
<input v-model="letsEncryptEmail"
|
||||||
class="input"
|
class="input"
|
||||||
type="text"
|
type="text"
|
||||||
:placeholder="`info@${$parent.$props.data.server.domain.computed}`"
|
:placeholder="$props.data.letsEncryptEmail.computed"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -223,6 +223,7 @@ limitations under the License.
|
||||||
},
|
},
|
||||||
letsEncryptEmail: {
|
letsEncryptEmail: {
|
||||||
default: '',
|
default: '',
|
||||||
|
computed: 'info@example.com', // No default value, but a default computed
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
sslCertificate: {
|
sslCertificate: {
|
||||||
|
@ -346,6 +347,23 @@ limitations under the License.
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
|
// Ensure there is a default email for Let's Encrypt
|
||||||
|
'$props.data.letsEncryptEmail': {
|
||||||
|
handler(data) {
|
||||||
|
if (!data.computed.trim()) {
|
||||||
|
data.computed = `info@${this.$parent.$props.data.server.domain.computed}`;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
|
'$parent.$props.data.server.domain': {
|
||||||
|
handler(data) {
|
||||||
|
if (!this.$props.data.letsEncryptEmail.value.trim()) {
|
||||||
|
this.$props.data.letsEncryptEmail.computed = `info@${data.computed}`;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue