diff options
Diffstat (limited to 'DomainDig/ContentView.swift')
| -rw-r--r-- | DomainDig/ContentView.swift | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/DomainDig/ContentView.swift b/DomainDig/ContentView.swift index c44f871..bb93789 100644 --- a/DomainDig/ContentView.swift +++ b/DomainDig/ContentView.swift @@ -381,6 +381,8 @@ struct ContentView: View { emailSecurityRow("SPF", record: email.spf) emailSecurityRow("DMARC", record: email.dmarc) emailSecurityRow("DKIM", record: email.dkim) + emailSecurityRow("MTA-STS", mtaSts: email.mtaSts) + emailSecurityRow("BIMI", record: email.bimi) } } } @@ -394,7 +396,7 @@ struct ContentView: View { Text(label) .font(.system(.caption, design: .monospaced)) .fontWeight(.semibold) - .frame(width: 52, alignment: .leading) + .frame(width: 72, alignment: .leading) Text(record.found ? "✓" : "✗") .font(.system(.caption, design: .monospaced)) .foregroundStyle(record.found ? .green : .red) @@ -411,6 +413,11 @@ struct ContentView: View { expandedEmailField = isExpanded ? nil : label } } + if let selector = record.matchedSelector { + Text("(selector: \(selector))") + .font(.system(.caption2, design: .monospaced)) + .foregroundStyle(.secondary) + } } else { Text("No record found") .font(.system(.caption2, design: .monospaced)) @@ -420,6 +427,30 @@ struct ContentView: View { } } + private func emailSecurityRow(_ label: String, mtaSts: MTASTSResult?) -> some View { + VStack(alignment: .leading, spacing: 2) { + HStack(spacing: 8) { + Text(label) + .font(.system(.caption, design: .monospaced)) + .fontWeight(.semibold) + .frame(width: 72, alignment: .leading) + Text(mtaSts?.txtFound == true ? "✓" : "✗") + .font(.system(.caption, design: .monospaced)) + .foregroundStyle(mtaSts?.txtFound == true ? .green : .red) + if let policyMode = mtaSts?.policyMode { + Text(policyMode) + .font(.system(.caption2, design: .monospaced)) + .foregroundStyle(.primary) + .textSelection(.enabled) + } else { + Text(mtaSts?.txtFound == true ? "Policy unavailable" : "No record found") + .font(.system(.caption2, design: .monospaced)) + .foregroundStyle(.secondary) + } + } + } + } + // MARK: - SSL Results private var sslResultsSection: some View { |
