Added the "notSupported" case to the MessageView component for the Browse module.
This commit is contained in:
parent
e982a8f689
commit
bc40f46649
@ -21,6 +21,9 @@
|
||||
"message.type_error.text.first" = "An error occurred while loading this data";
|
||||
"message.type_error.text.second" = "Please try loading this data again at a later time.";
|
||||
"message.type_error.button.text" = "Try again";
|
||||
"message.type_not_supported.text.first" = "This type of document cannot be opened yet";
|
||||
"message.type_not_supported.text.second" = "Please be patient while the support for this type of document is being built by our development team.";
|
||||
"message.type_not_supported.button.text" = "Go back to folder";
|
||||
|
||||
// BrowseView
|
||||
|
||||
|
@ -66,6 +66,7 @@ struct MessageView: View {
|
||||
extension MessageView {
|
||||
enum MessageType {
|
||||
case noCredentials
|
||||
case notSupported
|
||||
case empty
|
||||
case error
|
||||
}
|
||||
@ -76,6 +77,8 @@ private extension MessageView.MessageType {
|
||||
switch self {
|
||||
case .noCredentials:
|
||||
return "message.type_no_credentials.text.first"
|
||||
case .notSupported:
|
||||
return "message.type_not_supported.text.first"
|
||||
case .empty:
|
||||
return "message.type_empty.text.first"
|
||||
case .error:
|
||||
@ -87,6 +90,8 @@ private extension MessageView.MessageType {
|
||||
switch self {
|
||||
case .noCredentials:
|
||||
return "message.type_no_credentials.text.second"
|
||||
case .notSupported:
|
||||
return "message.type_not_supported.text.second"
|
||||
case .empty:
|
||||
return "message.type_empty.text.second"
|
||||
case .error:
|
||||
@ -98,6 +103,8 @@ private extension MessageView.MessageType {
|
||||
switch self {
|
||||
case .noCredentials:
|
||||
return "message.type_no_credentials.button.text"
|
||||
case .notSupported:
|
||||
return "message.type_not_supported.button.text"
|
||||
case .empty:
|
||||
return "message.type_empty.button.text"
|
||||
case .error:
|
||||
@ -121,6 +128,11 @@ struct MessageView_Previews: PreviewProvider {
|
||||
}
|
||||
.previewDisplayName("View of type no credentials")
|
||||
|
||||
MessageView(type: .notSupported) {
|
||||
// action closure.
|
||||
}
|
||||
.previewDisplayName("View of type not supported")
|
||||
|
||||
MessageView(type: .empty) {
|
||||
// action closure.
|
||||
}
|
||||
|
@ -79,6 +79,8 @@ private extension BrowseView {
|
||||
type: .noCredentials,
|
||||
action: login
|
||||
)
|
||||
case .notSupported:
|
||||
EmptyView()
|
||||
case .loading:
|
||||
LoadingView()
|
||||
case .loaded:
|
||||
|
Loading…
x
Reference in New Issue
Block a user