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.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.text.second" = "Please try loading this data again at a later time.";
|
||||||
"message.type_error.button.text" = "Try again";
|
"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
|
// BrowseView
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ struct MessageView: View {
|
|||||||
extension MessageView {
|
extension MessageView {
|
||||||
enum MessageType {
|
enum MessageType {
|
||||||
case noCredentials
|
case noCredentials
|
||||||
|
case notSupported
|
||||||
case empty
|
case empty
|
||||||
case error
|
case error
|
||||||
}
|
}
|
||||||
@ -76,6 +77,8 @@ private extension MessageView.MessageType {
|
|||||||
switch self {
|
switch self {
|
||||||
case .noCredentials:
|
case .noCredentials:
|
||||||
return "message.type_no_credentials.text.first"
|
return "message.type_no_credentials.text.first"
|
||||||
|
case .notSupported:
|
||||||
|
return "message.type_not_supported.text.first"
|
||||||
case .empty:
|
case .empty:
|
||||||
return "message.type_empty.text.first"
|
return "message.type_empty.text.first"
|
||||||
case .error:
|
case .error:
|
||||||
@ -87,6 +90,8 @@ private extension MessageView.MessageType {
|
|||||||
switch self {
|
switch self {
|
||||||
case .noCredentials:
|
case .noCredentials:
|
||||||
return "message.type_no_credentials.text.second"
|
return "message.type_no_credentials.text.second"
|
||||||
|
case .notSupported:
|
||||||
|
return "message.type_not_supported.text.second"
|
||||||
case .empty:
|
case .empty:
|
||||||
return "message.type_empty.text.second"
|
return "message.type_empty.text.second"
|
||||||
case .error:
|
case .error:
|
||||||
@ -98,6 +103,8 @@ private extension MessageView.MessageType {
|
|||||||
switch self {
|
switch self {
|
||||||
case .noCredentials:
|
case .noCredentials:
|
||||||
return "message.type_no_credentials.button.text"
|
return "message.type_no_credentials.button.text"
|
||||||
|
case .notSupported:
|
||||||
|
return "message.type_not_supported.button.text"
|
||||||
case .empty:
|
case .empty:
|
||||||
return "message.type_empty.button.text"
|
return "message.type_empty.button.text"
|
||||||
case .error:
|
case .error:
|
||||||
@ -121,6 +128,11 @@ struct MessageView_Previews: PreviewProvider {
|
|||||||
}
|
}
|
||||||
.previewDisplayName("View of type no credentials")
|
.previewDisplayName("View of type no credentials")
|
||||||
|
|
||||||
|
MessageView(type: .notSupported) {
|
||||||
|
// action closure.
|
||||||
|
}
|
||||||
|
.previewDisplayName("View of type not supported")
|
||||||
|
|
||||||
MessageView(type: .empty) {
|
MessageView(type: .empty) {
|
||||||
// action closure.
|
// action closure.
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,8 @@ private extension BrowseView {
|
|||||||
type: .noCredentials,
|
type: .noCredentials,
|
||||||
action: login
|
action: login
|
||||||
)
|
)
|
||||||
|
case .notSupported:
|
||||||
|
EmptyView()
|
||||||
case .loading:
|
case .loading:
|
||||||
LoadingView()
|
LoadingView()
|
||||||
case .loaded:
|
case .loaded:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user