macos: add ErrorView

This commit is contained in:
Mitchell Hashimoto
2023-02-14 16:11:47 -08:00
parent 9bd527fe00
commit c438d72f13
7 changed files with 57 additions and 6 deletions

View File

@@ -0,0 +1,24 @@
import SwiftUI
struct ErrorView: View {
var body: some View {
HStack {
Image("AppIconImage")
.resizable()
.scaledToFit()
.frame(width: 128, height: 128)
VStack(alignment: .leading) {
Text("Oh, no. 😭").font(.title)
Text("Something went fatally wrong.\nCheck the logs and restart Ghostty.")
}
}
.padding()
}
}
struct ErrorView_Previews: PreviewProvider {
static var previews: some View {
ErrorView()
}
}