Save automatically, improve mocks
This commit is contained in:
28
CHDataManagement/Main/StorageErrorView.swift
Normal file
28
CHDataManagement/Main/StorageErrorView.swift
Normal file
@ -0,0 +1,28 @@
|
||||
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()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user