29 lines
666 B
Swift
29 lines
666 B
Swift
import SwiftUI
|
|
|
|
struct StorageErrorView: View {
|
|
|
|
@EnvironmentObject
|
|
private var content: Content
|
|
|
|
@Binding
|
|
var isPresented: Bool
|
|
|
|
var body: some View {
|
|
VStack {
|
|
Text("Failed to load database")
|
|
.font(.headline)
|
|
List(content.storageErrors) { error in
|
|
VStack {
|
|
Text(error.message)
|
|
Text(error.date.formatted())
|
|
.font(.footnote)
|
|
}
|
|
}
|
|
.frame(minHeight: 300)
|
|
Button("Dismiss", action: { isPresented = false })
|
|
.padding()
|
|
}
|
|
.padding()
|
|
}
|
|
}
|