WIP - Complete App refactoring
This commit is contained in:
@@ -146,3 +146,33 @@ enum RequestAlert: UserAlert {
|
||||
return [.OK]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
enum PersistenceAlert: UserAlert {
|
||||
case DECODING_FAILED,
|
||||
ENCODING_FAILED,
|
||||
SAVE_FAILED,
|
||||
LOAD_FAILED
|
||||
|
||||
var localizedDescription: LocalizedStringKey {
|
||||
switch self {
|
||||
case .DECODING_FAILED: return "Unable to decode recipe data."
|
||||
case .ENCODING_FAILED: return "Unable to encode recipe data."
|
||||
case .SAVE_FAILED: return "Unable to save recipe."
|
||||
case .LOAD_FAILED: return "Unable to load recipe."
|
||||
}
|
||||
}
|
||||
|
||||
var localizedTitle: LocalizedStringKey {
|
||||
switch self {
|
||||
case .DECODING_FAILED: return "Decoding Error"
|
||||
case .ENCODING_FAILED: return "Encoding Error"
|
||||
case .SAVE_FAILED: return "Error"
|
||||
case .LOAD_FAILED: return "Error"
|
||||
}
|
||||
}
|
||||
|
||||
var alertButtons: [AlertButton] {
|
||||
return [.OK]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user