mirror of
https://github.com/digitalocean/nginxconfig.io
synced 2024-11-10 04:24:12 +00:00
Add a default email for the Let's Encrypt email field
This commit is contained in:
parent
62178fd7d2
commit
e103c015d6
1 changed files with 19 additions and 1 deletions
|
@ -138,7 +138,7 @@ limitations under the License.
|
|||
<input v-model="letsEncryptEmail"
|
||||
class="input"
|
||||
type="text"
|
||||
:placeholder="`info@${$parent.$props.data.server.domain.computed}`"
|
||||
:placeholder="$props.data.letsEncryptEmail.computed"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -223,6 +223,7 @@ limitations under the License.
|
|||
},
|
||||
letsEncryptEmail: {
|
||||
default: '',
|
||||
computed: 'info@example.com', // No default value, but a default computed
|
||||
enabled: true,
|
||||
},
|
||||
sslCertificate: {
|
||||
|
@ -346,6 +347,23 @@ limitations under the License.
|
|||
},
|
||||
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>
|
||||
|
|
Loading…
Reference in a new issue