Commit cd3b07bb67
Unsigned
Layout: unified · split
DomainDig/ContentView.swift +8
| @@ -214,6 +214,7 @@ struct ContentView: View { | ||
| 214 | 214 | focusedInputField = newValue == .single ? .singleDomain : .bulkDomains |
| 215 | 215 | } |
| 216 | 216 | .onChange(of: viewModel.domain) { _, newValue in |
| 217 | viewModel.domainInputError = nil | |
| 217 | 218 | guard inputMode == .single else { return } |
| 218 | 219 | let normalized = newValue.trimmingCharacters(in: .whitespacesAndNewlines) |
| 219 | 220 | guard normalized != viewModel.searchedDomain else { return } |
| @@ -318,6 +319,13 @@ struct ContentView: View { | ||
| 318 | 319 | viewModel.run() |
| 319 | 320 | } |
| 320 | 321 | |
| 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 | ||
| 321 | 329 | Button { |
| 322 | 330 | focusedInputField = nil |
| 323 | 331 | viewModel.run() |