Initial commit
This commit is contained in:
38
oAI/oAIApp.swift
Normal file
38
oAI/oAIApp.swift
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user