From 6b30434ab60780f71ee20968c773625b834d4e84 Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Mon, 11 Nov 2024 16:06:05 +0530 Subject: [PATCH] Update create profile and sign in screen --- .../common/enter_seed_phrase/view.cljs | 2 +- .../create_or_sync_profile/view.cljs | 84 ++++++++++++++----- translations/en.json | 13 ++- 3 files changed, 76 insertions(+), 23 deletions(-) diff --git a/src/status_im/common/enter_seed_phrase/view.cljs b/src/status_im/common/enter_seed_phrase/view.cljs index 0de0ed64d2..e49a59e69f 100644 --- a/src/status_im/common/enter_seed_phrase/view.cljs +++ b/src/status_im/common/enter_seed_phrase/view.cljs @@ -232,5 +232,5 @@ (when-not on-success #(rf/dispatch [:onboarding/clear-navigated-to-enter-seed-phrase-from-screen]))) [screen - {:title (i18n/label :t/use-recovery-phrase) + {:title (i18n/label :t/use-seed-phrase) :on-success on-success}])) diff --git a/src/status_im/contexts/onboarding/create_or_sync_profile/view.cljs b/src/status_im/contexts/onboarding/create_or_sync_profile/view.cljs index 98432e790c..d035ef57d6 100644 --- a/src/status_im/contexts/onboarding/create_or_sync_profile/view.cljs +++ b/src/status_im/contexts/onboarding/create_or_sync_profile/view.cljs @@ -51,30 +51,76 @@ (* 2 16) ;; spacing between items 220)) ;; extra spacing (top bar) - -(defn- create-profile-option-card - [window-height] +(defn- start-fresh-main-card + [window-height on-press] [quo/small-option-card {:variant :main - :title (i18n/label :t/generate-keys) - :subtitle (i18n/label :t/generate-keys-subtitle) + :title (i18n/label :t/start-fresh) + :subtitle (i18n/label :t/start-fresh-subtitle) :button-label (i18n/label :t/lets-go) - :accessibility-label :generate-key-option-card + :accessibility-label :start-fresh-main-card :image (resources/get-image :generate-keys) :max-height (option-card-max-height window-height) - :on-press navigate-to-create-profile}]) + :on-press on-press}]) -(defn- sync-profile-option-card - [window-height] +(defn- log-in-with-seed-phrase-main-card + [window-height on-press] [quo/small-option-card {:variant :main - :title (i18n/label :t/sign-in-by-syncing) - :subtitle (i18n/label :t/if-you-have-status-on-another-device) - :button-label (i18n/label :t/scan-sync-code) - :accessibility-label :scan-sync-code-option-card + :title (i18n/label :t/log-in-with-seed-phrase) + :subtitle (i18n/label :t/log-in-with-seed-phrase-subtitle) + :button-label (i18n/label :t/enter-seed-phrase) + :accessibility-label :log-in-with-seed-phrase-main-card :image (resources/get-image :generate-keys) :max-height (option-card-max-height window-height) - :on-press show-check-before-syncing}]) + :on-press on-press}]) + +(defn- use-a-seed-phrase-icon-card + [] + [quo/small-option-card + {:variant :icon + :title (i18n/label :t/use-a-seed-phrase) + :subtitle (i18n/label :t/use-a-seed-phrase-subtitle) + :accessibility-label :use-a-seed-phrase-icon-card + :image (resources/get-image :ethereum-address) + :on-press nav-to-seed-phrase-with-cur-screen}]) + +(defn- use-an-empty-keycard-icon-card + [] + (when config/show-not-implemented-features? + [quo/small-option-card + {:variant :icon + :title (i18n/label :t/use-an-empty-keycard) + :subtitle (i18n/label :t/use-an-empty-keycard-subtitle) + :accessibility-label :use-an-empty-keycard-icon-card + :image (resources/get-image :use-keycard) + :on-press status-im.common.not-implemented/alert}])) + +(defn- use-a-seed-phrase-icon-card + [] + [quo/small-option-card + {:variant :icon + :title (i18n/label :t/use-a-seed-phrase) + :subtitle (i18n/label :t/use-a-seed-phrase-subtitle) + :accessibility-label :use-a-seed-phrase-icon-card + :image (resources/get-image :ethereum-address) + :on-press nav-to-seed-phrase-with-cur-screen}]) + +(defn- use-an-empty-keycard + [] + (when config/show-not-implemented-features? + [quo/small-option-card + {:variant :icon + :title (i18n/label :t/use-keycard) + :subtitle (i18n/label :t/use-keycard-subtitle) + :accessibility-label :use-keycard-option-card + :image (resources/get-image :use-keycard) + :on-press status-im.common.not-implemented/alert}])) + + + + + (defn sign-in-options [sign-in-type] @@ -85,14 +131,14 @@ create-profile?) [create-profile?]) main-option-card (if create-profile? - create-profile-option-card - sync-profile-option-card)] + [create-profile-option-card + log-in-profile-option-card)] [rn/view {:style style/options-container} [quo/text {:style style/title :size :heading-1 :weight :semi-bold} - (i18n/label (if create-profile? :t/create-profile :t/sync-or-recover-profile))] + (i18n/label (if create-profile? :t/create-profile :t/log-in))] [main-option-card window-height] [rn/view {:style style/subtitle-container} [quo/text @@ -103,8 +149,8 @@ [rn/view [quo/small-option-card {:variant :icon - :title (i18n/label :t/use-recovery-phrase) - :subtitle (i18n/label :t/use-recovery-phrase-subtitle) + :title (i18n/label :t/use-a-seed-phrase) + :subtitle (i18n/label :t/use-a-seed-phrase-subtitle) :accessibility-label :use-recovery-phrase-option-card :image (resources/get-image :ethereum-address) :on-press nav-to-seed-phrase-with-cur-screen}] diff --git a/translations/en.json b/translations/en.json index 1ea91b0e91..8a7e0ca2ab 100644 --- a/translations/en.json +++ b/translations/en.json @@ -978,6 +978,7 @@ "enter-puk-code-description": "6-digit passcode has been blocked.\n Please enter PUK code to unblock passcode.", "enter-recipient-address-or-username": "Enter address or username of the recipient", "enter-recovery-phrase": "Enter recovery phrase", + "enter-seed-phrase": "Enter seed phrase", "enter-sync-code": "Enter sync code", "enter-url": "Enter URL", "enter-user-pk": "Enter user public key", @@ -1079,7 +1080,6 @@ "generate-account": "Generate keys", "generate-an-account": "Generate an account", "generate-keys": "Generate keys", - "generate-keys-subtitle": "Create your new self-sovereign identity", "generate-new-key": "Generate keys", "generate-new-keypair": "Generate new key pair", "generate-scan-sync-code": "Generate Scan Sync Code", @@ -1460,6 +1460,8 @@ "local-pairing-experimental-mode": "Local Pairing Mode (alpha)", "lock-app-with": "Lock app with", "log-in": "Log in", + "log-in-with-seed-phrase": "Log in with seed phrase", + "log-in-with-seed-phrase-subtitle": "If you have your Status seed phrase", "log-level": "Log level", "log-level-settings": "Log level settings", "log-out-remove": "Log out & Remove profile", @@ -2402,6 +2404,8 @@ "spending-cap-set": "Spending cap set: {{token-amount}} {{token-symbol}} for {{provider-name}} in {{account-name}}", "start-chat": "Start chat", "start-conversation": "Start conversation", + "start-fresh": "Start fresh", + "start-fresh-subtitle": "Create a new profile from scratch", "start-group-chat": "Start group chat", "start-new-chat": "Start new chat", "start-using-status": "Start using Status", @@ -2685,13 +2689,16 @@ "use-as-profile-picture": "Use as profile picture", "use-biometrics": "Use biometrics to fill in your password", "use-keycard": "Use Keycard", + "use-an-empty-keycard": "Use an empty Keycard", + "use-an-empty-keycard-subtitle": "Store your new profile keys on Keycard", "use-keycard-for-status": "From now on, use this Keycard to login to Status and transact with derived accounts on all synced devices. To start using it, logout and log back in with this Keycard.", "use-keycard-instead-password": "To use Keycard instead of password", "use-keycard-login-sign": "Use this Keycard to login and sign transactions", "use-keycard-subtitle": "Keys will be stored on your Keycard", "use-photo": "Use Photo", - "use-recovery-phrase": "Use recovery phrase", - "use-recovery-phrase-subtitle": "If you already have an Ethereum address", + "use-seed-phrase": "Use seed phrase", + "use-a-seed-phrase": "Use a seed phrase", + "use-a-seed-phrase-subtitle": "If you already have an Ethereum wallet", "use-the-multichain-wallet": "Use the leading multi-chain self-custodial wallet", "use-valid-contact-code": "Please enter or scan a valid chat key or username", "user-blocked": "{{username}} blocked",