mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
fixed quotes, indent, simpler property
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<button @click="copyDNSToClipboard()" class='dkimbutton'>
|
||||
<pre id='dkimdns' class='dkim'>{{ domain.dkim_key_selector }}._domain_key.{{ domain.name }}. IN TXT ({{ splitKey(`v=DKIM1;k=rsa;p=${domain.dkim_public_key}`) }})</pre>
|
||||
<button @click="copyDKIM()" class="dkimbutton">
|
||||
<pre id="dkimdns" class="dkim">{{ domain.dkim_key_selector }}._domain_key.{{ domain.name }}. IN TXT ({{ splitKey(`v=DKIM1;k=rsa;p=${domain.dkim_public_key}`) }})</pre>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
@@ -24,9 +24,8 @@ export default {
|
||||
}
|
||||
return result.join('\n')
|
||||
},
|
||||
copyDNSToClipboard () {
|
||||
const text = document.getElementById('dkimdns').textContent
|
||||
navigator.clipboard.writeText(text)
|
||||
copyDKIM () {
|
||||
navigator.clipboard.writeText(document.getElementById('dkimdns').textContent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
const confirm = await this.$refs.confirm.open(
|
||||
this.$gettext('Warning'),
|
||||
this.$gettext(
|
||||
'Do you really want to regenerate the DKIM keys set for this domain ?'
|
||||
'DKIM keys already exist for this domain. Do you want to overwrite them?'
|
||||
),
|
||||
{
|
||||
color: 'error',
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
elevation="2"
|
||||
dense
|
||||
>
|
||||
<button @click="copyPubKeyToClipboard()" class='dkimbutton'><pre id='dkimpub' class='dkim'>{{ domain.dkim_public_key }}</pre></button>
|
||||
<button @click="copyPubDKIM()" class="dkimbutton"><pre id="dkimpub" class="dkim">{{ domain.dkim_public_key }}</pre></button>
|
||||
</v-alert>
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
@@ -70,9 +70,8 @@ export default {
|
||||
close () {
|
||||
this.$emit('close')
|
||||
},
|
||||
copyPubKeyToClipboard () {
|
||||
const text = document.getElementById('dkimpub').textContent
|
||||
navigator.clipboard.writeText(text)
|
||||
copyPubDKIM () {
|
||||
navigator.clipboard.writeText(document.getElementById('dkimpub').textContent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<div class="modal-body">
|
||||
<div class="alert alert-info" style="overflow-wrap: break-word;">
|
||||
<strong>{% trans "Raw format. Click to copy" %}</strong><br>
|
||||
<button onclick="copyRaw()" class="dkimbutton" id="copy_raw_dkim_key"><pre class="dkim">{{ domain.dkim_public_key }}</pre></button>
|
||||
<button onclick="copy(`copy_raw_dkim_key`)" class="dkimbutton" id="copy_raw_dkim_key"><pre class="dkim">{{ domain.dkim_public_key }}</pre></button>
|
||||
</div>
|
||||
<div class="alert alert-info" style="overflow-wrap: break-word;">
|
||||
<strong>{% trans "Bind/named format. Click to copy" %}</strong><br>
|
||||
<button onclick="copyDns()" class="dkimbutton" id="copy_dns_dkim_key"><pre class="dkim">{{ domain.bind_format_dkim_public_key }}</pre></button>
|
||||
<button onclick="copy(`copy_dns_dkim_key`)" class="dkimbutton" id="copy_dns_dkim_key"><pre class="dkim">{{ domain.bind_format_dkim_public_key }}</pre></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -130,17 +130,17 @@
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="dkim_regenerate_dialog">{% trans "Regenerate ?" %}</h5>
|
||||
<h5 class="modal-title" id="dkim_regenerate_dialog">{% trans "Warning" %}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% trans "Are you sure you want to regenerate your DKIM key ?" %}
|
||||
{% trans "DKIM keys already exist for this domain. Do you want to overwrite them?" %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Cancel" %}</button>
|
||||
<a id="refresh_dkim_key" class="btn btn-warning" href="#" title="{% trans 'Generate new key' %}" data-dismiss="modal">{% trans "Regenerate" %}</a>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "No" %}</button>
|
||||
<a id="refresh_dkim_key" class="btn btn-danger" href="#" title="{% trans 'Generate new key' %}" data-dismiss="modal">{% trans "Yes" %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -207,12 +207,8 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
function copyRaw() {
|
||||
const text = document.getElementById("copy_raw_dkim_key").textContent;
|
||||
navigator.clipboard.writeText(text);
|
||||
}
|
||||
function copyDns() {
|
||||
const text =document.getElementById("copy_dns_dkim_key").textContent;
|
||||
function copy(id) {
|
||||
const text = document.getElementById(id).textContent;
|
||||
navigator.clipboard.writeText(text);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user