Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit 9a0ba9a

Browse files
authored
Add back SourceView
1 parent e9dec0d commit 9a0ba9a

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
struct SourceRow: View {
2+
let source: SourcesViewModel.Source
3+
@EnvironmentObject var sourcesViewModel: SourcesViewModel
4+
5+
var body: some View {
6+
HStack {
7+
VStack(alignment: .leading, spacing: 4) {
8+
Text(source.urlString)
9+
.font(.system(.body, design: .monospaced))
10+
.foregroundColor(.primary)
11+
.lineLimit(2)
12+
.minimumScaleFactor(0.8)
13+
14+
if let validationState = sourcesViewModel.validationStates[source.urlString] {
15+
HStack {
16+
Image(systemName: validationState.icon)
17+
.font(.caption)
18+
.foregroundColor(validationState.color)
19+
Text(validationState.description)
20+
.font(.caption)
21+
.foregroundColor(validationState.color)
22+
}
23+
}
24+
}
25+
26+
Spacer()
27+
}
28+
.padding(.vertical, 4)
29+
.contentShape(Rectangle())
30+
}
31+
}

0 commit comments

Comments
 (0)