[#21420] Keycard - Auth with password (#21422)

This commit is contained in:
flexsurfer 2024-10-11 18:35:39 +02:00 committed by GitHub
parent 598617cf2b
commit fba631c044
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,35 @@
(ns status-im.contexts.keycard.authorise.view
(:require [quo.core :as quo]
[react-native.core :as rn]
[status-im.common.events-helper :as events-helper]
[status-im.common.standard-authentication.core :as standard-auth]
[utils.i18n :as i18n]
[utils.re-frame :as rf]
[utils.security.core :as security]))
(defn view
[]
(let [profile-name (rf/sub [:profile/name])
profile-picture (rf/sub [:profile/image])
customization-color (rf/sub [:profile/customization-color])]
[:<>
[quo/page-nav
{:key :header
:background :blur
:icon-name :i/close
:on-press events-helper/navigate-back}]
[quo/page-top
{:title (i18n/label :t/authorise-with-password)
:description :context-tag
:context-tag {:full-name profile-name
:profile-picture profile-picture
:customization-color customization-color}}]
[rn/view {:style {:flex 1 :padding-horizontal 20 :justify-content :space-between}}
[quo/text (i18n/label :t/migrate-key-pair-authorise)]
[standard-auth/slide-button
{:size :size-48
:container-style {}
:customization-color customization-color
:track-text (i18n/label :t/slide-to-authorise)
:on-auth-success #(println "TBD" (security/safe-unmask-data %))
:auth-button-label (i18n/label :t/confirm)}]]]))

View File

@ -26,6 +26,7 @@
[status-im.contexts.communities.actions.share-community.view :as share-community] [status-im.contexts.communities.actions.share-community.view :as share-community]
[status-im.contexts.communities.discover.view :as communities.discover] [status-im.contexts.communities.discover.view :as communities.discover]
[status-im.contexts.communities.overview.view :as communities.overview] [status-im.contexts.communities.overview.view :as communities.overview]
[status-im.contexts.keycard.authorise.view :as keycard.authorise]
[status-im.contexts.keycard.check.view :as keycard.check] [status-im.contexts.keycard.check.view :as keycard.check]
[status-im.contexts.keycard.empty.view :as keycard.empty] [status-im.contexts.keycard.empty.view :as keycard.empty]
[status-im.contexts.keycard.error.view :as keycard.error] [status-im.contexts.keycard.error.view :as keycard.error]
@ -697,7 +698,11 @@
{:name :screen/keycard.not-keycard {:name :screen/keycard.not-keycard
:options options/keycard-modal-screen-options :options options/keycard-modal-screen-options
:component keycard.not-keycard/view}] :component keycard.not-keycard/view}
{:name :screen/keycard.authorise
:options options/keycard-modal-screen-options
:component keycard.authorise/view}]
[{:name :shell [{:name :shell
:options {:theme :dark}}] :options {:theme :dark}}]

View File

@ -163,6 +163,7 @@
"audio-recorder-max-ms-reached": "Maximum recording time reached", "audio-recorder-max-ms-reached": "Maximum recording time reached",
"audio-recorder-permissions-error": "You have to give permission to send audio messages", "audio-recorder-permissions-error": "You have to give permission to send audio messages",
"aug": "Aug", "aug": "Aug",
"authorise-with-password": "Authorise with password",
"authorize": "Authorize", "authorize": "Authorize",
"available": "Available", "available": "Available",
"available-participants": { "available-participants": {
@ -1568,6 +1569,7 @@
"messages-from-contacts-only-subtitle": "Only people you added as contacts can start a new chat with you or invite you to a group", "messages-from-contacts-only-subtitle": "Only people you added as contacts can start a new chat with you or invite you to a group",
"messages-gap-warning": "Some messages might be missing", "messages-gap-warning": "Some messages might be missing",
"might-break": "Might break some ÐApps", "might-break": "Might break some ÐApps",
"migrate-key-pair-authorise": "To migrate profile key pair to Keycard you need to authorise with profile password.",
"migrate-key-pair-keycard": "Migrate profile key pair to Keycard", "migrate-key-pair-keycard": "Migrate profile key pair to Keycard",
"migrate-key-pair-keycard-default-key": "{{name}} is your default Status key pair. Migrating this key pair to Keycard will require you to use your Keycard to login to Status and to transact with the key pairs derived accounts on all synced devices.\n\nKey pair will be removed from device and stored on Keycard.", "migrate-key-pair-keycard-default-key": "{{name}} is your default Status key pair. Migrating this key pair to Keycard will require you to use your Keycard to login to Status and to transact with the key pairs derived accounts on all synced devices.\n\nKey pair will be removed from device and stored on Keycard.",
"migrate-key-pair-keycard-info": "Re-encrypting your data with your new Keycard login method may take some time, during which you wont be able to use the app.", "migrate-key-pair-keycard-info": "Re-encrypting your data with your new Keycard login method may take some time, during which you wont be able to use the app.",
@ -2340,6 +2342,7 @@
"signing-phrase": "Signing phrase", "signing-phrase": "Signing phrase",
"simple": "Simple", "simple": "Simple",
"skip": "Skip", "skip": "Skip",
"slide-to-authorise": "Slide to authorise",
"slide-to-bridge": "Slide to bridge", "slide-to-bridge": "Slide to bridge",
"slide-to-create-account": "Slide to create account", "slide-to-create-account": "Slide to create account",
"slide-to-import": "Slide to import", "slide-to-import": "Slide to import",