mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-10 07:36:46 +00:00
WIP
This commit is contained in:
parent
c1230319e1
commit
22c4f87a37
@ -204,7 +204,7 @@
|
||||
(.startSearchForLocalPairingPeers ^js (network) callback))
|
||||
|
||||
(defn local-pairing-preflight-outbound-check
|
||||
"Checks whether the device has allows connecting to the local server"
|
||||
"Checks whether the device has allowed connecting to the local server"
|
||||
[callback]
|
||||
(log/info "[native-module] Performing local pairing preflight check")
|
||||
(when platform/ios?
|
||||
|
@ -50,7 +50,8 @@
|
||||
[quo/text
|
||||
{:weight :semi-bold
|
||||
:size :heading-2
|
||||
:style style/header} (i18n/label :t/check-before-syncing)]
|
||||
:style style/header}
|
||||
(i18n/label :t/check-before-syncing)]
|
||||
[quo/text {:style style/description} (i18n/label :t/check-before-syncing-doc-description)]
|
||||
|
||||
(into
|
||||
@ -69,6 +70,5 @@
|
||||
:disabled? (not= checked-count (count checks))
|
||||
:customization-color (or customization-color :blue)
|
||||
:accessibility-label :continue-button
|
||||
|
||||
:on-press on-continue}
|
||||
(i18n/label :t/continue)]]]))
|
||||
|
@ -24,8 +24,8 @@
|
||||
[]
|
||||
(rf/dispatch
|
||||
[:show-bottom-sheet
|
||||
{:content (fn [] [check-before-syncing/view
|
||||
{:on-submit navigate-to-sign-in-by-syncing}])
|
||||
{:content (fn []
|
||||
[check-before-syncing/view {:on-submit navigate-to-sign-in-by-syncing}])
|
||||
:shell? true}]))
|
||||
|
||||
(defn- navigate-to-sign-in-by-recovery-phrase
|
||||
|
@ -53,4 +53,3 @@
|
||||
|
||||
(def login-profile-card
|
||||
{:margin-bottom 20})
|
||||
|
||||
|
@ -70,14 +70,13 @@
|
||||
(rf/defn preflight-outbound-check-for-local-pairing
|
||||
{:events [:syncing/preflight-outbound-check]}
|
||||
[_ set-checks-passed]
|
||||
(let [callback
|
||||
(fn [raw-response]
|
||||
(log/info "Local pairing preflight check"
|
||||
{:response raw-response
|
||||
:event :syncing/preflight-outbound-check})
|
||||
(let [^js response-js (transforms/json->js raw-response)
|
||||
error (transforms/js->clj (.-error response-js))]
|
||||
(set-checks-passed (empty? error))))]
|
||||
(let [callback (fn [raw-response]
|
||||
(log/info "Local pairing preflight check"
|
||||
{:response raw-response
|
||||
:event :syncing/preflight-outbound-check})
|
||||
(let [^js response-js (transforms/json->js raw-response)
|
||||
error (transforms/js->clj (.-error response-js))]
|
||||
(set-checks-passed (empty? error))))]
|
||||
(native-module/local-pairing-preflight-outbound-check callback)))
|
||||
|
||||
(rf/defn initiate-local-pairing-with-connection-string
|
||||
|
@ -194,7 +194,7 @@
|
||||
|
||||
(defn- scan-qr-code-tab
|
||||
[qr-view-finder]
|
||||
(if (and @preflight-check-passed?
|
||||
(if (and ;@preflight-check-passed?
|
||||
@camera-permission-granted?
|
||||
(boolean (not-empty qr-view-finder)))
|
||||
[viewfinder qr-view-finder]
|
||||
@ -276,7 +276,7 @@
|
||||
app-state-listener (.addEventListener rn/app-state "change" set-torch-off-fn)]
|
||||
#(.remove app-state-listener)))
|
||||
|
||||
(defn f-view
|
||||
(defn view
|
||||
[_]
|
||||
(let [insets (safe-area/get-insets)
|
||||
qr-code-succeed? (reagent/atom false)
|
||||
@ -358,7 +358,7 @@
|
||||
(set-rescan-timeout))
|
||||
:set-rescan-timeout set-rescan-timeout}])
|
||||
[rn/view {:style (style/root-container (:top insets))}
|
||||
[:f> header
|
||||
[header
|
||||
{:active-tab active-tab
|
||||
:title title
|
||||
:title-opacity title-opacity
|
||||
@ -392,7 +392,3 @@
|
||||
:container-style (style/camera-flash-button @qr-view-finder)
|
||||
:on-press #(swap! torch? not)}
|
||||
flashlight-icon])]]))))
|
||||
|
||||
(defn view
|
||||
[props]
|
||||
[:f> f-view props])
|
||||
|
Loading…
x
Reference in New Issue
Block a user