Improve test display in some circonstancies
This commit is contained in:
parent
4bbba66a81
commit
7ed347c86e
9 changed files with 118 additions and 77 deletions
|
|
@ -8,30 +8,31 @@
|
|||
let { dkimRecords }: Props = $props();
|
||||
|
||||
// Compute overall validity
|
||||
const dkimIsValid = $derived(
|
||||
dkimRecords?.reduce((acc, r) => acc && r.valid, true) ?? false
|
||||
);
|
||||
const dkimIsValid = $derived(dkimRecords?.reduce((acc, r) => acc && r.valid, true) ?? false);
|
||||
</script>
|
||||
|
||||
{#if dkimRecords && dkimRecords.length > 0}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="text-muted mb-0">
|
||||
<i
|
||||
class="bi"
|
||||
class:bi-check-circle-fill={dkimIsValid}
|
||||
class:text-success={dkimIsValid}
|
||||
class:bi-x-circle-fill={!dkimIsValid}
|
||||
class:text-danger={!dkimIsValid}
|
||||
></i>
|
||||
DomainKeys Identified Mail
|
||||
</h5>
|
||||
<span class="badge bg-secondary">DKIM</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text small text-muted mb-0">DKIM cryptographically signs your emails, proving they haven't been tampered with in transit. Receiving servers verify this signature against your DNS records.</p>
|
||||
</div>
|
||||
<div class="list-group list-group-flush">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="text-muted mb-0">
|
||||
<i
|
||||
class="bi"
|
||||
class:bi-check-circle-fill={dkimIsValid}
|
||||
class:text-success={dkimIsValid}
|
||||
class:bi-x-circle-fill={!dkimIsValid}
|
||||
class:text-danger={!dkimIsValid}
|
||||
></i>
|
||||
DomainKeys Identified Mail
|
||||
</h5>
|
||||
<span class="badge bg-secondary">DKIM</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text small text-muted mb-0">
|
||||
DKIM cryptographically signs your emails, proving they haven't been tampered with in
|
||||
transit. Receiving servers verify this signature against your DNS records.
|
||||
</p>
|
||||
</div>
|
||||
<div class="list-group list-group-flush">
|
||||
{#if dkimRecords && dkimRecords.length > 0}
|
||||
{#each dkimRecords as dkim}
|
||||
<div class="list-group-item">
|
||||
<div class="mb-2">
|
||||
|
|
@ -48,17 +49,26 @@
|
|||
</div>
|
||||
{#if dkim.record}
|
||||
<div class="mb-2">
|
||||
<strong>Record:</strong><br>
|
||||
<code class="d-block mt-1 text-break small text-truncate">{dkim.record}</code>
|
||||
<strong>Record:</strong><br />
|
||||
<code class="d-block mt-1 text-break small text-truncate"
|
||||
>{dkim.record}</code
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
{#if dkim.error}
|
||||
<div class="text-danger">
|
||||
<strong>Error:</strong> {dkim.error}
|
||||
<strong>Error:</strong>
|
||||
{dkim.error}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="list-group-item text-muted">
|
||||
<i class="bi bi-exclamation-octagon me-2"></i>
|
||||
No DKIM signatures found in this email. DKIM provides cryptographic authentication and
|
||||
helps avoid spoofing, thus improving deliverability.
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue