mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-26 01:03:56 +00:00
macos: iOS app can initialize Ghostty
This commit is contained in:
@@ -2,14 +2,19 @@ import SwiftUI
|
||||
|
||||
@main
|
||||
struct Ghostty_iOSApp: App {
|
||||
@StateObject private var ghostty_app = Ghostty.App()
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
iOS_ContentView()
|
||||
.environmentObject(ghostty_app)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct iOS_ContentView: View {
|
||||
@EnvironmentObject private var ghostty_app: Ghostty.App
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Image("AppIconImage")
|
||||
@@ -17,6 +22,7 @@ struct iOS_ContentView: View {
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(maxHeight: 96)
|
||||
Text("Ghostty")
|
||||
Text("State: \(ghostty_app.readiness.rawValue)")
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user