- {#each results as result, resultIndex (resultIndex)}
+ {#each diagnosticState.results as result, resultIndex (resultIndex)}
{@const res = result as { resolver: string }}
{@const info = resolverInfo[res.resolver as keyof typeof resolverInfo]}
{@const status = getStatusColor(result)}
@@ -321,19 +304,7 @@
{/if}
- {#if error}
-
-
-
-
-
-
Propagation Check Failed
-
{error}
-
-
-
-
- {/if}
+
diff --git a/src/routes/diagnostics/dns/reverse-lookup/+page.svelte b/src/routes/diagnostics/dns/reverse-lookup/+page.svelte
index d33b2d9..4322293 100644
--- a/src/routes/diagnostics/dns/reverse-lookup/+page.svelte
+++ b/src/routes/diagnostics/dns/reverse-lookup/+page.svelte
@@ -241,7 +241,7 @@
disabled={loading || !ipAddress.trim() || !isValidIP(ipAddress.trim())}
>
{#if loading}
-
+
Performing Reverse Lookup...
{:else}
diff --git a/src/routes/diagnostics/dns/soa-serial/+page.svelte b/src/routes/diagnostics/dns/soa-serial/+page.svelte
index a6553ac..9d82179 100644
--- a/src/routes/diagnostics/dns/soa-serial/+page.svelte
+++ b/src/routes/diagnostics/dns/soa-serial/+page.svelte
@@ -179,7 +179,7 @@
{#if loading}
-
+
Analyzing SOA Record...
{:else}
diff --git a/src/routes/diagnostics/dns/spf-evaluator/+page.svelte b/src/routes/diagnostics/dns/spf-evaluator/+page.svelte
index 4daa6dc..8404b10 100644
--- a/src/routes/diagnostics/dns/spf-evaluator/+page.svelte
+++ b/src/routes/diagnostics/dns/spf-evaluator/+page.svelte
@@ -215,7 +215,7 @@
{#if loading}
-
+
Evaluating SPF...
{:else}
diff --git a/src/routes/diagnostics/email/dmarc-check/+page.svelte b/src/routes/diagnostics/email/dmarc-check/+page.svelte
index 03f871c..9c4a0a9 100644
--- a/src/routes/diagnostics/email/dmarc-check/+page.svelte
+++ b/src/routes/diagnostics/email/dmarc-check/+page.svelte
@@ -1,16 +1,16 @@
@@ -144,27 +137,15 @@
-
-
-
-
- DMARC Examples
-
-
- {#each examples as example, i (i)}
-
loadExample(example, i)}
- use:tooltip={`Check DMARC policy for ${example.domain}`}
- >
- {example.domain}
- {example.description}
-
- {/each}
-
-
-
+ ex.domain}
+ getDescription={(ex) => ex.description}
+ getTooltip={(ex) => `Check DMARC policy for ${ex.domain}`}
+ />
@@ -173,7 +154,7 @@
-
+
Domain Name
{
- clearExampleSelection();
+ examples.clear();
if (domain) checkDMARC();
}}
/>
@@ -189,8 +170,8 @@
-
- {#if loading}
+
+ {#if diagnosticState.loading}
Checking DMARC...
{:else}
@@ -203,33 +184,35 @@
- {#if results && results.hasRecord}
+ {#if diagnosticState.results && diagnosticState.results.hasRecord}
- {#if results.parsed && results.deliverabilityHints}
+ {#if diagnosticState.results.parsed && diagnosticState.results.deliverabilityHints}
-
-
+
+
Email Deliverability Impact
-
{results.deliverabilityHints.policyImpact}
- {#if results.deliverabilityHints.alignmentComplexity?.strict}
-
{results.deliverabilityHints.alignmentComplexity.strict}
+
{diagnosticState.results.deliverabilityHints.policyImpact}
+ {#if diagnosticState.results.deliverabilityHints.alignmentComplexity?.strict}
+
+ {diagnosticState.results.deliverabilityHints.alignmentComplexity.strict}
+
{/if}
- {#if results.deliverabilityHints.recommendations.length > 0}
- {@const hintsData = (results as { deliverabilityHints: { recommendations: string[] } })
+ {#if diagnosticState.results.deliverabilityHints.recommendations.length > 0}
+ {@const hintsData = (diagnosticState.results as { deliverabilityHints: { recommendations: string[] } })
.deliverabilityHints}
Deliverability Recommendations
@@ -250,7 +233,7 @@
DMARC Record
_dmarc.{domain}
-
{results.record}
+
{diagnosticState.results.record}
@@ -259,19 +242,19 @@
Policy Configuration
-
+
- {results.parsed.policy}
+ {diagnosticState.results.parsed.policy}
- {#if results.parsed.policy === 'reject'}
+ {#if diagnosticState.results.parsed.policy === 'reject'}
Reject non-compliant messages
- {:else if results.parsed.policy === 'quarantine'}
+ {:else if diagnosticState.results.parsed.policy === 'quarantine'}
Quarantine suspicious messages
- {:else if results.parsed.policy === 'none'}
+ {:else if diagnosticState.results.parsed.policy === 'none'}
Monitor only, no action
{:else}
Unknown policy
@@ -281,40 +264,46 @@
- {#if results.parsed.subdomainPolicy}
-
+ {#if diagnosticState.results.parsed.subdomainPolicy}
+
- {results.parsed.subdomainPolicy}
+ {diagnosticState.results.parsed.subdomainPolicy}
{/if}
-
+
- {results.parsed.percentage}%
+ {diagnosticState.results.parsed.percentage}%
of messages affected
-
+
- {results.parsed.alignment.dkim === 's' ? 'Strict' : 'Relaxed'}
+ {diagnosticState.results.parsed.alignment.dkim === 's' ? 'Strict' : 'Relaxed'}
- {results.parsed.alignment.dkim === 's'
+ {diagnosticState.results.parsed.alignment.dkim === 's'
? 'Exact domain match required'
: 'Organizational domain match allowed'}
@@ -322,15 +311,17 @@
-
+
- {results.parsed.alignment.spf === 's' ? 'Strict' : 'Relaxed'}
+ {diagnosticState.results.parsed.alignment.spf === 's' ? 'Strict' : 'Relaxed'}
- {results.parsed.alignment.spf === 's'
+ {diagnosticState.results.parsed.alignment.spf === 's'
? 'Exact domain match required'
: 'Organizational domain match allowed'}
@@ -344,15 +335,15 @@
Failure Options
- {results.parsed.reporting.failureOptions}
+ {diagnosticState.results.parsed.reporting.failureOptions}
- {#if results.parsed.reporting.failureOptions === '0'}
+ {#if diagnosticState.results.parsed.reporting.failureOptions === '0'}
DKIM and SPF failure
- {:else if results.parsed.reporting.failureOptions === '1'}
+ {:else if diagnosticState.results.parsed.reporting.failureOptions === '1'}
Any alignment failure
- {:else if results.parsed.reporting.failureOptions === 'd'}
+ {:else if diagnosticState.results.parsed.reporting.failureOptions === 'd'}
DKIM failure only
- {:else if results.parsed.reporting.failureOptions === 's'}
+ {:else if diagnosticState.results.parsed.reporting.failureOptions === 's'}
SPF failure only
{:else}
Custom configuration
@@ -373,8 +364,8 @@
Aggregate Reports (RUA)
- {#if results.parsed.reporting.aggregate}
- {results.parsed.reporting.aggregate}
+ {#if diagnosticState.results.parsed.reporting.aggregate}
+ {diagnosticState.results.parsed.reporting.aggregate}
Daily summaries of DMARC activity
{:else}
Not configured
@@ -389,8 +380,8 @@
Forensic Reports (RUF)
- {#if results.parsed.reporting.forensic}
-
{results.parsed.reporting.forensic}
+ {#if diagnosticState.results.parsed.reporting.forensic}
+
{diagnosticState.results.parsed.reporting.forensic}
Real-time failure reports with message samples
{:else}
Not configured
@@ -406,7 +397,7 @@
{/if}
- {#if results && results.hasRecord === false}
+ {#if diagnosticState.results && diagnosticState.results.hasRecord === false}
@@ -429,19 +420,7 @@
{/if}
- {#if error}
-
-
-
-
-
-
DMARC Check Failed
-
{error}
-
-
-
-
- {/if}
+
diff --git a/src/routes/diagnostics/email/greylist-tester/+page.svelte b/src/routes/diagnostics/email/greylist-tester/+page.svelte
index 0e41a3c..cc38fe7 100644
--- a/src/routes/diagnostics/email/greylist-tester/+page.svelte
+++ b/src/routes/diagnostics/email/greylist-tester/+page.svelte
@@ -1,6 +1,8 @@
@@ -95,7 +94,7 @@
bind:value={domain}
placeholder="mail.example.com"
onkeydown={(e) => e.key === 'Enter' && checkTLS()}
- disabled={loading}
+ disabled={diagnosticState.loading}
/>
-
-
- {loading ? 'Checking...' : 'Check TLS'}
+
+
+ {diagnosticState.loading ? 'Checking...' : 'Check TLS'}
-
-
-
-
-
- Quick Examples
-
-
- {#each examples as example (`${example.domain}:${example.port}`)}
-
loadExample(example.domain, example.port)}
- type="button"
- >
- {example.domain}:{example.port}
- {example.desc}
-
- {/each}
-
-
-
+
+
`${ex.domain}:${ex.port}`}
+ getDescription={(ex) => ex.desc}
+ getTooltip={(ex) => `Check TLS for ${ex.domain} on port ${ex.port}`}
+ />
- {#if loading}
+ {#if diagnosticState.loading}
@@ -152,28 +143,18 @@
{/if}
-
- {#if error}
-
- {/if}
+
- {#if results}
+ {#if diagnosticState.results}
- {#if results.supportsSTARTTLS}
+ {#if diagnosticState.results.supportsSTARTTLS}
{/if}
- {#if results.supportsDirectTLS}
+ {#if diagnosticState.results.supportsDirectTLS}
{/if}
- {#if !results.supportsSTARTTLS && !results.supportsDirectTLS}
+ {#if !diagnosticState.results.supportsSTARTTLS && !diagnosticState.results.supportsDirectTLS}
@@ -203,23 +184,23 @@
- {#if results.tlsVersion || results.cipherSuite}
+ {#if diagnosticState.results.tlsVersion || diagnosticState.results.cipherSuite}
Connection Details
- {#if results.tlsVersion}
+ {#if diagnosticState.results.tlsVersion}
TLS Version
- {results.tlsVersion}
+ {diagnosticState.results.tlsVersion}
{/if}
- {#if results.cipherSuite}
+ {#if diagnosticState.results.cipherSuite}
Cipher Suite
- {results.cipherSuite}
+ {diagnosticState.results.cipherSuite}
{/if}
@@ -227,7 +208,7 @@
{/if}
- {#if results.certificate}
+ {#if diagnosticState.results.certificate}
@@ -236,38 +217,44 @@
Common Name
- {results.certificate.commonName}
+ {diagnosticState.results.certificate.commonName}
Issuer
- {results.certificate.issuer}
+ {diagnosticState.results.certificate.issuer}
Valid From
- {new Date(results.certificate.validFrom).toLocaleDateString()}
+ {new Date(diagnosticState.results.certificate.validFrom).toLocaleDateString()}
Valid To
-
- {new Date(results.certificate.validTo).toLocaleDateString()}
- {#if results.certificate.daysUntilExpiry < 30}
- Expires in {results.certificate.daysUntilExpiry} days
+
+ {new Date(diagnosticState.results.certificate.validTo).toLocaleDateString()}
+ {#if diagnosticState.results.certificate.daysUntilExpiry < 30}
+ Expires in {diagnosticState.results.certificate.daysUntilExpiry} days
{/if}
Serial Number
- {results.certificate.serialNumber}
+ {diagnosticState.results.certificate.serialNumber}
Fingerprint
- {results.certificate.fingerprint}
+ {diagnosticState.results.certificate.fingerprint}
- {#if results.certificate.altNames.length > 0}
+ {#if diagnosticState.results.certificate.altNames.length > 0}
-
Alternative Names ({results.certificate.altNames.length})
+
Alternative Names ({diagnosticState.results.certificate.altNames.length})
- {#each results.certificate.altNames as altName (altName)}
+ {#each diagnosticState.results.certificate.altNames as altName (altName)}
{altName}
{/each}
@@ -357,14 +344,6 @@