[#3946] Improved webview error rendering
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
6dec4876a2
commit
11c59151f6
|
@ -398,7 +398,7 @@
|
||||||
:postponed "Postponed"
|
:postponed "Postponed"
|
||||||
|
|
||||||
;;webview
|
;;webview
|
||||||
:web-view-error "oops, error"
|
:web-view-error "Unable to load page"
|
||||||
|
|
||||||
;;testfairy warning
|
;;testfairy warning
|
||||||
:testfairy-title "Warning!"
|
:testfairy-title "Warning!"
|
||||||
|
|
|
@ -42,9 +42,13 @@
|
||||||
:justify-content :center})
|
:justify-content :center})
|
||||||
|
|
||||||
(def web-view-error
|
(def web-view-error
|
||||||
{:justify-content :center
|
{:flex 1
|
||||||
|
:justify-content :center
|
||||||
:align-items :center
|
:align-items :center
|
||||||
:flex-direction :row})
|
:background-color colors/gray-lighter})
|
||||||
|
|
||||||
|
(def web-view-error-text
|
||||||
|
{:color colors/gray})
|
||||||
|
|
||||||
(defnstyle toolbar-content [show-actions]
|
(defnstyle toolbar-content [show-actions]
|
||||||
{:flex-direction :row
|
{:flex-direction :row
|
||||||
|
|
|
@ -50,10 +50,15 @@
|
||||||
[react/view
|
[react/view
|
||||||
[vector-icons/icon :icons/refresh]]]]]))
|
[vector-icons/icon :icons/refresh]]]]]))
|
||||||
|
|
||||||
(defn web-view-error []
|
(defn- web-view-error [_ code desc]
|
||||||
(reagent/as-element
|
(reagent/as-element
|
||||||
[react/view styles/web-view-error
|
[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 []
|
(defn web-view-loading []
|
||||||
(reagent/as-element
|
(reagent/as-element
|
||||||
|
|
Loading…
Reference in New Issue