new features

This commit is contained in:
Mark Gregory
2026-11-19 09:25:52 +00:00
parent 0720c8a18b
commit d0cf741c08
4 changed files with 32 additions and 10 deletions
+3 -2
View File
@@ -216,9 +216,10 @@ struct CoreMLModels: View {
ForEach(results) { result in
HubRepositoryRow(result: result, format: "Core ML") {
if result.id == CoreMLDownloads.repository {
Button("View Files") { showingAppleFiles = true }
Button("Choose Download…") { showingAppleFiles = true }
} else {
Link("View Files", destination: URL(string: "https://huggingface.co")!.appending(path: result.id))
Link("Download Files…", destination: URL(string: "https://huggingface.co")!.appending(path: result.id).appending(path: "tree/main"))
.help("Open this model’s downloadable files on Hugging Face.")
}
}
}
+17 -4
View File
@@ -229,9 +229,22 @@ struct HubCatalogRow<Heading: View, Metadata: View, Actions: View, Footer: View>
var body: some View {
VStack(alignment: .leading, spacing: 6) {
HStack(content: heading).font(.headline)
HStack(content: metadata).font(.caption).foregroundStyle(.secondary)
HStack(content: actions)
HStack(content: heading)
.font(.headline)
.lineLimit(2)
.fixedSize(horizontal: false, vertical: true)
ViewThatFits(in: .horizontal) {
HStack(content: metadata).fixedSize(horizontal: true, vertical: false)
VStack(alignment: .leading, spacing: 4, content: metadata)
}
.font(.caption)
.foregroundStyle(.secondary)
ViewThatFits(in: .horizontal) {
HStack(content: actions).fixedSize(horizontal: true, vertical: false)
VStack(alignment: .leading, spacing: 8, content: actions)
.fixedSize(horizontal: false, vertical: true)
}
.buttonStyle(.bordered)
footer()
}
.frame(maxWidth: .infinity, alignment: .leading)
@@ -334,7 +347,7 @@ struct HubGGUFDownloads: View {
}
ForEach(repositories) { result in
HubRepositoryRow(result: result, format: "GGUF") {
Button("View Files") { lookup(result.id) }.disabled(lookupInProgress || download != nil)
Button("Choose Download…") { lookup(result.id) }.disabled(lookupInProgress || download != nil)
}
}
ForEach(assets) { asset in