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:
2026-10-01 15:36:45 +02:00
co-authored by Claude Sonnet 5.5
parent f808ff821c
commit f510f02945
11 changed files with 752 additions and 98 deletions
+19 -2
View File
@@ -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)
}
}
}