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
+37
View File
@@ -0,0 +1,37 @@
import SwiftUI
struct AppCommands: Commands {
@ObservedObject var model: AppModel
@Environment(\.openWindow) private var openWindow
var body: some Commands {
CommandGroup(after: .pasteboard) {
Divider()
Button(Strings.clearHistory) {
openWindow(id: "main")
model.confirmingClearHistory = true
}
}
CommandMenu(Strings.recordingMenu) {
Button(model.isRecording ? Strings.stopRecording : Strings.startRecording) {
model.toggleWindowRecording()
}
.keyboardShortcut("r", modifiers: [.command, .option])
Divider()
Button(Strings.transcripts) { show(.transcripts) }
.keyboardShortcut("1", modifiers: .command)
Button(Strings.dictionary) { show(.dictionary) }
.keyboardShortcut("2", modifiers: .command)
Button(Strings.search) {
show(.transcripts)
model.focusSearch()
}
.keyboardShortcut("f", modifiers: .command)
}
}
private func show(_ section: AppModel.Section) {
openWindow(id: "main")
model.show(section)
}
}