Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6ab9caf39 | ||
|
|
7ffa680761 | ||
|
|
d6041c90a4 | ||
|
|
9e9833e732 |
@@ -1,6 +1,7 @@
|
|||||||
(ns status-im.contexts.onboarding.syncing.progress.style
|
(ns status-im.contexts.onboarding.syncing.progress.style
|
||||||
(:require
|
(:require
|
||||||
[quo.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]
|
||||||
|
[react-native.safe-area :as safe-area]))
|
||||||
|
|
||||||
(def absolute-fill
|
(def absolute-fill
|
||||||
{:position :absolute
|
{:position :absolute
|
||||||
@@ -17,6 +18,7 @@
|
|||||||
:bottom 0
|
:bottom 0
|
||||||
:left 0
|
:left 0
|
||||||
:right 0
|
:right 0
|
||||||
|
:padding-top (safe-area/get-top)
|
||||||
:padding-bottom 20
|
:padding-bottom 20
|
||||||
:background-color (when-not in-onboarding? colors/neutral-80-opa-80-blur)})
|
:background-color (when-not in-onboarding? colors/neutral-80-opa-80-blur)})
|
||||||
|
|
||||||
|
|||||||
@@ -15,16 +15,14 @@
|
|||||||
|
|
||||||
(defn page-title
|
(defn page-title
|
||||||
[pairing-progress?]
|
[pairing-progress?]
|
||||||
[quo/text-combinations
|
[quo/page-top
|
||||||
{:container-style {:margin-top 56 :margin-horizontal 20}
|
{:title (i18n/label (if pairing-progress?
|
||||||
:title (i18n/label (if pairing-progress?
|
:t/sync-devices-title
|
||||||
:t/sync-devices-title
|
:t/sync-devices-error-title))
|
||||||
:t/sync-devices-error-title))
|
:description :text
|
||||||
:description (i18n/label (if pairing-progress?
|
:description-text (i18n/label (if pairing-progress?
|
||||||
:t/sync-devices-sub-title
|
:t/sync-devices-sub-title
|
||||||
:t/sync-devices-error-sub-title))
|
:t/sync-devices-error-sub-title))}])
|
||||||
:title-accessibility-label :progress-screen-title
|
|
||||||
:description-accessibility-label :progress-screen-sub-title}])
|
|
||||||
|
|
||||||
(defn- navigate-to-enter-seed-phrase
|
(defn- navigate-to-enter-seed-phrase
|
||||||
[]
|
[]
|
||||||
@@ -42,32 +40,41 @@
|
|||||||
|
|
||||||
(defn try-again-button
|
(defn try-again-button
|
||||||
[profile-color logged-in?]
|
[profile-color logged-in?]
|
||||||
[quo/bottom-actions
|
(let [number-of-actions (if logged-in? :one-action :two-actions)
|
||||||
{:actions (if logged-in? :one-action :two-actions)
|
try-again-label (i18n/label :t/try-again)
|
||||||
:blur? true
|
try-again-props {:type (if logged-in? :primary :grey)
|
||||||
:button-one-label (i18n/label :t/recovery-phrase)
|
:accessibility-label :try-again-later-button
|
||||||
:button-one-props {:type :primary
|
:customization-color profile-color
|
||||||
:accessibility-label :try-seed-phrase-button
|
:container-style {:flex 1}
|
||||||
:customization-color profile-color
|
:size 40
|
||||||
:container-style {:flex 1}
|
:on-press #(try-again logged-in?)}
|
||||||
:size 40
|
recovery-phrase-label (i18n/label :t/recovery-phrase)
|
||||||
:on-press navigate-to-enter-seed-phrase}
|
recovery-phrase-props {:type :primary
|
||||||
(if logged-in? :button-one-label :button-two-label)
|
:accessibility-label :try-seed-phrase-button
|
||||||
(i18n/label :t/try-again)
|
:customization-color profile-color
|
||||||
(if logged-in? :button-one-props :button-two-props)
|
:container-style {:flex 1}
|
||||||
{:type (if logged-in? :primary :grey)
|
:size 40
|
||||||
:accessibility-label :try-again-later-button
|
:on-press navigate-to-enter-seed-phrase}
|
||||||
:customization-color profile-color
|
buttons (if logged-in?
|
||||||
:container-style {:flex 1}
|
{:button-one-label try-again-label
|
||||||
:size 40
|
:button-one-props try-again-props}
|
||||||
:on-press #(try-again logged-in?)}}])
|
{:button-one-label recovery-phrase-label
|
||||||
|
:button-one-props recovery-phrase-props
|
||||||
|
:button-two-label try-again-label
|
||||||
|
:button-two-props try-again-props})]
|
||||||
|
[quo/bottom-actions
|
||||||
|
(assoc buttons
|
||||||
|
:actions number-of-actions
|
||||||
|
:blur? true)]))
|
||||||
|
|
||||||
(defn- illustration
|
(defn- illustration
|
||||||
[pairing-progress?]
|
[pairing-progress?]
|
||||||
[rn/image
|
[rn/image
|
||||||
{:resize-mode :contain
|
{:resize-mode :contain
|
||||||
:style (style/page-illustration (:width (rn/get-window)))
|
:style (style/page-illustration (:width (rn/get-window)))
|
||||||
:source (resources/get-image (if pairing-progress? :syncing-devices :syncing-wrong))}])
|
:source (resources/get-image (if pairing-progress?
|
||||||
|
:syncing-devices
|
||||||
|
:syncing-wrong))}])
|
||||||
|
|
||||||
(defn view
|
(defn view
|
||||||
[in-onboarding?]
|
[in-onboarding?]
|
||||||
@@ -83,7 +90,7 @@
|
|||||||
[quo/page-nav {:type :no-title :background :blur}]
|
[quo/page-nav {:type :no-title :background :blur}]
|
||||||
[page-title pairing-progress?]
|
[page-title pairing-progress?]
|
||||||
[illustration pairing-progress?]
|
[illustration pairing-progress?]
|
||||||
(when-not (pairing-progress pairing-status)
|
(when-not pairing-progress?
|
||||||
[try-again-button profile-color logged-in?])]))
|
[try-again-button profile-color logged-in?])]))
|
||||||
|
|
||||||
(defn view-onboarding
|
(defn view-onboarding
|
||||||
|
|||||||
Reference in New Issue
Block a user