From 2f332ee497af925db1a2583135e9dfcdaff84794 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Fri, 7 Nov 2025 21:03:53 -0800 Subject: Add Bonjour discovery for Hotline servers on the local network to the Servers window. --- Hotline/macOS/Trackers/BonjourServerRow.swift | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Hotline/macOS/Trackers/BonjourServerRow.swift (limited to 'Hotline/macOS/Trackers/BonjourServerRow.swift') diff --git a/Hotline/macOS/Trackers/BonjourServerRow.swift b/Hotline/macOS/Trackers/BonjourServerRow.swift new file mode 100644 index 0000000..d99b23b --- /dev/null +++ b/Hotline/macOS/Trackers/BonjourServerRow.swift @@ -0,0 +1,19 @@ +import SwiftUI + +struct BonjourServerRow: View { + @Environment(\.openWindow) private var openWindow + + let server: BonjourState.BonjourServer + + var body: some View { + HStack(alignment: .center, spacing: 6) { + Image("Server") + .resizable() + .scaledToFit() + .frame(width: 16, height: 16, alignment: .center) + Text(self.server.displayName).lineLimit(1).truncationMode(.tail) + Spacer(minLength: 0) + } + .frame(maxWidth: .infinity, maxHeight: .infinity) + } +} -- cgit