| 1 | import SwiftUI |
| 2 | import AppKit |
| 3 | |
| 4 | @main |
| 5 | struct PitchApp: App { |
| 6 | @NSApplicationDelegateAdaptor(AppDelegate.self) private var delegate |
| 7 | |
| 8 | var body: some Scene { |
| 9 | WindowGroup("Clover Pitch") { |
| 10 | ContentView() |
| 11 | .frame(minWidth: 300, minHeight: 340) |
| 12 | .navigationTitle("Clover Pitch") |
| 13 | } |
| 14 | .windowResizability(.contentMinSize) |
| 15 | .commands { CommandGroup(replacing: .newItem) {} } |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | final class AppDelegate: NSObject, NSApplicationDelegate { |
| 20 | func applicationDidFinishLaunching(_ notification: Notification) { |
| 21 | NSApp.setActivationPolicy(.regular) |
| 22 | NSApp.activate(ignoringOtherApps: true) |
| 23 | } |
| 24 | func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { true } |
| 25 | } |