Name the Mac in the Server tab's headings
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user