-
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.
Implement seed phrase fallback flow (#21090)
Co-authored-by: Parvesh Monu <parvesh.dhullmonu@gmail.com> Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
- Loading branch information
1 parent
2e61f94
commit 0eb065b
Showing
25 changed files
with
445 additions
and
88 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(ns status-im.common.new-device-sheet.style | ||
(:require [quo.foundations.colors :as colors])) | ||
|
||
(def heading | ||
{:padding-left 20 | ||
:padding-bottom 8}) | ||
|
||
(def message | ||
{:padding-horizontal 20 | ||
:padding-top 4}) | ||
|
||
(def warning | ||
{:margin-horizontal 20 | ||
:margin-top 10}) | ||
|
||
(def drawer-container | ||
{:padding-horizontal 13 | ||
:padding-top 16}) | ||
|
||
(def settings-subtext | ||
{:color colors/white-opa-70 | ||
:align-self :center | ||
:margin-bottom 12}) |
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,75 @@ | ||
(ns status-im.common.new-device-sheet.view | ||
(:require | ||
[quo.core :as quo] | ||
[react-native.core :as rn] | ||
[status-im.common.events-helper :as events-helper] | ||
[status-im.common.new-device-sheet.style :as style] | ||
[utils.i18n :as i18n] | ||
[utils.re-frame :as rf])) | ||
|
||
(defn- pair-and-sync | ||
[installation-id] | ||
(rf/dispatch [:pairing/pair-and-sync installation-id]) | ||
(events-helper/hide-bottom-sheet)) | ||
|
||
(defn installation-request-receiver-view | ||
[installation-id] | ||
(rn/use-mount events-helper/dismiss-keyboard) | ||
[:<> | ||
[quo/text | ||
{:weight :semi-bold | ||
:size :heading-2 | ||
:accessibility-label :new-device-sheet-heading | ||
:style style/heading} | ||
(i18n/label :t/pair-new-device-and-sync)] | ||
[quo/text | ||
{:weight :regular | ||
:size :paragraph-1 | ||
:accessibility-label :new-device-sheet-message | ||
:style style/message} | ||
(i18n/label :t/new-device-detected-recovered-device-message)] | ||
[quo/text | ||
{:weight :semi-bold | ||
:size :heading-2 | ||
:accessibility-label :new-device-installation-id | ||
:style style/heading} | ||
installation-id] | ||
[quo/bottom-actions | ||
{:actions :two-actions | ||
:blur? true | ||
:container-style {:margin-top 12} | ||
:button-two-label (i18n/label :t/cancel) | ||
:button-two-props {:type :grey | ||
:on-press events-helper/hide-bottom-sheet} | ||
:button-one-label (i18n/label :t/pair-and-sync) | ||
:button-one-props {:on-press #(pair-and-sync installation-id)}}]]) | ||
|
||
(defn installation-request-creator-view | ||
[installation-id] | ||
(rn/use-mount events-helper/dismiss-keyboard) | ||
[:<> | ||
[quo/text | ||
{:weight :semi-bold | ||
:size :heading-2 | ||
:accessibility-label :new-device-sheet-heading | ||
:style style/heading} | ||
(i18n/label :t/pair-this-device-and-sync)] | ||
[quo/text | ||
{:weight :regular | ||
:size :paragraph-1 | ||
:accessibility-label :new-device-sheet-message | ||
:style style/message} | ||
(i18n/label :t/new-device-detected-other-device-message)] | ||
[quo/text | ||
{:weight :semi-bold | ||
:size :heading-2 | ||
:accessibility-label :new-device-installation-id | ||
:style style/heading} | ||
installation-id] | ||
[quo/bottom-actions | ||
{:actions :one-action | ||
:blur? true | ||
:container-style {:margin-top 12} | ||
:button-one-label (i18n/label :t/close) | ||
:button-one-props {:type :grey | ||
:on-press events-helper/hide-bottom-sheet}}]]) |
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/onboarding/preparing_status/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.onboarding.preparing-status.style) | ||
|
||
(defn page-container | ||
[insets] | ||
{:flex 1 | ||
:padding-top (:top insets)}) | ||
|
||
(defn page-illustration | ||
[width] | ||
{:flex 1 | ||
:width width}) |
36 changes: 36 additions & 0 deletions
36
src/status_im/contexts/onboarding/preparing_status/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,36 @@ | ||
(ns status-im.contexts.onboarding.preparing-status.view | ||
(:require | ||
[quo.core :as quo] | ||
[react-native.core :as rn] | ||
[react-native.safe-area :as safe-area] | ||
[status-im.common.resources :as resources] | ||
[status-im.contexts.onboarding.generating-keys.style :as style] | ||
[utils.i18n :as i18n])) | ||
|
||
(defn title | ||
[] | ||
[rn/view | ||
{:style {:margin-top 56 | ||
:height 56 | ||
:margin-bottom 10}} | ||
[quo/text-combinations | ||
{:container-style {:margin-horizontal 20 | ||
:margin-vertical 12} | ||
:title (i18n/label :t/preparing-app-for-you) | ||
:description (i18n/label :t/hang-in-there)}]]) | ||
|
||
(defn content | ||
[] | ||
(let [width (:width (rn/get-window))] | ||
[rn/image | ||
{:resize-mode :stretch | ||
:style (style/page-illustration width) | ||
:source (resources/get-image :preparing-status)}])) | ||
|
||
(defn view | ||
[] | ||
(let [insets (safe-area/get-insets)] | ||
[rn/view {:style (style/page-container insets)} | ||
[:<> | ||
[title] | ||
[content]]])) |
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
Oops, something went wrong.