Skip to content

Commit b8cb4dc

Browse files
committed
+ Homebrew package versions in the UI
1 parent 3b5a840 commit b8cb4dc

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

Cork/Localizable.xcstrings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58420,9 +58420,6 @@
5842058420
}
5842158421
}
5842258422
}
58423-
},
58424-
"v. %@)" : {
58425-
5842658423
},
5842758424
"window.about" : {
5842858425
"localizations" : {

Cork/Views/Packages/Package Details/Sub-Views/Package Detail Header Complex.swift

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,28 @@ struct PackageDetailHeaderComplex: View
7272
{
7373
HStack(alignment: .firstTextBaseline, spacing: 5)
7474
{
75-
SanitizedPackageName(packageName: package.name, shouldShowVersion: false)
76-
.font(.title)
75+
HStack(alignment: .firstTextBaseline, spacing: 4)
76+
{
77+
Text(package.name)
78+
.font(.title)
79+
80+
if let homebrewVersion = package.homebrewVersion
81+
{
82+
HStack(alignment: .firstTextBaseline, spacing: 2)
83+
{
84+
Image(systemName: "lock")
85+
86+
Text(homebrewVersion)
87+
}
88+
.font(.subheadline)
89+
.bold()
90+
.foregroundStyle(.tertiary)
91+
}
92+
}
7793

7894
if !package.versions.isEmpty
7995
{
80-
Text("v. \(package.versions.formatted(.list(type: .and))))")
96+
Text("v. \(package.versions.formatted(.list(type: .and)))")
8197
.font(.subheadline)
8298
.foregroundColor(.secondary)
8399
}

0 commit comments

Comments
 (0)