|
8 | 8 | [status-im2.common.parallax.whitelist :as whitelist]
|
9 | 9 | [status-im2.common.resources :as resources]
|
10 | 10 | [status-im2.contexts.onboarding.enable-biometrics.style :as style]
|
| 11 | + [status-im2.navigation.state :as state] |
11 | 12 | [utils.i18n :as i18n]
|
12 | 13 | [utils.re-frame :as rf]))
|
13 | 14 |
|
|
24 | 25 | [insets]
|
25 | 26 | (let [supported-biometric-type (rf/sub [:biometric/supported-type])
|
26 | 27 | bio-type-label (biometric/get-label-by-type supported-biometric-type)
|
27 |
| - profile-color (:color (rf/sub [:onboarding-2/profile]))] |
| 28 | + profile-color (or (:color (rf/sub [:onboarding-2/profile])) |
| 29 | + (rf/sub [:profile/customization-color]))] |
28 | 30 | [rn/view {:style (style/buttons insets)}
|
29 | 31 | [quo/button
|
30 | 32 | {:accessibility-label :enable-biometrics-button
|
|
36 | 38 | {:accessibility-label :maybe-later-button
|
37 | 39 | :background :blur
|
38 | 40 | :type :grey
|
39 |
| - :on-press #(rf/dispatch [:onboarding-2/create-account-and-login]) |
40 |
| - :container-style {:margin-top 12}} |
41 |
| - (i18n/label :t/maybe-later)]])) |
| 41 | + :on-press #(rf/dispatch (if (= :syncing-results @state/root-id) |
| 42 | + [:navigate-to-within-stack |
| 43 | + [:enable-notifications :enable-biometrics]] |
| 44 | + [:onboarding-2/create-account-and-login])) |
| 45 | + :container-style {:margin-top 12}} (i18n/label :t/maybe-later)]])) |
42 | 46 |
|
43 | 47 | (defn enable-biometrics-parallax
|
44 | 48 | []
|
45 | 49 | (let [stretch (if rn/small-screen? 25 40)]
|
46 | 50 | [parallax/video
|
47 |
| - {:layers (:biometrics resources/parallax-video) |
48 |
| - :stretch stretch}])) |
| 51 | + {:layers (:biometrics resources/parallax-video) :stretch stretch}])) |
49 | 52 |
|
50 | 53 | (defn enable-biometrics-simple
|
51 | 54 | []
|
|
58 | 61 | (defn enable-biometrics
|
59 | 62 | []
|
60 | 63 | (let [insets (safe-area/get-insets)]
|
61 |
| - [rn/view {:style (style/page-container insets)} |
62 |
| - [page-title] |
| 64 | + [rn/view {:style (style/page-container insets)} [page-title] |
63 | 65 | (if whitelist/whitelisted?
|
64 | 66 | [enable-biometrics-parallax]
|
65 |
| - [enable-biometrics-simple]) |
66 |
| - [enable-biometrics-buttons insets]])) |
| 67 | + [enable-biometrics-simple]) [enable-biometrics-buttons insets]])) |
0 commit comments