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:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user