aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Application.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Hotline/Application.swift')
-rw-r--r--Hotline/Application.swift10
1 files changed, 10 insertions, 0 deletions
diff --git a/Hotline/Application.swift b/Hotline/Application.swift
index 65833f1..83751c3 100644
--- a/Hotline/Application.swift
+++ b/Hotline/Application.swift
@@ -7,6 +7,8 @@ struct Application: App {
private var model = Hotline(trackerClient: HotlineTrackerClient(), client: HotlineClient())
#endif
+ private var preferences = Prefs()
+
var body: some Scene {
#if os(iOS)
WindowGroup {
@@ -36,6 +38,7 @@ struct Application: App {
ServerView(server: s)
.frame(minWidth: 400, minHeight: 300)
.environment(Hotline(trackerClient: HotlineTrackerClient(), client: HotlineClient()))
+ .environment(preferences)
.toolbar {
ToolbarItem(placement: .navigation) {
Image(systemName: "globe.americas.fill")
@@ -52,6 +55,13 @@ struct Application: App {
}
.defaultSize(width: 700, height: 800)
.defaultPosition(.center)
+
+#if os(macOS)
+ Settings {
+ SettingsView()
+ .environment(preferences)
+ }
+#endif
#endif
}