a native ios client for gitbay

client ios swift

https://gitbay.org

explore: build the repo path as one attributed run !19

merged cmc wants to merge krz/gitbay-ios:explore-text-deprecation into main

1 file changed, +11 −4

gitbay/Views/Discovery/ExploreView.swift +11 −4
@@ -14,16 +14,23 @@ struct ExploreView: View {
1414 ))
1515 }
1616
17 /// One Text, not two: the HStack spaces its children, and a gap
18 /// between the owner and the name would read as part of the path.
19 private func path(of repo: PublicRepo) -> AttributedString {
20 var owner = AttributedString(repo.owner + "/")
21 owner.foregroundColor = .secondary
22 var name = AttributedString(repo.name)
23 name.font = .gbSans(.subheadline).weight(.medium)
24 return owner + name
25 }
26
1727 var body: some View {
1828 List {
1929 ForEach(list.state.value ?? []) { repo in
2030 NavigationLink(value: RepoRoute.repo(repo.path)) {
2131 VStack(alignment: .leading, spacing: 4) {
2232 HStack(spacing: 6) {
23 Text(repo.owner + "/")
24 .foregroundStyle(.secondary)
25 + Text(repo.name)
26 .fontWeight(.medium)
33 Text(path(of: repo))
2734 if repo.isArchived {
2835 GBChip("archived", .secondary)
2936 }