feat: add deck, sidebar with controls and the main window layout

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 15:46:46 +02:00
co-authored by Claude Sonnet 5.5
parent daacfa20c8
commit 86f3983087
5 changed files with 172 additions and 11 deletions
+17 -11
View File
@@ -1,23 +1,29 @@
import SwiftUI
import SstUI
import SwiftUI
/// Placeholder shell; phase 5 replaces the content with the deck, history and dictionary.
struct MainWindow: View {
@EnvironmentObject private var model: AppModel
var body: some View {
ZStack {
BrushedBackground().ignoresSafeArea()
VStack(alignment: .leading, spacing: Layout.panelGap) {
SilkLabel(AppIdentity.brandCaption)
Text(model.statusLine)
.textStyle(Typography.reading)
.foregroundStyle(Palette.inkPrimary)
.padding(Layout.panelPadding)
.frame(maxWidth: .infinity, alignment: .leading)
.background(PanelBackground())
HStack(spacing: 0) {
Sidebar()
VStack(spacing: Layout.panelGap) {
DeckView()
switch model.section {
case .transcripts: HistoryView(list: model.historyList)
case .dictionary: DictionaryView(list: model.dictionaryList)
}
}
.padding(Layout.panelPadding)
}
.padding(Layout.panelPadding)
}
.confirmationDialog(Strings.clearHistoryConfirm, isPresented: $model.confirmingClearHistory) {
Button(Strings.erase, role: .destructive) { model.clearHistory() }
Button(Strings.cancel, role: .cancel) {}
} message: {
Text(Strings.clearHistoryDetail)
}
}
}