Name the Mac in the Server tab's headings

This commit is contained in:
Ian Gulliver
2026-10-19 12:05:52 -07:00
parent 6672127373
commit 0797b56568
3 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -96,6 +96,7 @@ func errorText(_ error: any Error) -> String {
}
private let clientID = UUID().uuidString
let macName = Host.current().localizedName ?? ProcessInfo.processInfo.hostName
final class API: Sendable {
let origin: URL
@@ -108,7 +109,7 @@ final class API: Sendable {
config.httpAdditionalHeaders = [
"Byre-Client": clientID,
"Byre-Commit": Bundle.main.object(forInfoDictionaryKey: "ByreCommit") as! String,
"Byre-Host": Host.current().localizedName ?? ProcessInfo.processInfo.hostName,
"Byre-Host": macName,
]
session = URLSession(configuration: config)
client = Client(
+2 -2
View File
@@ -307,13 +307,13 @@ struct ServerView: View {
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 8) {
Text("Server on this Mac")
Text("Server on \(macName)")
.font(Fonts.font(13, weight: 700))
.padding(.top, 16)
if let state {
details(state)
}
Text("Tools on this Mac")
Text("Tools on \(macName)")
.font(Fonts.font(13, weight: 700))
.padding(.top, 16)
switch checks {