fix keycard sign up ui issues (#21938)

This commit is contained in:
Parvesh Monu 2025-01-20 17:22:13 +05:30 committed by GitHub
parent be1347346c
commit 70a5ed255f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 70 additions and 48 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

View File

@ -35,7 +35,7 @@
subtitle]]])
(defn- main-variant
[{:keys [title subtitle button-label image max-height accessibility-label on-press]}]
[{:keys [title subtitle button-label image max-height accessibility-label on-press button-type]}]
[rn/view {:style style/main-variant}
[rn/view {:style style/main-variant-text-container}
[text/text
@ -58,7 +58,7 @@
[button/button
{:on-press on-press
:accessibility-label accessibility-label
:type :grey
:type (or button-type :grey)
:size 40
:container-style style/main-button
:theme :dark
@ -66,7 +66,7 @@
button-label]])
(defn small-option-card
[{:keys [variant title subtitle button-label image max-height on-press accessibility-label]
[{:keys [variant title subtitle button-label image max-height on-press accessibility-label button-type]
:or {variant :main accessibility-label :small-option-card}}]
(let [main-variant? (= variant :main)
card-component (if main-variant? main-variant icon-variant)
@ -82,4 +82,5 @@
:on-press on-press
:accessibility-label accessibility-label
:image image
:max-height max-height}]]))
:max-height max-height
:button-type button-type}]]))

View File

@ -17,7 +17,7 @@
:music (js/require "../resources/images/ui2/music.png")
:podcasts (js/require "../resources/images/ui2/podcasts.png")
:generate-keys (js/require "../resources/images/ui2/generate-keys.png")
:generate-keys1 (js/require "../resources/images/ui2/generating-keys-1.png")
:add-key-to-keycard (js/require "../resources/images/ui2/add-key-to-keycard.png")
:ethereum-address (js/require "../resources/images/ui2/ethereum-address.png")
:use-keycard (js/require "../resources/images/ui2/keycard.png")
:use-recovery-phrase (js/require "../resources/images/ui2/recovery-phrase.png")

View File

@ -2,7 +2,9 @@
(:require [quo.core :as quo]
[react-native.core :as rn]
[status-im.common.events-helper :as events-helper]
[status-im.common.not-implemented :as not-implemented]
[status-im.common.resources :as resources]
[status-im.config :as config]
[status-im.constants :as constants]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
@ -43,20 +45,23 @@
[]
[:<>
[quo/page-nav
{:icon-name :i/arrow-left
:on-press events-helper/navigate-back}]
{:icon-name :i/close
:on-press events-helper/navigate-back
:right-side [(when config/show-not-implemented-features?
{:icon-name :i/info
:on-press not-implemented/alert})]}]
[quo/page-top
{:title (i18n/label :t/ready-add-keypair-keycard)
:description :text
:description-text ""}]
[rn/view {:style {:flex 1 :align-items :center :justify-content :center}}
[rn/image
{:resize-mode :contain
:source (resources/get-image :generate-keys1)}]]
[rn/image
{:resize-mode :contain
:style {:flex 1 :align-self :center :margin-vertical 37}
:source (resources/get-image :add-key-to-keycard)}]
[quo/divider-label (i18n/label :t/tips-scan-keycard)]
[quo/markdown-list {:description (i18n/label :t/remove-phone-case)}]
[quo/markdown-list {:description (i18n/label :t/keep-card-steady)}]
[quo/bottom-actions
{:actions :one-action
:button-one-label (i18n/label :t/ready-to-scan)
:button-one-label (i18n/label :t/scan-keycard)
:button-one-props {:on-press #(rf/dispatch [:keycard/create.start])}}]])

View File

@ -25,6 +25,7 @@
:button-label (i18n/label :t/lets-go)
:accessibility-label :create-new-profile-keycard
:image (resources/get-image :keycard-buy)
:button-type :primary
:on-press #(rf/dispatch [:keycard/create.get-phrase])}]]
[quo/information-box
{:type :default

View File

@ -906,25 +906,29 @@
(def keycard-screens
[{:name :screen/keycard.check
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}}
:options {:theme :dark
:modalPresentationStyle :fullScreen
:insets {:top? true :bottom? true}}
:component keycard.check/view}
{:name :screen/keycard.empty
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}}
:options {:theme :dark
:modalPresentationStyle :fullScreen
:insets {:top? true :bottom? true}}
:component keycard.empty/view}
{:name :screen/keycard.empty-create
:metrics {:track? true}
:options {:insets {:top? true :bottom? true}}
:options {:insets {:top? true :bottom? true}
:modalPresentationStyle :fullScreen}
:component keycard.empty/create}
{:name :screen/keycard.error
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}}
:options {:theme :dark
:modalPresentationStyle :fullScreen
:insets {:top? true :bottom? true}}
:component keycard.error/view}
{:name :screen/keycard.different-card
@ -936,75 +940,86 @@
{:name :screen/keycard.not-keycard
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}}
:options {:theme :dark
:modalPresentationStyle :fullScreen
:insets {:top? true :bottom? true}}
:component keycard.not-keycard/view}
{:name :screen/keycard.authorise
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}}
:options {:theme :dark
:modalPresentationStyle :fullScreen
:insets {:top? true :bottom? true}}
:component keycard.authorise/view}
{:name :screen/keycard.migrate
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}}
:options {:theme :dark
:modalPresentationStyle :fullScreen
:insets {:top? true :bottom? true}}
:component keycard.migrate/view}
{:name :screen/keycard.re-encrypting
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}
:popGesture false
:hardwareBackButton {:dismissModalOnPress false
:popStackOnPress false}}
:options {:theme :dark
:insets {:top? true :bottom? true}
:popGesture false
:modalPresentationStyle :fullScreen
:hardwareBackButton {:dismissModalOnPress false
:popStackOnPress false}}
:component keycard.re-encrypting/view}
{:name :screen/keycard.migrate.success
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}
:popGesture false
:hardwareBackButton {:dismissModalOnPress false
:popStackOnPress false}}
:options {:theme :dark
:insets {:top? true :bottom? true}
:popGesture false
:modalPresentationStyle :fullScreen
:hardwareBackButton {:dismissModalOnPress false
:popStackOnPress false}}
:component keycard.migrate.success/view}
{:name :screen/keycard.migrate.fail
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}
:popGesture false
:hardwareBackButton {:dismissModalOnPress false
:popStackOnPress false}}
:options {:theme :dark
:insets {:top? true :bottom? true}
:popGesture false
:modalPresentationStyle :fullScreen
:hardwareBackButton {:dismissModalOnPress false
:popStackOnPress false}}
:component keycard.migrate.fail/view}
{:name :screen/keycard.pin.create
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}}
:options {:theme :dark
:modalPresentationStyle :fullScreen
:insets {:top? true :bottom? true}}
:component keycard.pin.create/view}
{:name :screen/keycard.pin.enter
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}}
:options {:theme :dark
:modalPresentationStyle :fullScreen
:insets {:top? true :bottom? true}}
:component keycard.pin.enter/view}
{:name :screen/keycard.profile-keys
:metrics {:track? true}
:options {:theme :dark
:insets {:top? true :bottom? true}}
:options {:theme :dark
:modalPresentationStyle :fullScreen
:insets {:top? true :bottom? true}}
:component keycard.migrate.profile-keys/view}
{:name :screen/keycard.create-profile
:metrics {:track? true}
:options {:insets {:top? true :bottom? true}}
:options {:insets {:top? true :bottom? true}
:modalPresentationStyle :fullScreen}
:component keycard.create/view}
{:name :screen/keycard.create.ready-to-add
:metrics {:track? true}
:options {:insets {:top? true :bottom? true}}
:options {:insets {:top? true :bottom? true}
:modalPresentationStyle :fullScreen}
:component keycard.create/ready-to-add}
{:name :screen/keycard.factory-reset.success