diff options
| author | Dustin Mierau <dustin@mierau.me> | 2025-11-07 21:03:53 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2025-11-07 21:03:53 -0800 |
| commit | 2f332ee497af925db1a2583135e9dfcdaff84794 (patch) | |
| tree | ff22f357a87cfa9dd577b4273f7f62a89906d83b /Hotline/macOS/Trackers/BonjourServerRow.swift | |
| parent | 637cd9af54a58db0c5dc2062b6c20291afd31147 (diff) | |
Add Bonjour discovery for Hotline servers on the local network to the Servers window.
Diffstat (limited to 'Hotline/macOS/Trackers/BonjourServerRow.swift')
| -rw-r--r-- | Hotline/macOS/Trackers/BonjourServerRow.swift | 19 |
1 files changed, 19 insertions, 0 deletions
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) + } +} |