diff --git a/src/status_im/translations/en.cljs b/src/status_im/translations/en.cljs index 3e9181de82..f8ab27f1e7 100644 --- a/src/status_im/translations/en.cljs +++ b/src/status_im/translations/en.cljs @@ -398,7 +398,7 @@ :postponed "Postponed" ;;webview - :web-view-error "oops, error" + :web-view-error "Unable to load page" ;;testfairy warning :testfairy-title "Warning!" diff --git a/src/status_im/ui/screens/browser/styles.cljs b/src/status_im/ui/screens/browser/styles.cljs index 9fcd449163..0a9471fe6f 100644 --- a/src/status_im/ui/screens/browser/styles.cljs +++ b/src/status_im/ui/screens/browser/styles.cljs @@ -42,9 +42,13 @@ :justify-content :center}) (def web-view-error - {:justify-content :center - :align-items :center - :flex-direction :row}) + {:flex 1 + :justify-content :center + :align-items :center + :background-color colors/gray-lighter}) + +(def web-view-error-text + {:color colors/gray}) (defnstyle toolbar-content [show-actions] {:flex-direction :row @@ -67,4 +71,4 @@ (def toolbar-content-dapp {:flex-direction :row - :margin-horizontal 15}) \ No newline at end of file + :margin-horizontal 15}) diff --git a/src/status_im/ui/screens/browser/views.cljs b/src/status_im/ui/screens/browser/views.cljs index 58245cf9a0..e41cf82317 100644 --- a/src/status_im/ui/screens/browser/views.cljs +++ b/src/status_im/ui/screens/browser/views.cljs @@ -50,10 +50,15 @@ [react/view [vector-icons/icon :icons/refresh]]]]])) -(defn web-view-error [] +(defn- web-view-error [_ code desc] (reagent/as-element [react/view styles/web-view-error - [react/text (i18n/label :t/web-view-error)]])) + [react/text {:style styles/web-view-error-text} + (i18n/label :t/web-view-error)] + [react/text {:style styles/web-view-error-text} + (str code)] + [react/text {:style styles/web-view-error-text} + (str desc)]])) (defn web-view-loading [] (reagent/as-element