File tree 5 files changed +24
-41
lines changed
quo/components/dividers/strength_divider
status_im/contexts/onboarding/create_password
5 files changed +24
-41
lines changed Original file line number Diff line number Diff line change 3
3
(def container
4
4
{:height 40
5
5
:flex-direction :row
6
- :padding-horizontal 20
6
+ :padding-horizontal 16
7
7
:align-items :center })
8
8
9
9
(defn text
Original file line number Diff line number Diff line change 30
30
31
31
(defn circular-progress
32
32
[{:keys [color percentage]}]
33
- (let [strength-indicator-radius 6 .5
33
+ (let [strength-indicator-radius 7 .5
34
34
strength-indicator-circumference (* 2 Math/PI strength-indicator-radius)]
35
35
[svg/svg
36
36
{:view-box " 0 0 16 16"
63
63
:alert [icon/icon :i/alert
64
64
{:color color
65
65
:size 16 }]
66
- [circular-progress {:color color :percentage percentage}])))
66
+ [rn/view
67
+ {:padding-left 4
68
+ :padding-right 2 }
69
+ [circular-progress {:color color :percentage percentage}]])))
67
70
68
71
(defn view
69
72
" Options
Original file line number Diff line number Diff line change 8
8
(def heading-subtitle {:color colors/white})
9
9
(def heading-title (assoc heading-subtitle :margin-bottom 8 ))
10
10
11
- (def label-container
12
- {:margin-top 8
13
- :flex-direction :row
14
- :align-items :center
15
- :height 16 })
16
-
17
- (def label-icon
18
- {:width 16
19
- :height 18
20
- :margin-right 4 })
21
-
22
- (defn label-icon-color
23
- [status]
24
- (get {:neutral colors/neutral-40
25
- :success colors/success-60
26
- :danger colors/danger-60}
27
- status))
28
-
29
- (defn label-color
30
- [status]
31
- (let [colors {:neutral colors/white-opa-70
32
- :success colors/success-60
33
- :danger colors/danger-60}]
34
- {:color (get colors status)}))
11
+ (def info-message
12
+ {:margin-top 8 })
35
13
36
14
(def space-between-inputs {:height 16 })
37
15
Original file line number Diff line number Diff line change 2
2
(:require
3
3
[oops.core :refer [ocall]]
4
4
[quo.core :as quo]
5
+ [quo.foundations.colors :as colors]
5
6
[react-native.core :as rn]
6
7
[react-native.safe-area :as safe-area]
7
8
[reagent.core :as reagent]
33
34
(dissoc :hint )
34
35
(assoc :type :password
35
36
:blur? true ))]
36
- [rn/view {:style style/label-container }
37
+ [rn/view {:style style/info-message }
37
38
(when shown
38
- [:<>
39
- [quo/icon (if (= status :success ) :i/check-circle :i/info )
40
- {:container-style style/label-icon
41
- :color (style/label-icon-color status)
42
- :size 16 }]
43
- [quo/text
44
- {:style (style/label-color status)
45
- :size :paragraph-2 }
46
- text]])]])
39
+ [quo/info-message
40
+ {:type status
41
+ :size :default
42
+ :icon (if (= status :success ) :i/positive-state :i/info )
43
+ :text-color (when (= status :default )
44
+ colors/white-70-blur)
45
+ :icon-color (when (= status :default )
46
+ colors/white-70-blur)
47
+ :style {}}
48
+ text])]])
47
49
48
50
(defn password-inputs
49
51
[{:keys [passwords-match? on-change-password on-change-repeat-password on-input-focus
50
52
password-long-enough? empty-password? show-password-validation?
51
53
on-blur-repeat-password]}]
52
- (let [hint-1-status (if password-long-enough? :success :neutral )
53
- hint-2-status (if passwords-match? :success :danger )
54
+ (let [hint-1-status (if password-long-enough? :success :default )
55
+ hint-2-status (if passwords-match? :success :error )
54
56
hint-2-text (if passwords-match?
55
57
(i18n/label :t/password-creation-match )
56
58
(i18n/label :t/password-creation-dont-match ))
Original file line number Diff line number Diff line change 1138
1138
"password-creation-hint" : " Minimum 10 characters" ,
1139
1139
"password-creation-placeholder-1" : " Type password" ,
1140
1140
"password-creation-placeholder-2" : " Repeat password" ,
1141
- "password-creation-tips-title" : " Tips to improve password " ,
1141
+ "password-creation-tips-title" : " Tips to improve" ,
1142
1142
"password-creation-tips-1" : " Lower case" ,
1143
- "password-creation-tips-2" : " Upper- case" ,
1143
+ "password-creation-tips-2" : " Upper case" ,
1144
1144
"password-creation-tips-3" : " Numbers" ,
1145
1145
"password-creation-tips-4" : " Symbols" ,
1146
1146
"password-creation-disclaimer" : " I understand my password can't be recovered" ,
You can’t perform that action at this time.
0 commit comments