test
This commit is contained in:
parent
a1e3bb3bd6
commit
e39b8783e8
|
@ -56,7 +56,7 @@
|
|||
:after-load-async status-im.setup.hot-reload/reload
|
||||
:build-notify status-im.setup.hot-reload/build-notify
|
||||
:preloads [;; The official recommendation is to
|
||||
;; load the debugger preload first.
|
||||
user
|
||||
flow-storm.api
|
||||
re-frisk-remote.preload
|
||||
status-im.setup.schema-preload
|
||||
|
|
|
@ -52,13 +52,13 @@
|
|||
[]
|
||||
(when-let [blur-show-fn @overlay/blur-show-fn-atom]
|
||||
(blur-show-fn))
|
||||
(rf/dispatch [:open-modal :screen/onboarding.sync-or-recover-profile]))
|
||||
(rf/dispatch [:open-modal [:screen/onboarding.share-usage {:next-screen :screen/onboarding.sync-or-recover-profile}]]))
|
||||
|
||||
(defn- create-profile
|
||||
[]
|
||||
(when-let [blur-show-fn @overlay/blur-show-fn-atom]
|
||||
(blur-show-fn))
|
||||
(rf/dispatch [:open-modal :screen/onboarding.new-to-status]))
|
||||
(rf/dispatch [:open-modal :screen/onboarding.share-usage {:next-screen :screen/onboarding.new-to-status}]))
|
||||
|
||||
(defn view
|
||||
[]
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
(ns status-im.contexts.onboarding.share-usage.style)
|
||||
|
||||
(def title-container
|
||||
{:margin-horizontal 20
|
||||
:padding-bottom 20
|
||||
:padding-top 12})
|
||||
|
||||
(defn page-illustration
|
||||
[width]
|
||||
{:flex 1
|
||||
:margin-top 12
|
||||
:margin-bottom 10
|
||||
:width width})
|
||||
|
||||
(defn buttons
|
||||
[insets]
|
||||
{:margin 20
|
||||
:margin-bottom (+ 12 (:bottom insets))})
|
|
@ -0,0 +1,55 @@
|
|||
(ns status-im.contexts.onboarding.share-usage.view
|
||||
(:require
|
||||
[quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[react-native.safe-area :as safe-area]
|
||||
[status-im.common.biometric.utils :as biometric]
|
||||
[status-im.common.events-helper :as events-helper]
|
||||
[status-im.common.resources :as resources]
|
||||
[status-im.common.terms.view :as terms]
|
||||
[status-im.contexts.onboarding.enable-biometrics.style :as style]
|
||||
[status-im.navigation.state :as state]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn view
|
||||
[]
|
||||
(let [insets (safe-area/get-insets)
|
||||
next-screen (:next-screen (rf/sub [:get-screen-params :screen/onboarding.share-usage]))
|
||||
share-usage-data (rn/use-callback #(rf/dispatch [:onboarding/share-usage-data true next-screen]))
|
||||
maybe-later (rn/use-callback #(rf/dispatch [:onboarding/share-usage-data false next-screen]))
|
||||
learn-more (rn/use-callback #(rf/dispatch [:show-bottom-sheet {:content terms/terms-of-use :shell? true}]))]
|
||||
[:<>
|
||||
[quo/page-nav
|
||||
{:margin-top (:top insets)
|
||||
:background :blur
|
||||
:icon-name :i/arrow-left
|
||||
:on-press events-helper/navigate-back
|
||||
:right-side [{:icon-left :i/info
|
||||
:accessibility-label :learn-more
|
||||
:label (i18n/label :t/learn-more)
|
||||
:on-press learn-more}]}]
|
||||
[quo/text-combinations
|
||||
{:container-style style/title-container
|
||||
:title (i18n/label :t/help-us-improve-status)
|
||||
:title-accessibility-label :share-usage-title
|
||||
:description (i18n/label :t/collecting-usage-data)
|
||||
:description-accessibility-label :share-usage-subtitle}]
|
||||
[rn/image
|
||||
{:resize-mode :contain
|
||||
:style (style/page-illustration (:width (rn/get-window)))
|
||||
:source (resources/get-image :biometrics)}]
|
||||
[rn/view {:style (style/buttons insets)}
|
||||
[quo/button
|
||||
{:size 40
|
||||
:accessibility-label :share-usage-data
|
||||
:on-press share-usage-data}
|
||||
(i18n/label :t/share-usage-data)]
|
||||
[quo/button
|
||||
{:size 40
|
||||
:accessibility-label :maybe-later-button
|
||||
:background :blur
|
||||
:type :grey
|
||||
:on-press maybe-later
|
||||
:container-style {:margin-top 12}}
|
||||
(i18n/label :t/maybe-later)]]]))
|
|
@ -56,7 +56,7 @@
|
|||
key-uid
|
||||
(update :profile/login #(select-profile % key-uid)))]
|
||||
{:db new-db
|
||||
:fx (if (profile.data-store/accepted-terms? accounts)
|
||||
:fx (if (and false (profile.data-store/accepted-terms? accounts))
|
||||
[[:dispatch [:update-theme-and-init-root :screen/profile.profiles]]
|
||||
(when (and key-uid userConfirmed)
|
||||
[:effects.biometric/check-if-available
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
[status-im.contexts.onboarding.create-profile.view :as create-profile]
|
||||
[status-im.contexts.onboarding.enable-biometrics.view :as enable-biometrics]
|
||||
[status-im.contexts.onboarding.enable-notifications.view :as enable-notifications]
|
||||
[status-im.contexts.onboarding.share-usage.view :as onboarding.share-usage]
|
||||
[status-im.contexts.onboarding.identifiers.view :as identifiers]
|
||||
[status-im.contexts.onboarding.intro.view :as intro]
|
||||
[status-im.contexts.onboarding.preparing-status.view :as preparing-status]
|
||||
|
@ -726,16 +727,6 @@
|
|||
:modalPresentationStyle :overCurrentContext}
|
||||
:component create-or-sync-profile/sync-or-recover-profile})
|
||||
|
||||
(def onboarding-create-profile
|
||||
{:name :screen/onboarding.create-profile
|
||||
:metrics {:track? true
|
||||
:alias-id :onboarding.create-profile-info}
|
||||
:options {:theme :dark
|
||||
:layout options/onboarding-transparent-layout
|
||||
:animations transitions/push-animations-for-transparent-background
|
||||
:popGesture false}
|
||||
:component create-profile/create-profile})
|
||||
|
||||
(def onboarding-create-profile-password
|
||||
{:name :screen/onboarding.create-profile-password
|
||||
:metrics {:track? true
|
||||
|
@ -761,6 +752,25 @@
|
|||
:popStackOnPress false}}
|
||||
:component enable-biometrics/view})
|
||||
|
||||
(def onboarding-create-profile
|
||||
{:name :screen/onboarding.create-profile
|
||||
:metrics {:track? true
|
||||
:alias-id :onboarding.create-profile-info}
|
||||
:options {:theme :dark
|
||||
:layout options/onboarding-transparent-layout
|
||||
:animations transitions/push-animations-for-transparent-background
|
||||
:popGesture false}
|
||||
:component create-profile/create-profile})
|
||||
|
||||
(def onboarding-share-usage
|
||||
{:name :screen/onboarding.share-usage
|
||||
:metrics {:track? true}
|
||||
:options {:theme :dark
|
||||
:layout options/onboarding-transparent-layout
|
||||
:animations transitions/push-animations-for-transparent-background
|
||||
:popGesture false}
|
||||
:component onboarding.share-usage/view})
|
||||
|
||||
(def onboarding-preparing-status
|
||||
{:name :screen/onboarding.preparing-status
|
||||
:metrics {:track? true}
|
||||
|
@ -865,6 +875,7 @@
|
|||
onboarding-entering-seed-phrase
|
||||
onboarding-enable-notifications
|
||||
onboarding-identifiers
|
||||
onboarding-share-usage
|
||||
onboarding-sign-in-intro
|
||||
onboarding-sign-in
|
||||
onboarding-syncing-progress
|
||||
|
|
Loading…
Reference in New Issue