-
Notifications
You must be signed in to change notification settings - Fork 986
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new keypair: mnemonic, address, KP name screen (#18790)
feat: new keypair: mnemonic, address, KP name screen (#18790)
- Loading branch information
Showing
15 changed files
with
337 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/status_im/contexts/wallet/create_account/new_keypair/keypair_name/style.cljs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(ns status-im.contexts.wallet.create-account.new-keypair.keypair-name.style) | ||
|
||
(def header-container | ||
{:margin-horizontal 20 | ||
:margin-vertical 12}) | ||
|
||
(def bottom-action | ||
{:position :absolute | ||
:bottom 12 | ||
:left 0 | ||
:right 0}) |
40 changes: 40 additions & 0 deletions
40
src/status_im/contexts/wallet/create_account/new_keypair/keypair_name/view.cljs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
(ns status-im.contexts.wallet.create-account.new-keypair.keypair-name.view | ||
(:require | ||
[quo.core :as quo] | ||
[react-native.core :as rn] | ||
[reagent.core :as reagent] | ||
[status-im.contexts.wallet.create-account.new-keypair.keypair-name.style :as style] | ||
[utils.i18n :as i18n] | ||
[utils.re-frame :as rf])) | ||
|
||
(def keypair-name-max-length 15) | ||
|
||
(defn view | ||
[] | ||
(let [keypair-name (reagent/atom "")] | ||
(fn [] | ||
(let [customization-color (rf/sub [:profile/customization-color])] | ||
[rn/view {:style {:flex 1}} | ||
[quo/page-nav | ||
{:icon-name :i/arrow-left | ||
:on-press #(rf/dispatch [:navigate-back]) | ||
:accessibility-label :top-bar}] | ||
[quo/text-combinations | ||
{:container-style style/header-container | ||
:title (i18n/label :t/keypair-name) | ||
:description (i18n/label :t/keypair-name-description)}] | ||
[quo/input | ||
{:container-style {:margin-horizontal 20} | ||
:placeholder (i18n/label :t/keypair-name-input-placeholder) | ||
:label (i18n/label :t/keypair-name) | ||
:char-limit keypair-name-max-length | ||
:on-change-text #(reset! keypair-name %)}] | ||
[quo/bottom-actions | ||
{:actions :one-action | ||
:button-one-label (i18n/label :t/continue) | ||
:button-one-props {:disabled? (or (zero? (count @keypair-name)) | ||
(> (count @keypair-name) keypair-name-max-length)) | ||
:customization-color customization-color | ||
:on-press #(rf/dispatch [:wallet/new-keypair-continue | ||
{:keypair-name @keypair-name}])} | ||
:container-style style/bottom-action}]])))) |
Oops, something went wrong.