aboutsummaryrefslogtreecommitdiff
path: root/Hotline/macOS/Trackers
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-11-28 00:19:44 +0100
committerRuben Beltran del Rio <git@r.bdr.sh>2025-11-28 00:19:44 +0100
commit4398fb6da5021a3d083351aa216551801ec2ac33 (patch)
treebf35d9451043ea89c3f64835267528c59162e1ef /Hotline/macOS/Trackers
parent213710bf5bd6413c747bf126db50816ef5de5a6e (diff)
Re-add friendship quest remixHEADmain
Diffstat (limited to 'Hotline/macOS/Trackers')
-rw-r--r--Hotline/macOS/Trackers/TrackerItemView.swift13
-rw-r--r--Hotline/macOS/Trackers/TrackerView.swift5
2 files changed, 18 insertions, 0 deletions
diff --git a/Hotline/macOS/Trackers/TrackerItemView.swift b/Hotline/macOS/Trackers/TrackerItemView.swift
index 37093d2..cff0a8b 100644
--- a/Hotline/macOS/Trackers/TrackerItemView.swift
+++ b/Hotline/macOS/Trackers/TrackerItemView.swift
@@ -62,6 +62,19 @@ struct TrackerItemView: View {
.opacity(0.75)
.padding(.leading, 3)
.padding(.trailing, 2)
+ Image(systemName: "bolt.fill")
+ .resizable()
+ .renderingMode(.template)
+ .aspectRatio(contentMode: .fit)
+ .frame(width: 13, height: 13, alignment: .center)
+ .opacity(0.5)
+ .padding(.leading, 3)
+ .padding(.trailing, 2)
+ .foregroundStyle(bookmark.autoconnect ? Color.accentColor : Color.gray)
+ .onTapGesture {
+ bookmark.autoconnect.toggle()
+ try? bookmark.modelContext?.save()
+ }
Image("Server")
.resizable()
.scaledToFit()
diff --git a/Hotline/macOS/Trackers/TrackerView.swift b/Hotline/macOS/Trackers/TrackerView.swift
index e0ca87d..0f598ca 100644
--- a/Hotline/macOS/Trackers/TrackerView.swift
+++ b/Hotline/macOS/Trackers/TrackerView.swift
@@ -157,6 +157,11 @@ struct TrackerView: View {
) {
self.toggleExpanded(for: bookmark)
}
+ .onAppear {
+ if bookmark.autoconnect, let server = bookmark.server {
+ openWindow(id: "server", value: server)
+ }
+ }
.tag(TrackerSelection.bookmark(bookmark))
if bookmark.type == .tracker && self.expandedTrackers.contains(bookmark) {