-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContentView.swift
More file actions
58 lines (53 loc) · 1.69 KB
/
ContentView.swift
File metadata and controls
58 lines (53 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// ContentView.swift
// ZenlyticStyleEditor
//
// Created by Greg Peters on 7/15/25.
//
import SwiftUI
import AppKit
struct ContentView: View {
@StateObject private var viewModel = StyleEditorViewModel()
init() {
print("ContentView: Initializing...")
}
var body: some View {
Group {
if viewModel.components.isEmpty {
// Fallback view while loading
VStack {
Text("Loading Zenlytic Style Editor...")
.font(.title)
.foregroundColor(.secondary)
ProgressView()
.padding()
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
} else {
NavigationSplitView {
SidebarView(viewModel: viewModel)
} content: {
StyleEditorView(viewModel: viewModel)
} detail: {
if let selectedComponent = viewModel.selectedComponent {
VStack {
PreviewPanel(component: selectedComponent, previewMode: viewModel.previewMode)
SnippetOutputView(viewModel: viewModel)
}
} else {
Text("Select a component to edit")
.foregroundColor(.secondary)
}
}
.navigationTitle("Zenlytic Style Editor")
}
}
.frame(minWidth: 1200, minHeight: 800)
.onAppear {
print("ContentView: onAppear called")
}
}
}
#Preview {
ContentView()
}