diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-12-22 22:27:36 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-12-22 22:27:36 -0800 |
| commit | 141ba771eddd2e504a0f29bafd7b9f7c032b72c0 (patch) | |
| tree | 7e1949065c2061cdec9aaea6c834881d7b2fcac7 | |
| parent | b9443172e78669b78d3bd3fa4f20e1b202d9c741 (diff) | |
Add icon to Servers window. Add a simple app icon for macOS.
15 files changed, 27 insertions, 26 deletions
diff --git a/Hotline/Application.swift b/Hotline/Application.swift index 93bf025..2e35e3c 100644 --- a/Hotline/Application.swift +++ b/Hotline/Application.swift @@ -14,9 +14,19 @@ struct Application: App { .environment(model) } #elseif os(macOS) - WindowGroup { + Window("Servers", id: "servers") { TrackerView() .frame(minWidth: 250, minHeight: 250) + .toolbar { + ToolbarItem(placement: .navigation) { + Image("Hotline") + .resizable() + .renderingMode(.template) + .scaledToFit() + .foregroundColor(Color(hex: 0xE10000)) + .frame(width: 9) + } + } } .defaultSize(width: 700, height: 600) .defaultPosition(.center) diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/128x128.png b/Hotline/Assets.xcassets/AppIcon.appiconset/128x128.png Binary files differnew file mode 100644 index 0000000..61c67d8 --- /dev/null +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/128x128.png diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/128x128@2x.png b/Hotline/Assets.xcassets/AppIcon.appiconset/128x128@2x.png Binary files differnew file mode 100644 index 0000000..ba21777 --- /dev/null +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/128x128@2x.png diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/16x16.png b/Hotline/Assets.xcassets/AppIcon.appiconset/16x16.png Binary files differnew file mode 100644 index 0000000..69d1780 --- /dev/null +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/16x16.png diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/16x16@2x.png b/Hotline/Assets.xcassets/AppIcon.appiconset/16x16@2x.png Binary files differnew file mode 100644 index 0000000..d6562e6 --- /dev/null +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/16x16@2x.png diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/256x256.png b/Hotline/Assets.xcassets/AppIcon.appiconset/256x256.png Binary files differnew file mode 100644 index 0000000..9aa550c --- /dev/null +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/256x256.png diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/256x256@2x.png b/Hotline/Assets.xcassets/AppIcon.appiconset/256x256@2x.png Binary files differnew file mode 100644 index 0000000..368f133 --- /dev/null +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/256x256@2x.png diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/32x32.png b/Hotline/Assets.xcassets/AppIcon.appiconset/32x32.png Binary files differnew file mode 100644 index 0000000..d6562e6 --- /dev/null +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/32x32.png diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/32x32@2x.png b/Hotline/Assets.xcassets/AppIcon.appiconset/32x32@2x.png Binary files differnew file mode 100644 index 0000000..4377119 --- /dev/null +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/32x32@2x.png diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/512x512.png b/Hotline/Assets.xcassets/AppIcon.appiconset/512x512.png Binary files differnew file mode 100644 index 0000000..237bca9 --- /dev/null +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/512x512.png diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/512x512@2x.png b/Hotline/Assets.xcassets/AppIcon.appiconset/512x512@2x.png Binary files differnew file mode 100644 index 0000000..3c73e33 --- /dev/null +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/512x512@2x.png diff --git a/Hotline/Assets.xcassets/AppIcon.appiconset/Contents.json b/Hotline/Assets.xcassets/AppIcon.appiconset/Contents.json index 3a132e9..ed8a0ba 100644 --- a/Hotline/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Hotline/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -7,51 +7,61 @@ "size" : "1024x1024" }, { + "filename" : "16x16.png", "idiom" : "mac", "scale" : "1x", "size" : "16x16" }, { + "filename" : "16x16@2x.png", "idiom" : "mac", "scale" : "2x", "size" : "16x16" }, { + "filename" : "32x32.png", "idiom" : "mac", "scale" : "1x", "size" : "32x32" }, { + "filename" : "32x32@2x.png", "idiom" : "mac", "scale" : "2x", "size" : "32x32" }, { + "filename" : "128x128.png", "idiom" : "mac", "scale" : "1x", "size" : "128x128" }, { + "filename" : "128x128@2x.png", "idiom" : "mac", "scale" : "2x", "size" : "128x128" }, { + "filename" : "256x256.png", "idiom" : "mac", "scale" : "1x", "size" : "256x256" }, { + "filename" : "256x256@2x.png", "idiom" : "mac", "scale" : "2x", "size" : "256x256" }, { + "filename" : "512x512.png", "idiom" : "mac", "scale" : "1x", "size" : "512x512" }, { + "filename" : "512x512@2x.png", "idiom" : "mac", "scale" : "2x", "size" : "512x512" diff --git a/Hotline/Assets.xcassets/Image.imageset/Contents.json b/Hotline/Assets.xcassets/Image.imageset/Contents.json deleted file mode 100644 index a19a549..0000000 --- a/Hotline/Assets.xcassets/Image.imageset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Hotline/Hotline/HotlineTrackerClient.swift b/Hotline/Hotline/HotlineTrackerClient.swift index 6c5f01d..350db43 100644 --- a/Hotline/Hotline/HotlineTrackerClient.swift +++ b/Hotline/Hotline/HotlineTrackerClient.swift @@ -245,6 +245,7 @@ class HotlineTrackerClient { if let name = serverName, let desc = serverDescription { + // Ignore servers that are just used as dividers in the tracker listing. let validName = try? trackerSeparatorRegex.prefixMatch(in: name) if validName == nil { let server = HotlineServer(address: "\(ip_1).\(ip_2).\(ip_3).\(ip_4)", port: port, users: userCount, name: name, description: desc) diff --git a/Hotline/macOS/TrackerView.swift b/Hotline/macOS/TrackerView.swift index 874bcc2..789b2cd 100644 --- a/Hotline/macOS/TrackerView.swift +++ b/Hotline/macOS/TrackerView.swift @@ -217,7 +217,7 @@ struct TrackerView: View { var bookmarks: [TrackerBookmark] = [ TrackerBookmark(type: .server, name: "RetroMac", address: "82.32.130.173"), TrackerBookmark(type: .server, name: "System 7 Today", address: "158.174.146.146"), - TrackerBookmark(type: .server, name: "Bob Kiwi's House", address: "73.132.92.104"), +// TrackerBookmark(type: .server, name: "Bob Kiwi's House", address: "73.132.92.104"), TrackerBookmark(type: .tracker, name: "Featured Servers", address: "hltracker.com"), TrackerBookmark(type: .tracker, name: "Agent79", address: "tracked.agent79.org"), TrackerBookmark(type: .tracker, name: "Preterhuman", address: "tracker.preterhuman.net"), @@ -349,13 +349,13 @@ struct TrackerView: View { } label: { Label("Refresh", systemImage: "arrow.clockwise") } - .help("Refresh") + .help("Refresh Trackers") } ToolbarItem(placement: .primaryAction) { Button { } label: { - Label("Add Tracker", systemImage: "point.3.filled.connected.trianglepath.dotted") + Label("Add Tracker...", systemImage: "point.3.filled.connected.trianglepath.dotted") } .help("Add Tracker") } @@ -363,9 +363,9 @@ struct TrackerView: View { ToolbarItem(placement: .primaryAction) { Button { } label: { - Label("Add Server", systemImage: "plus") + Label("Add Server Bookmark...", systemImage: "plus") } - .help("Add Server") + .help("Add Server Bookmark") } } .onAppear { |