diff --git a/Modules/Sources/Browse/Resources/en.lproj/Localizable.strings b/Modules/Sources/Browse/Resources/en.lproj/Localizable.strings index d6f8df1..6cef50f 100644 --- a/Modules/Sources/Browse/Resources/en.lproj/Localizable.strings +++ b/Modules/Sources/Browse/Resources/en.lproj/Localizable.strings @@ -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 diff --git a/Modules/Sources/Browse/UI/Components/MessageView.swift b/Modules/Sources/Browse/UI/Components/MessageView.swift index 47cd6f9..a31135b 100644 --- a/Modules/Sources/Browse/UI/Components/MessageView.swift +++ b/Modules/Sources/Browse/UI/Components/MessageView.swift @@ -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. } diff --git a/Modules/Sources/Browse/UI/Views/BrowseView.swift b/Modules/Sources/Browse/UI/Views/BrowseView.swift index 030c0ed..af72a0e 100644 --- a/Modules/Sources/Browse/UI/Views/BrowseView.swift +++ b/Modules/Sources/Browse/UI/Views/BrowseView.swift @@ -79,6 +79,8 @@ private extension BrowseView { type: .noCredentials, action: login ) + case .notSupported: + EmptyView() case .loading: LoadingView() case .loaded: