Commit cd3b07bb67

cd3b07bb6790fce92111b94b7bdbd980b018f4f2

parent: 6ab3cb748c

Unsigned

cmc <hello@cleberg.net> · 2026-10-24 03:59 UTC

Show the domain input error below the field

Cleared as soon as the field is edited.

Layout: unified · split

DomainDig/ContentView.swift +8
@@ -214,6 +214,7 @@ struct ContentView: View {
214214 focusedInputField = newValue == .single ? .singleDomain : .bulkDomains
215215 }
216216 .onChange(of: viewModel.domain) { _, newValue in
217 viewModel.domainInputError = nil
217218 guard inputMode == .single else { return }
218219 let normalized = newValue.trimmingCharacters(in: .whitespacesAndNewlines)
219220 guard normalized != viewModel.searchedDomain else { return }
@@ -318,6 +319,13 @@ struct ContentView: View {
318319 viewModel.run()
319320 }
320321
322 if let domainInputError = viewModel.domainInputError {
323 Text(domainInputError)
324 .font(appDensity.font(.caption))
325 .foregroundStyle(Color(.statusCritical))
326 .frame(maxWidth: .infinity, alignment: .leading)
327 }
328
321329 Button {
322330 focusedInputField = nil
323331 viewModel.run()