mirror of
https://github.com/status-im/status-react.git
synced 2025-02-27 10:00:49 +00:00
feature: require manual acceptance of terms-of-use and privacy-statement during onboarding
This commit is contained in:
parent
87374e5c75
commit
7dc3720c05
@ -7,9 +7,14 @@
|
|||||||
:justify-content :flex-end})
|
:justify-content :flex-end})
|
||||||
|
|
||||||
(def text-container
|
(def text-container
|
||||||
{:text-align :center
|
{:flex 1
|
||||||
:margin-top 4
|
:flex-wrap :wrap
|
||||||
:flex-wrap :wrap})
|
:text-align :center})
|
||||||
|
|
||||||
|
(def terms-privacy-container
|
||||||
|
{:gap 8
|
||||||
|
:padding-horizontal 20
|
||||||
|
:padding-vertical 8})
|
||||||
|
|
||||||
(def plain-text
|
(def plain-text
|
||||||
{:color colors/white-opa-70})
|
{:color colors/white-opa-70})
|
||||||
|
@ -6,32 +6,57 @@
|
|||||||
[status-im.contexts.onboarding.common.background.view :as background]
|
[status-im.contexts.onboarding.common.background.view :as background]
|
||||||
[status-im.contexts.onboarding.common.overlay.view :as overlay]
|
[status-im.contexts.onboarding.common.overlay.view :as overlay]
|
||||||
[status-im.contexts.onboarding.intro.style :as style]
|
[status-im.contexts.onboarding.intro.style :as style]
|
||||||
|
[status-im.contexts.onboarding.privacy.view :as privacy]
|
||||||
[status-im.contexts.onboarding.terms.view :as terms]
|
[status-im.contexts.onboarding.terms.view :as terms]
|
||||||
[utils.i18n :as i18n]
|
[utils.i18n :as i18n]
|
||||||
[utils.re-frame :as rf]))
|
[utils.re-frame :as rf]))
|
||||||
|
|
||||||
(defn view
|
(defn view
|
||||||
[]
|
[]
|
||||||
|
(let [[terms-accepted? set-terms-accepted?] (rn/use-state false)]
|
||||||
[rn/view {:style style/page-container}
|
[rn/view {:style style/page-container}
|
||||||
[background/view false]
|
[background/view false]
|
||||||
[quo/bottom-actions
|
[quo/bottom-actions
|
||||||
{:container-style (style/bottom-actions-container (safe-area/get-bottom))
|
{:container-style (style/bottom-actions-container (safe-area/get-bottom))
|
||||||
:actions :two-vertical-actions
|
:actions :two-vertical-actions
|
||||||
:description :bottom
|
:description :top
|
||||||
:description-text [quo/text
|
:description-top-text [rn/view
|
||||||
|
{:style style/terms-privacy-container
|
||||||
|
:flex-direction :row}
|
||||||
|
[quo/selectors
|
||||||
|
{:type :checkbox
|
||||||
|
:checked? terms-accepted?
|
||||||
|
:on-change #(set-terms-accepted? not)}]
|
||||||
|
[rn/view {:style {:flex 1}}
|
||||||
|
[quo/text
|
||||||
{:style style/text-container
|
{:style style/text-container
|
||||||
:size :paragraph-2
|
:size :paragraph-2}
|
||||||
:weight :regular}
|
[quo/text
|
||||||
[quo/text {:style style/plain-text}
|
{:style style/plain-text
|
||||||
(i18n/label :t/by-continuing-you-accept)]
|
:size :paragraph-2}
|
||||||
|
(str (i18n/label :t/accept-status-tos-prefix) " ")]
|
||||||
[quo/text
|
[quo/text
|
||||||
{:on-press #(rf/dispatch [:show-bottom-sheet
|
{:on-press #(rf/dispatch [:show-bottom-sheet
|
||||||
{:content (fn [] [terms/terms-of-use])
|
{:content (fn [] [terms/terms-of-use])
|
||||||
:shell? true}])
|
:shell? true}])
|
||||||
:style style/highlighted-text}
|
:style style/highlighted-text
|
||||||
(i18n/label :t/terms-of-service)]]
|
:size :paragraph-2}
|
||||||
|
(i18n/label :t/terms-of-service)]
|
||||||
|
[quo/text
|
||||||
|
{:style style/plain-text
|
||||||
|
:size :paragraph-2}
|
||||||
|
" & "]
|
||||||
|
[quo/text
|
||||||
|
{:on-press #(rf/dispatch [:show-bottom-sheet
|
||||||
|
{:content (fn [] [privacy/privacy-statement])
|
||||||
|
:shell? true}])
|
||||||
|
:style style/highlighted-text
|
||||||
|
:size :paragraph-2
|
||||||
|
:weight :regular}
|
||||||
|
(i18n/label :t/intro-privacy-statement)]]]]
|
||||||
:button-one-label (i18n/label :t/sync-or-recover-profile)
|
:button-one-label (i18n/label :t/sync-or-recover-profile)
|
||||||
:button-one-props {:type :dark-grey
|
:button-one-props {:type :dark-grey
|
||||||
|
:disabled? (not terms-accepted?)
|
||||||
:accessibility-label :already-use-status-button
|
:accessibility-label :already-use-status-button
|
||||||
:on-press (fn []
|
:on-press (fn []
|
||||||
(when-let [blur-show-fn @overlay/blur-show-fn-atom]
|
(when-let [blur-show-fn @overlay/blur-show-fn-atom]
|
||||||
@ -41,10 +66,11 @@
|
|||||||
:screen/onboarding.sync-or-recover-profile]))}
|
:screen/onboarding.sync-or-recover-profile]))}
|
||||||
:button-two-label (i18n/label :t/create-profile)
|
:button-two-label (i18n/label :t/create-profile)
|
||||||
:button-two-props {:accessibility-label :new-to-status-button
|
:button-two-props {:accessibility-label :new-to-status-button
|
||||||
|
:disabled? (not terms-accepted?)
|
||||||
:on-press
|
:on-press
|
||||||
(fn []
|
(fn []
|
||||||
(when-let [blur-show-fn @overlay/blur-show-fn-atom]
|
(when-let [blur-show-fn @overlay/blur-show-fn-atom]
|
||||||
(blur-show-fn))
|
(blur-show-fn))
|
||||||
(rf/dispatch
|
(rf/dispatch
|
||||||
[:open-modal :screen/onboarding.new-to-status]))}}]
|
[:open-modal :screen/onboarding.new-to-status]))}}]
|
||||||
[overlay/view]])
|
[overlay/view]]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user