Skip to content

Commit 21238ec

Browse files
committed
New users TOS opt in fixes #12206
1 parent 813a3f5 commit 21238ec

File tree

3 files changed

+26
-25
lines changed

3 files changed

+26
-25
lines changed

src/status_im/ui/screens/onboarding/intro/styles.cljs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,3 @@
4141
(def wizard-title
4242
{:margin-bottom 16
4343
:text-align :center})
44-
45-
(def buttons-container
46-
{:align-items :center
47-
:padding-horizontal 32})
48-
49-
(def bottom-button
50-
{:padding-horizontal 24
51-
:justify-content :center
52-
:align-items :center
53-
:flex-direction :row})
54-
55-
(def welcome-text-bottom-note
56-
{:typography :caption
57-
:color colors/gray
58-
:text-align :center})

src/status_im/ui/screens/onboarding/intro/views.cljs

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
(ns status-im.ui.screens.onboarding.intro.views
22
(:require [quo.animated :as animated]
3+
[quo.react-native :as rn]
34
[status-im.ui.screens.onboarding.intro.styles :as styles]
45
[status-im.ui.components.react :as react]
56
[reagent.core :as reagent]
@@ -133,6 +134,8 @@
133134
[dots-selector {:progress progress
134135
:n (count slides)}]])))
135136

137+
(defonce tos-accepted (reagent/atom false))
138+
136139
(defn intro []
137140
[react/view {:style styles/intro-view}
138141
[carousel [{:image (resources/get-theme-image :chat)
@@ -145,13 +148,25 @@
145148
:title :intro-title3
146149
:text :intro-text3}]
147150
@(re-frame/subscribe [:dimensions/window-width])]
148-
[react/view styles/buttons-container
149-
[react/view {:style (assoc styles/bottom-button :margin-bottom 16)}
150-
[quo/button {:on-press #(re-frame/dispatch [:init-root :onboarding])}
151+
[react/view {:style {:align-items :center}}
152+
[react/view {:flex-direction :row
153+
:justify-content :space-between
154+
:margin-top 36
155+
:margin-bottom 24}
156+
[quo/checkbox {:value @tos-accepted
157+
:on-change #(swap! tos-accepted not)}]
158+
[rn/touchable-opacity {:on-press #(swap! tos-accepted not)}
159+
[react/nested-text {:style {:margin-left 12}}
160+
(i18n/label :t/accept-status-tos-prefix)
161+
[{:style {:color colors/blue}
162+
:on-press #(re-frame/dispatch [:open-modal :terms-of-service])}
163+
" "
164+
(i18n/label :t/terms-of-service)]]]]
165+
[react/view {:style {:margin-bottom 24}}
166+
[quo/button {:disabled (not @tos-accepted)
167+
:on-press #(re-frame/dispatch [:init-root :onboarding])}
151168
(i18n/label :t/get-started)]]
152-
[react/nested-text
153-
{:style styles/welcome-text-bottom-note}
154-
(i18n/label :t/intro-privacy-policy-note1)
155-
[{:style (assoc styles/welcome-text-bottom-note :color colors/blue)
156-
:on-press #(re-frame/dispatch [:open-modal :privacy-policy])}
157-
(i18n/label :t/intro-privacy-policy-note2)]]]])
169+
[react/text
170+
{:style {:color colors/blue}
171+
:on-press #(re-frame/dispatch [:open-modal :privacy-policy])}
172+
(i18n/label :t/privacy-policy)]]])

translations/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,5 +1578,6 @@
15781578
"new-password": "New password",
15791579
"confirm-new-password": "Confirm new password",
15801580
"password-mismatch": "New password and confirmation does not match",
1581-
"terms-of-service": "Terms of service"
1581+
"terms-of-service": "Terms of service",
1582+
"accept-status-tos-prefix": "I accept Status"
15821583
}

0 commit comments

Comments
 (0)