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