feat: turn Sst into a regular Mac app with settings, menus and menu bar item
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,31 @@
|
||||
import SwiftUI
|
||||
import SstUI
|
||||
|
||||
@main
|
||||
struct SstApp: App {
|
||||
@StateObject private var model = AppModel()
|
||||
|
||||
var body: some Scene {
|
||||
Window(AppIdentity.displayName, id: "main") {
|
||||
MainWindow()
|
||||
.environmentObject(model)
|
||||
.environmentObject(model.settings)
|
||||
.frame(minWidth: Layout.windowMinWidth, minHeight: Layout.windowMinHeight)
|
||||
}
|
||||
.defaultSize(width: Layout.windowDefaultWidth, height: Layout.windowDefaultHeight)
|
||||
.commands { AppCommands(model: model) }
|
||||
|
||||
Settings {
|
||||
SettingsView()
|
||||
.environmentObject(model)
|
||||
.environmentObject(model.settings)
|
||||
}
|
||||
|
||||
MenuBarExtra {
|
||||
MenuContent(model: model)
|
||||
MenuBarContent()
|
||||
.environmentObject(model)
|
||||
} label: {
|
||||
Image(systemName: model.iconName)
|
||||
Image(systemName: model.menuIconName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user