Skip to content

Commit 8c91fbd

Browse files
authored
fix Keycard UI issues (#22075)
1 parent 93e0c1f commit 8c91fbd

File tree

6 files changed

+18
-15
lines changed

6 files changed

+18
-15
lines changed

src/quo/components/buttons/predictive_keyboard/view.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858

5959
:error
6060
[info-message/view
61-
{:icon :i/info
61+
{:icon :i/alert
6262
:size :default
6363
:status :error}
6464
text]

src/quo/components/onboarding/small_option_card/view.cljs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
subtitle]]])
3636

3737
(defn- main-variant
38-
[{:keys [title subtitle button-label image max-height accessibility-label on-press button-type]}]
38+
[{:keys [title subtitle button-label image max-height accessibility-label on-press button-props]}]
3939
[rn/view {:style style/main-variant}
4040
[rn/view {:style style/main-variant-text-container}
4141
[text/text
@@ -56,18 +56,20 @@
5656
:resize-mode :contain
5757
:source image}]
5858
[button/button
59-
{:on-press on-press
60-
:accessibility-label accessibility-label
61-
:type (or button-type :grey)
62-
:size 40
63-
:container-style style/main-button
64-
:theme :dark
65-
:background :blur}
59+
(merge
60+
{:on-press on-press
61+
:accessibility-label accessibility-label
62+
:type :grey
63+
:size 40
64+
:container-style style/main-button
65+
:theme :dark
66+
:background :blur}
67+
button-props)
6668
button-label]])
6769

6870
(defn small-option-card
6971
[{:keys [variant title subtitle button-label image max-height on-press accessibility-label
70-
button-type container-style]
72+
button-props container-style]
7173
:or {variant :main accessibility-label :small-option-card}}]
7274
(let [main-variant? (= variant :main)
7375
card-component (if main-variant? main-variant icon-variant)
@@ -84,4 +86,4 @@
8486
:accessibility-label accessibility-label
8587
:image image
8688
:max-height max-height
87-
:button-type button-type}]]))
89+
:button-props button-props}]]))

src/status_im/contexts/keycard/create/view.cljs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
:title (i18n/label :t/check-keycard)
2525
:subtitle (i18n/label :t/see-keycard-ready)
2626
:button-label (i18n/label :t/scan-keycard)
27+
:button-props {:type :primary :icon-left :i/keycard}
2728
:accessibility-label :get-keycard
2829
:image (resources/get-image :check-your-keycard)
2930
:on-press #(rf/dispatch [:keycard/create.check-empty-card])}]

src/status_im/contexts/keycard/empty/view.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
:accessibility-label :create-new-profile-keycard
2626
:container-style {:margin-horizontal 20 :margin-top 8}
2727
:image (resources/get-image :keycard-buy)
28-
:button-type :primary
28+
:button-props {:type :primary}
2929
:on-press #(rf/dispatch [:keycard/create.get-phrase])}]
3030
[quo/small-option-card
3131
{:variant :icon

src/status_im/contexts/keycard/error/view.cljs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
:description (i18n/label :t/cant-store-new-keys)}
1616
:keycard/error.keycard-unpaired {:title (i18n/label :t/keycard-full)
1717
:description (i18n/label :t/pairing-slots-occupied)}
18-
:keycard/error.keycard-frozen {:title (i18n/label :t/keycard-locked)
18+
:keycard/error.keycard-frozen {:title (i18n/label :t/keycard-blocked)
1919
:description (i18n/label :t/cant-use-right-now)}
20-
:keycard/error.keycard-locked {:title (i18n/label :t/keycard-locked)
20+
:keycard/error.keycard-locked {:title (i18n/label :t/keycard-blocked)
2121
:description (i18n/label :t/cant-use-right-now)}})
2222

2323
(defn view

translations/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,7 @@
13881388
"keycard-backup-success-body": "Backup card created successfully. You can now use it with your account just like the primary card.",
13891389
"keycard-backup-success-title": "Backup successful",
13901390
"keycard-blocked": "Keycard has been blocked.\nYou need to reset card to continue using it.",
1391+
"keycard-blocked": "Keycard is blocked",
13911392
"keycard-can-use-with-new-passcode": "You can use this card with your new passcode",
13921393
"keycard-cancel-setup-text": "This will cancel keycard setup. It's highly recommended to finish the setup in order to use keycard. Do you really want to cancel?",
13931394
"keycard-cancel-setup-title": "Dangerous operation",
@@ -1417,7 +1418,6 @@
14171418
"keycard-is-frozen-factory-reset": "Reset with mnemonic",
14181419
"keycard-is-frozen-reset": "Reset with PUK",
14191420
"keycard-is-frozen-title": "Keycard is frozen",
1420-
"keycard-locked": "Keycard is locked",
14211421
"keycard-migration-failed-instruction-1": "Try logging out and logging back in with Keycard; everything might work fine.",
14221422
"keycard-migration-failed-instruction-2": "If the key pair hasn’t migrated to Keycard, remove your profile, and recover it using your recovery phrase.",
14231423
"keycard-not-empty": "Keycard is not empty",

0 commit comments

Comments
 (0)