39 lines
872 B
Swift
39 lines
872 B
Swift
//
|
|
// oAIApp.swift
|
|
// oAI
|
|
//
|
|
// Main app entry point
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
@main
|
|
struct oAIApp: App {
|
|
@State private var chatViewModel = ChatViewModel()
|
|
@State private var showAbout = false
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
ContentView()
|
|
.environment(chatViewModel)
|
|
.preferredColorScheme(.dark)
|
|
.sheet(isPresented: $showAbout) {
|
|
AboutView()
|
|
}
|
|
}
|
|
#if os(macOS)
|
|
.windowStyle(.hiddenTitleBar)
|
|
.windowToolbarStyle(.unified)
|
|
.defaultSize(width: 1024, height: 800)
|
|
.windowResizability(.contentMinSize)
|
|
.commands {
|
|
CommandGroup(replacing: .appInfo) {
|
|
Button("About oAI") {
|
|
showAbout = true
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
}
|
|
}
|