Skip to content

Commit 81d4799

Browse files
SilentCruzeralwx
authored andcommitted
[#15518]Show disclaimer during password creation (#15650)
1 parent 27106ad commit 81d4799

File tree

1 file changed

+10
-12
lines changed
  • src/status_im2/contexts/onboarding/create_password

1 file changed

+10
-12
lines changed

src/status_im2/contexts/onboarding/create_password/view.cljs

+10-12
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
:shown true}
6666
:placeholder (i18n/label :t/password-creation-placeholder-1)
6767
:on-change-text on-change-password
68-
:on-focus #(on-input-focus :password)}]
68+
:on-focus on-input-focus}]
6969
[rn/view {:style style/space-between-inputs}]
7070
[password-with-hint
7171
{:hint {:text hint-2-text
@@ -75,7 +75,7 @@
7575
:error? error?
7676
:placeholder (i18n/label :t/password-creation-placeholder-2)
7777
:on-change-text on-change-repeat-password
78-
:on-focus #(on-input-focus :repeat-password)
78+
:on-focus on-input-focus
7979
:on-blur on-blur-repeat-password}]]))
8080

8181
(def strength-status
@@ -146,9 +146,9 @@
146146
:passwords-match? same-passwords?
147147
:empty-password? empty-password?
148148
:show-password-validation? @show-password-validation?
149-
:on-input-focus (fn [input-id]
149+
:on-input-focus (fn []
150150
(scroll-to-end-fn)
151-
(reset! focused-input input-id))
151+
(reset! focused-input :password))
152152
:on-change-password (fn [new-value]
153153
(reset! password new-value)
154154
(when (same-password-length?)
@@ -162,19 +162,17 @@
162162
(reset! show-password-validation? true))}]]
163163

164164
[rn/view {:style style/bottom-part}
165+
[rn/view {:style style/disclaimer-container}
166+
[quo/disclaimer
167+
{:on-change #(reset! accepts-disclaimer? %)
168+
:checked? @accepts-disclaimer?}
169+
(i18n/label :t/password-creation-disclaimer)]]
170+
165171
(when (= @focused-input :password)
166172
[help
167173
{:validations validations
168174
:password-strength password-strength}])
169175

170-
(when (= @focused-input :repeat-password)
171-
[rn/view {:style style/disclaimer-container}
172-
[quo/disclaimer
173-
{:blur? true
174-
:checked? @accepts-disclaimer?
175-
:on-change #(reset! accepts-disclaimer? %)}
176-
(i18n/label :t/password-creation-disclaimer)]])
177-
178176
[rn/view {:style style/button-container}
179177
[quo/button
180178
{:disabled (not meet-requirements?)

0 commit comments

Comments
 (0)