[#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"
|
||||
|
||||
;;webview
|
||||
:web-view-error "oops, error"
|
||||
:web-view-error "Unable to load page"
|
||||
|
||||
;;testfairy warning
|
||||
:testfairy-title "Warning!"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue