Fix syncing flow navigation and designs (#21884)

This commit is contained in:
Parvesh Monu 2025-01-08 11:22:19 +05:30 committed by GitHub
parent ba8cf8e863
commit 3697f63ab0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 23 additions and 20 deletions

View File

@ -73,7 +73,6 @@
[quo/bottom-actions [quo/bottom-actions
(cond-> (cond->
{:container-style (style/bottom-actions-container (safe-area/get-bottom)) {:container-style (style/bottom-actions-container (safe-area/get-bottom))
:actions :two-vertical-actions
:description :bottom :description :bottom
:description-text [terms]} :description-text [terms]}

View File

@ -21,9 +21,10 @@
:background-color (when-not in-onboarding? colors/neutral-80-opa-80-blur)}) :background-color (when-not in-onboarding? colors/neutral-80-opa-80-blur)})
(defn page-illustration (defn page-illustration
[width] [width pairing-progress?]
{:flex 1 {:flex 1
:width width :width width
:align-items :center :align-items :center
:margin-vertical (when pairing-progress? 24)
:align-self :center :align-self :center
:justify-content :center}) :justify-content :center})

View File

@ -18,11 +18,10 @@
[quo/text-combinations [quo/text-combinations
{:container-style {:margin-top 56 :margin-horizontal 20} {: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-profile-title
:t/sync-devices-error-title)) :t/sync-devices-error-title))
:description (i18n/label (if pairing-progress? :description (when-not pairing-progress?
:t/sync-devices-sub-title (i18n/label :t/sync-devices-error-sub-title))
:t/sync-devices-error-sub-title))
:title-accessibility-label :progress-screen-title :title-accessibility-label :progress-screen-title
:description-accessibility-label :progress-screen-sub-title}]) :description-accessibility-label :progress-screen-sub-title}])
@ -43,22 +42,21 @@
(defn try-again-button (defn try-again-button
[profile-color logged-in?] [profile-color logged-in?]
[quo/bottom-actions [quo/bottom-actions
{:actions (if logged-in? :one-action :two-actions) {:actions (if logged-in? :one-action :two-vertical-actions)
:blur? true :blur? true
:button-one-label (i18n/label :t/recovery-phrase) :container-style {:height (when-not logged-in? 116)}
:button-one-props {:type :primary :button-two-label (i18n/label :t/use-recovery-phrase)
:button-two-props {:type :primary
:accessibility-label :try-seed-phrase-button :accessibility-label :try-seed-phrase-button
:customization-color profile-color :customization-color profile-color
:container-style {:flex 1}
:size 40 :size 40
:on-press navigate-to-enter-seed-phrase} :on-press navigate-to-enter-seed-phrase}
(if logged-in? :button-one-label :button-two-label) :button-one-label
(i18n/label :t/try-again) (i18n/label :t/try-again)
(if logged-in? :button-one-props :button-two-props) :button-one-props
{:type (if logged-in? :primary :grey) {:type (if logged-in? :primary :grey)
:accessibility-label :try-again-later-button :accessibility-label :try-again-later-button
:customization-color profile-color :customization-color profile-color
:container-style {:flex 1}
:size 40 :size 40
:on-press #(try-again logged-in?)}}]) :on-press #(try-again logged-in?)}}])
@ -66,7 +64,7 @@
[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)) pairing-progress?)
: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
@ -83,7 +81,12 @@
[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) (if pairing-progress?
[quo/information-box
{:type :default
:blur? true
:style {:margin-vertical 11 :margin-horizontal 12}}
(i18n/label :t/sync-devices-sub-title)]
[try-again-button profile-color logged-in?])])) [try-again-button profile-color logged-in?])]))
(defn view-onboarding (defn view-onboarding

View File

@ -82,7 +82,7 @@
[:dispatch [:centralized-metrics/track :metric/keycard-login]])] [:dispatch [:centralized-metrics/track :metric/keycard-login]])]
(cond (cond
pairing-completed? pairing-completed?
[[:dispatch [:update-theme-and-init-root :screen/onboarding.syncing-results]]] [[:dispatch [:onboarding/finish-onboarding false]]]
(get db :onboarding/new-account?) (get db :onboarding/new-account?)
[[:dispatch [:onboarding/finalize-setup]] [[:dispatch [:onboarding/finalize-setup]]

View File

@ -2517,14 +2517,15 @@
"sync-code-generated": "Sync code generated", "sync-code-generated": "Sync code generated",
"sync-devices-complete-sub-title": "Your devices are now in sync", "sync-devices-complete-sub-title": "Your devices are now in sync",
"sync-devices-complete-title": "Device sync complete!", "sync-devices-complete-title": "Device sync complete!",
"sync-devices-error-sub-title": "Make sure both devices are powered on and connected to the internet.", "sync-devices-error-sub-title": "Try again and double-check the instructions",
"sync-devices-error-title": "Oops, somethings wrong", "sync-devices-error-title": "Oops, somethings wrong!",
"sync-devices-result-sub-title": "Your devices are now in sync", "sync-devices-result-sub-title": "Your devices are now in sync",
"sync-devices-sub-title": "Please keep both devices switched on and connected to the internet until sync is complete", "sync-devices-sub-title": "Please keep both devices switched on and connected to the same network until sync is complete.",
"sync-devices-title": "Syncing devices...", "sync-devices-title": "Syncing devices...",
"sync-in-progress": "Syncing...", "sync-in-progress": "Syncing...",
"sync-new-device": "Sync new device", "sync-new-device": "Sync new device",
"sync-or-recover-profile": "Sync or recover profile", "sync-or-recover-profile": "Sync or recover profile",
"sync-profile-title": "Syncing profile...",
"sync-settings": "Sync settings", "sync-settings": "Sync settings",
"sync-synced": "In sync", "sync-synced": "In sync",
"sync-your-profile": "Sync your profile", "sync-your-profile": "Sync your profile",

View File

@ -1913,7 +1913,6 @@
"sync-code-generated": "同期コードが生成されました", "sync-code-generated": "同期コードが生成されました",
"sync-devices-complete-sub-title": "お使いのデバイスが同期されました", "sync-devices-complete-sub-title": "お使いのデバイスが同期されました",
"sync-devices-complete-title": "デバイスの同期が完了しました!", "sync-devices-complete-title": "デバイスの同期が完了しました!",
"sync-devices-error-sub-title": "両方のデバイスの電源がオンになっていて、インターネットに接続されていることを確認してください。",
"sync-devices-error-title": "おっと、何かが間違っています", "sync-devices-error-title": "おっと、何かが間違っています",
"sync-devices-result-sub-title": "お使いのデバイスが同期されました", "sync-devices-result-sub-title": "お使いのデバイスが同期されました",
"sync-devices-sub-title": "同期が完了するまで、両方のデバイスの電源を入れ、インターネットに接続したままにしてください。", "sync-devices-sub-title": "同期が完了するまで、両方のデバイスの電源を入れ、インターネットに接続したままにしてください。",