adjust names

This commit is contained in:
Matt Kiazyk 2025-08-25 22:59:28 -05:00
parent bfb8c2cbb8
commit 472e36ed0f
2 changed files with 12 additions and 3 deletions

View file

@ -43,10 +43,10 @@ struct PlatformsView: View {
} label: {
switch selectedRuntimeArchitecture {
case .arm64:
Label(selectedRuntimeArchitecture.rawValue, systemImage: "m4.button.horizontal")
Label(selectedRuntimeArchitecture.displayString, systemImage: "m4.button.horizontal")
.labelStyle(.trailingIcon)
case .x86_64:
Label(selectedRuntimeArchitecture.rawValue, systemImage: "cpu.fill")
Label(selectedRuntimeArchitecture.displayString, systemImage: "cpu.fill")
.labelStyle(.trailingIcon)
}
}
@ -74,7 +74,7 @@ struct PlatformsView: View {
Text("\(runtime.visibleIdentifier)")
.font(.headline)
ForEach(runtime.architectures ?? [], id: \.self) { architecture in
TagView(text: architecture.rawValue)
TagView(text: architecture.displayString)
}
pathIfAvailable(xcode: xcode, runtime: runtime)

View file

@ -15,6 +15,15 @@ public enum Architecture: String, Codable, Equatable, Hashable, Identifiable {
case arm64 = "arm64"
/// The X86\_64 architecture (64-bit Intel)
case x86_64 = "x86_64"
public var displayString: String {
switch self {
case .arm64:
return "Apple Silicon"
case .x86_64:
return "Intel"
}
}
}
extension Array where Element == Architecture {