diff options
| author | Dustin Mierau <dustin@mierau.me> | 2024-05-03 14:46:42 -0700 |
|---|---|---|
| committer | Dustin Mierau <dustin@mierau.me> | 2024-05-03 14:46:42 -0700 |
| commit | fc798a575aed94718dcc4c5555b6e01cf8da93e9 (patch) | |
| tree | f2e8c0a54302c5a915e3792abd1c6aea8e422e1d /Hotline/Application-macOS.swift | |
| parent | 0471c4c4594f0406e85687ef84a29d99616c16cf (diff) | |
Nicer about box.
Diffstat (limited to 'Hotline/Application-macOS.swift')
| -rw-r--r-- | Hotline/Application-macOS.swift | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Hotline/Application-macOS.swift b/Hotline/Application-macOS.swift index ec42a89..eb5be32 100644 --- a/Hotline/Application-macOS.swift +++ b/Hotline/Application-macOS.swift @@ -60,6 +60,25 @@ struct Application: App { } } + Window("About", id: "about") { + AboutView() + .ignoresSafeArea() + .background(Color.hotlineRed) + } + .windowResizability(.contentSize) + .windowStyle(.hiddenTitleBar) + .defaultSize(width: 300, height: 400) + .defaultPosition(.center) + .commands { + CommandGroup(replacing: CommandGroupPlacement.appInfo) { + Button(action: { + openWindow(id: "about") + }) { + Text("About Hotline") + } + } + } + // MARK: Server Window WindowGroup(id: "server", for: Server.self) { server in ServerView(server: server) @@ -165,6 +184,7 @@ struct Application: App { SettingsView() } + // MARK: News Editor Window // WindowGroup(id: "news-editor", for: NewsArticle.self) { $article in // NewsEditorView(article: $article) |