File tree Expand file tree Collapse file tree 19 files changed +100
-47
lines changed
quo/components/drawers/documentation_drawers
wallet/add_account/create_account/new_keypair/confirm_backup Expand file tree Collapse file tree 19 files changed +100
-47
lines changed Original file line number Diff line number Diff line change 1313
1414(def content
1515 {:align-items :flex-start
16- :margin-top 8
1716 :margin-bottom (+ (safe-area/get-bottom ) 12 )})
1817
1918(defn title
2019 [theme]
21- {:color (colors/theme-colors colors/neutral-100
22- colors/white
23- theme)})
20+ {:color (colors/theme-colors colors/neutral-100
21+ colors/white
22+ theme)
23+ :margin-bottom 8 })
Original file line number Diff line number Diff line change 2424 :always-bounce-vertical false
2525 :content-inset-adjustment-behavior :never }
2626 [rn/view {:style style/container}
27- [text/text
28- {:size :heading-2
29- :accessibility-label :documentation-drawer-title
30- :style (style/title theme)
31- :weight :semi-bold }
32- title]
27+ (when title
28+ [text/text
29+ {:size :heading-2
30+ :accessibility-label :documentation-drawer-title
31+ :style (style/title theme)
32+ :weight :semi-bold }
33+ title])
3334 [rn/view {:style style/content :accessibility-label :documentation-drawer-content }
3435 content
3536 (when show-button?
Original file line number Diff line number Diff line change 2828 (fn [_]
2929 {:fx [[:dispatch
3030 [:keycard/connect
31- {:on-error
31+ {:theme :dark
32+ :on-error
3233 (fn [error]
3334 (if (= error :keycard/error.keycard-blank )
3435 (rf/dispatch [:keycard/backup.generate-and-load-key ])
4849 (fn [_]
4950 {:fx [[:dispatch
5051 [:keycard/connect
51- {:on-error
52+ {:theme :dark
53+ :on-error
5254 (fn [error]
5355 (if (= error :keycard/error.keycard-blank )
5456 (do
7375 [pin]
7476 (rf/dispatch
7577 [:keycard/connect
76- {:on-error
78+ {:theme :dark
79+ :on-error
7780 (fn [error]
7881 (if (= error :keycard/error.keycard-blank )
7982 (rf/dispatch
8992 [pin]
9093 (rf/dispatch
9194 [:keycard/connect
92- {:on-error
95+ {:theme :dark
96+ :on-error
9397 (fn [error]
9498 (if (= error :keycard/error.keycard-blank )
9599 (rf/dispatch
Original file line number Diff line number Diff line change 6868 unmasked-new-pin (security/safe-unmask-data new-pin)]
6969 {:fx [[:dispatch
7070 [:keycard/connect
71- {:key-uid (get-in db [:profile/profile :key-uid ])
71+ {:theme :dark
72+ :key-uid (get-in db [:profile/profile :key-uid ])
7273 :on-success #(verify-pin-and-continue unmasked-current-pin unmasked-new-pin)}]]]})))
Original file line number Diff line number Diff line change 77 {:fx [[:dispatch
88 [:keycard/connect
99 {:key-uid (get-in db [:profile/profile :key-uid ])
10+ :theme :dark
1011 :on-success
1112 (fn []
1213 (rf/dispatch [:keycard/disconnect ])
Original file line number Diff line number Diff line change 3636 :right-side [{:icon-name :i/info
3737 :on-press #(rf/dispatch [:show-bottom-sheet
3838 {:content keycard-documentation
39+ :theme :dark
3940 :shell? true }])}]}]
4041 [quo/page-top
4142 {:title (i18n/label :t/check-keycard )
Original file line number Diff line number Diff line change 77 (fn [_]
88 {:fx [[:dispatch
99 [:keycard/connect
10- {:on-error
10+ {:theme :dark
11+ :on-error
1112 (fn [error]
1213 (if (= error :keycard/error.keycard-blank )
1314 (do
1819(defn- backup-recovery-phrase-success
1920 [masked-seed-phrase]
2021 (rf/dispatch [:navigate-back ])
21- (rf/dispatch [:open-modal :screen/confirm-backup
22+ (rf/dispatch [:open-modal :screen/confirm-backup-dark
2223 {:masked-seed-phrase masked-seed-phrase
24+ :theme :dark
25+ :shell? true
2326 :on-try-again #(rf/dispatch [:open-modal :screen/backup-recovery-phrase-dark
2427 {:on-success backup-recovery-phrase-success
2528 :masked-seed-phrase (->> masked-seed-phrase
8184 (fn [_]
8285 {:fx [[:dispatch
8386 [:keycard/connect
84- {:on-error #(rf/dispatch [:keycard/create.on-application-info-error %])}]]]}))
87+ {:theme :dark
88+ :on-error #(rf/dispatch [:keycard/create.on-application-info-error %])}]]]}))
8589
8690(defn get-application-info-and-continue
8791 []
Original file line number Diff line number Diff line change 22 (:require [quo.core :as quo]
33 [react-native.core :as rn]
44 [status-im.common.events-helper :as events-helper]
5- [status-im.common.not-implemented :as not-implemented]
65 [status-im.common.resources :as resources]
7- [status-im.config :as config]
86 [status-im.constants :as constants]
97 [status-im.contexts.keycard.common.view :as common.view]
108 [utils.i18n :as i18n]
4038 [rn/view {:style {:flex 1 }}]
4139 [common.view/tips]])
4240
41+ (defn- ready-to-add-documentation
42+ []
43+ [quo/documentation-drawers
44+ {:shell? true }
45+ [quo/text {:size :paragraph-2 }
46+ (i18n/label :t/ready-add-keypair-keycard-documentation )]])
47+
4348(defn ready-to-add
4449 []
4550 [:<>
4651 [quo/page-nav
4752 {:icon-name :i/close
4853 :on-press events-helper/navigate-back
49- :right-side [(when config/show-not-implemented-features?
50- {:icon-name :i/info
51- :on-press not-implemented/alert})]}]
54+ :right-side [{:icon-name :i/info
55+ :on-press #(rf/dispatch [:show-bottom-sheet
56+ {:content ready-to-add-documentation
57+ :theme :dark
58+ :shell? true }])}]}]
5259 [quo/page-top
5360 {:title (i18n/label :t/ready-add-keypair-keycard )
5461 :description :text
Original file line number Diff line number Diff line change 6060 :description-props {:text (i18n/label :t/remove-keycard-content )}
6161 :on-press (fn []
6262 (rf/dispatch [:show-bottom-sheet
63- {:content factory-reset/sheet}]))}])]]))
63+ {:theme :dark
64+ :shell? true
65+ :content factory-reset/sheet}]))}])]]))
Original file line number Diff line number Diff line change 9090 (fn [_ [{:keys [pin derivation-path key-uid account-preferences]}]]
9191 {:fx [[:dispatch
9292 [:keycard/connect
93- {:key-uid key-uid
93+ {:theme :dark
94+ :key-uid key-uid
9495 :on-success
9596 (fn []
9697 (rf/dispatch
160161 :keycard/error.not-keycard ]))))}}))
161162
162163(rf/reg-event-fx :keycard/connect
163- (fn [{:keys [db]} [{:keys [key-uid on-success on-error on-connect-event-vector]}]]
164+ (fn [{:keys [db]} [{:keys [key-uid on-success on-error on-connect-event-vector theme ]}]]
164165 (let [event-vector
165166 (or on-connect-event-vector
166167 [:keycard/get-application-info
170171 {:db (assoc-in db [:keycard :on-card-connected-event-vector ] event-vector)
171172 :fx [[:dispatch
172173 [:keycard/show-connection-sheet
173- {:on-cancel-event-vector [:keycard/cancel-connection ]}]]
174+ {:on-cancel-event-vector [:keycard/cancel-connection ]
175+ :theme theme}]]
174176 (when (get-in db [:keycard :card-connected? ])
175177 [:dispatch event-vector])]})))
You can’t perform that action at this time.
0 commit comments