diff options
| author | Christian Cleberg <[email protected]> | 2026-07-20 19:14:04 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2026-07-20 21:03:10 -0500 |
| commit | 2c608ed9cb11f3e835f577994b5627b9b7910f4f (patch) | |
| tree | 078ff50c5151fcc5e91b9d28051562f0bc28088d /DomainDig/IntegrationsView.swift | |
| parent | 349bec0e99f330fc1172ca9847c58f019e861f61 (diff) | |
| download | domain-dig-2c608ed9cb11f3e835f577994b5627b9b7910f4f.tar.gz domain-dig-2c608ed9cb11f3e835f577994b5627b9b7910f4f.tar.bz2 domain-dig-2c608ed9cb11f3e835f577994b5627b9b7910f4f.zip | |
feat(a11y): unlock light mode and add appearance preference (#21 phase 2)
Removes the 16 scattered .preferredColorScheme(.dark) calls and the one
.toolbarColorScheme, and applies appearance in exactly one place — the
WindowGroup in DomainDigApp. Re-applying per view is what let the lock
spread across eight files unnoticed until light mode was unreachable.
Adds AppAppearance (System / Light / Dark) in @AppStorage, exposed under
Settings > Display next to Density. Honouring the system setting and
offering an override is one key, and it keeps the deliberate dark
aesthetic reachable for anyone who wants it.
Also replaces .secondary with AppTextSecondary across 191 sites. iOS's
own secondaryLabel is 3.29:1 on a light card — below AA — which never
showed while the app was locked to dark, where the same colour reads
6.32:1. Unlocking light mode is precisely what exposed it, so it belongs
here rather than in a later phase: without it, light mode would ship with
body text under 4.5:1 app-wide.
Dark mode reports 18 findings, unchanged from phase 1 — no regression
from unlocking. Light mode reports 21. The three extra are iOS-rendered
Section headers (TIER, PREFERENCES, SERVICES) using the system's grey;
overriding system header styling across every section to gain ~0.3:1 on
decorative labels is a poor trade and is left alone.
Two long-standing Settings contrast findings are now explained. They are
the last rows of a section sitting under the translucent tab bar, so the
audit measures text against a blended background — confirmed by
screenshot, present in dark mode since phase 0, and standard iOS
scroll-under behaviour rather than a defect.
Diffstat (limited to 'DomainDig/IntegrationsView.swift')
| -rw-r--r-- | DomainDig/IntegrationsView.swift | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/DomainDig/IntegrationsView.swift b/DomainDig/IntegrationsView.swift index 163d4d1..bb9abae 100644 --- a/DomainDig/IntegrationsView.swift +++ b/DomainDig/IntegrationsView.swift @@ -15,7 +15,7 @@ struct IntegrationsSettingsView: View { if let statusMessage = integrationService.statusMessage { Text(statusMessage) .font(.caption) - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) } Button("Process Queue Now") { @@ -26,7 +26,7 @@ struct IntegrationsSettingsView: View { Section("Targets") { if integrationService.targets.isEmpty { Text("No integrations configured.") - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) } else { ForEach(integrationService.targets) { target in NavigationLink { @@ -42,12 +42,12 @@ struct IntegrationsSettingsView: View { Text(target.name) Spacer() Text(target.type.title) - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) } Text(summary(for: target)) .font(.caption) - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) if !target.isEnabled { Text("Disabled") @@ -138,7 +138,7 @@ private struct IntegrationDetailView: View { Section("Delivery Log") { if integrationService.deliveryRecords(for: target.id).isEmpty { Text("No deliveries yet.") - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) } else { ForEach(integrationService.deliveryRecords(for: target.id), id: \.id) { record in VStack(alignment: .leading, spacing: 4) { @@ -147,7 +147,7 @@ private struct IntegrationDetailView: View { Spacer() Text(record.timestamp.formatted(date: .abbreviated, time: .shortened)) .font(.caption) - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) } Text(record.summary) @@ -155,7 +155,7 @@ private struct IntegrationDetailView: View { Text(record.destination) .font(.caption) - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) if let failureReason = record.failureReason { let failureColor: Color = record.status == .skipped ? .secondary : Color(.statusCritical) @@ -169,7 +169,7 @@ private struct IntegrationDetailView: View { } } else { Text("Integration not found.") - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) } } .navigationTitle(target?.name ?? "Integration") @@ -265,7 +265,7 @@ private struct IntegrationEditorView: View { if existingTarget != nil { Text("Saved webhook URL remains in Keychain unless you replace it.") .font(.caption) - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) } } case .slack: @@ -278,7 +278,7 @@ private struct IntegrationEditorView: View { if existingTarget != nil { Text("Saved Slack webhook remains in Keychain unless you replace it.") .font(.caption) - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) } } case .email: @@ -315,7 +315,7 @@ private struct IntegrationEditorView: View { if existingTarget != nil { Text("Saved SMTP password remains in Keychain unless you replace it.") .font(.caption) - .foregroundStyle(.secondary) + .foregroundStyle(Color(.appTextSecondary)) } } } |
