aboutsummaryrefslogtreecommitdiff
path: root/Hotline
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2025-10-24 14:20:11 -0700
committerDustin Mierau <dustin@mierau.me>2025-10-24 14:20:11 -0700
commit1118b224e4a6561e55e757b8b826780be1444f07 (patch)
tree0781f6b013cc9c51e09df4201bb7d5d55367aafa /Hotline
parent8bab12046b2c91cff7e1194e576acecf57551e08 (diff)
Add keyboard shortcut to Tracker window to activate search (cmd-f)
Diffstat (limited to 'Hotline')
-rw-r--r--Hotline/macOS/TrackerView.swift4
1 files changed, 3 insertions, 1 deletions
diff --git a/Hotline/macOS/TrackerView.swift b/Hotline/macOS/TrackerView.swift
index c14f982..5e848de 100644
--- a/Hotline/macOS/TrackerView.swift
+++ b/Hotline/macOS/TrackerView.swift
@@ -33,6 +33,7 @@ struct TrackerView: View {
@State private var trackerServers: [Bookmark: [BookmarkServer]] = [:]
@State private var loadingTrackers: Set<Bookmark> = []
@State private var searchText: String = ""
+ @State private var isSearching = false
@Query(sort: \Bookmark.order) private var bookmarks: [Bookmark]
@Binding var selection: TrackerSelection?
@@ -323,7 +324,8 @@ struct TrackerView: View {
openWindow(id: "server", value: s)
}
})
- .searchable(text: $searchText, placement: .automatic, prompt: "Search")
+ .searchable(text: $searchText, isPresented: $isSearching, placement: .automatic, prompt: "Search")
+ .background(Button("", action: { isSearching = true }).keyboardShortcut("f").hidden())
}
private var hotlineLogoImage: some View {