diff options
| author | Dustin Mierau <dustin@mierau.me> | 2023-12-24 12:10:02 -0800 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2023-12-24 12:10:02 -0800 |
| commit | a4cbaea0b12b7dd42133b4bd14f1371f1000fcc0 (patch) | |
| tree | e09e601d0d41024e9ed8c49c2b2c53a996cb7297 /Hotline/Application.swift | |
| parent | e2eccde99075d2ca355a80bbbb7a3160d766b920 (diff) | |
New Preferences window on macOS with support for changing some basic moderation settings, plus username (finally) and user icon.1.0beta
Diffstat (limited to 'Hotline/Application.swift')
| -rw-r--r-- | Hotline/Application.swift | 10 |
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 } |