diff --git a/src/status_im/ui/screens/browser/styles.cljs b/src/status_im/ui/screens/browser/styles.cljs index 3215d6b0d2..8a7bbbc428 100644 --- a/src/status_im/ui/screens/browser/styles.cljs +++ b/src/status_im/ui/screens/browser/styles.cljs @@ -17,13 +17,20 @@ {:opacity 0.4}) (def web-view-error - {:flex 1 - :justify-content :center + {:justify-content :center :align-items :center - :background-color colors/gray-lighter}) + :position :absolute + :padding 20 + :top 0 + :left 0 + :bottom 0 + :right 0 + :background-color colors/white}) (def web-view-error-text - {:color colors/gray}) + {:color colors/gray + :line-height 22 + :text-align :center}) (defn toolbar-content [] {:flex-direction :row diff --git a/src/status_im/ui/screens/browser/views.cljs b/src/status_im/ui/screens/browser/views.cljs index 199167e3fe..a6f93c607e 100644 --- a/src/status_im/ui/screens/browser/views.cljs +++ b/src/status_im/ui/screens/browser/views.cljs @@ -20,7 +20,8 @@ [status-im.ui.screens.browser.styles :as styles] [status-im.utils.debounce :as debounce] [status-im.utils.http :as http] - [status-im.utils.js-resources :as js-res]) + [status-im.utils.js-resources :as js-res] + [status-im.utils.contenthash :as contenthash]) (:require-macros [status-im.utils.views :as views])) (defn toolbar-content [url url-original {:keys [secure?]} url-editing?] @@ -59,12 +60,13 @@ (re-frame/dispatch [:browser.ui/remove-browser-pressed browser-id]))))] [toolbar-content url url-original browser url-editing?]]) -(defn- web-view-error [_ code desc] +(defn- web-view-error [_ _ desc] (reagent/as-element [react/view styles/web-view-error + [react/image {:style {:width 140 :height 140 :margin-bottom 16} + :source {:uri (contenthash/url + "e3010170122001bbe2f5bfba0305a3bdc2047fddc47ee595a591bdee61de6040ffc2456624e1")}}] [react/i18n-text {:style styles/web-view-error-text :key :web-view-error}] - [react/text {:style styles/web-view-error-text} - (str code)] [react/text {:style styles/web-view-error-text} (str desc)]]))