fixed browser loader
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
80eeb8765a
commit
852afa23cb
|
@ -153,7 +153,7 @@
|
||||||
|
|
||||||
(views/defview browser []
|
(views/defview browser []
|
||||||
(views/letsubs [webview (atom nil)
|
(views/letsubs [webview (atom nil)
|
||||||
width (reagent/atom nil)
|
window-width [:dimensions/window-width]
|
||||||
{:keys [address settings]} [:account/account]
|
{:keys [address settings]} [:account/account]
|
||||||
{:keys [browser-id dapp? name unsafe?] :as browser} [:get-current-browser]
|
{:keys [browser-id dapp? name unsafe?] :as browser} [:get-current-browser]
|
||||||
{:keys [url error? loading? url-editing? show-tooltip show-permission resolving?]} [:get :browser/options]
|
{:keys [url error? loading? url-editing? show-tooltip show-permission resolving?]} [:get :browser/options]
|
||||||
|
@ -163,11 +163,12 @@
|
||||||
can-go-forward? (browser/can-go-forward? browser)
|
can-go-forward? (browser/can-go-forward? browser)
|
||||||
url-original (browser/get-current-url browser)
|
url-original (browser/get-current-url browser)
|
||||||
opt-in? (or (nil? (:web3-opt-in? settings)) (:web3-opt-in? settings))]
|
opt-in? (or (nil? (:web3-opt-in? settings)) (:web3-opt-in? settings))]
|
||||||
[react/view {:style styles/browser :on-layout #(reset! width (.-width (.-layout (.-nativeEvent %))))}
|
[react/view {:style styles/browser}
|
||||||
[status-bar/status-bar]
|
[status-bar/status-bar]
|
||||||
[toolbar error? url url-original browser browser-id url-editing?]
|
[toolbar error? url url-original browser browser-id url-editing?]
|
||||||
(when (and loading? (not (nil? @width)))
|
[react/view
|
||||||
[connectivity/loading-indicator @width])
|
(when loading?
|
||||||
|
[connectivity/loading-indicator window-width])]
|
||||||
[browser-component {:webview webview
|
[browser-component {:webview webview
|
||||||
:dapp? dapp?
|
:dapp? dapp?
|
||||||
:error? error?
|
:error? error?
|
||||||
|
|
Loading…
Reference in New Issue