|
25 | 25 | :title-accessibility-label :progress-screen-title
|
26 | 26 | :description-accessibility-label :progress-screen-sub-title}])
|
27 | 27 |
|
| 28 | +(defn navigate-to-enter-seed-phrase |
| 29 | + [view-id] |
| 30 | + (if (= view-id :screen/onboarding.syncing-progress-intro) |
| 31 | + (do |
| 32 | + (rf/dispatch [:navigate-back-to :screen/onboarding.sync-or-recover-profile]) |
| 33 | + (debounce/debounce-and-dispatch |
| 34 | + [:onboarding/navigate-to-sign-in-by-seed-phrase :screen/onboarding.sync-or-recover-profile] |
| 35 | + 300)) |
| 36 | + (do |
| 37 | + (rf/dispatch [:navigate-back]) |
| 38 | + (debounce/debounce-and-dispatch [:onboarding/overlay-show] 100) |
| 39 | + (debounce/debounce-and-dispatch [:open-modal :screen/onboarding.new-to-status] 200) |
| 40 | + (debounce/debounce-and-dispatch |
| 41 | + [:onboarding/navigate-to-sign-in-by-seed-phrase :screen/onboarding.new-to-status] |
| 42 | + 300)))) |
| 43 | + |
28 | 44 | (defn try-again-button
|
29 |
| - [profile-color] |
30 |
| - [quo/button |
31 |
| - {:on-press (fn [] |
32 |
| - (rf/dispatch [:syncing/clear-states]) |
33 |
| - (rf/dispatch [:navigate-back])) |
34 |
| - :accessibility-label :try-again-later-button |
35 |
| - :customization-color profile-color |
36 |
| - :size 40 |
37 |
| - :container-style style/try-again-button} |
38 |
| - (i18n/label :t/try-again)]) |
| 45 | + [profile-color logged-in?] |
| 46 | + [rn/view |
| 47 | + (when-not logged-in? |
| 48 | + [quo/button |
| 49 | + {:on-press #(navigate-to-enter-seed-phrase view-id) |
| 50 | + :accessibility-label :try-seed-phrase-button |
| 51 | + :customization-color profile-color |
| 52 | + :container-style style/try-again-button} |
| 53 | + (i18n/label :t/enter-seed-phrase)]) |
| 54 | + [quo/button |
| 55 | + {:on-press (fn [] |
| 56 | + (rf/dispatch [:syncing/clear-states]) |
| 57 | + (rf/dispatch [:navigate-back])) |
| 58 | + :accessibility-label :try-again-later-button |
| 59 | + :customization-color profile-color |
| 60 | + :size 40 |
| 61 | + :container-style style/try-again-button} |
| 62 | + (i18n/label :t/try-again)]]) |
39 | 63 |
|
40 | 64 | (defn- illustration
|
41 | 65 | [pairing-progress?]
|
|
47 | 71 | (defn view
|
48 | 72 | [in-onboarding?]
|
49 | 73 | (let [pairing-status (rf/sub [:pairing/pairing-status])
|
| 74 | + logged-in? (rf/sub [:multiaccount/logged-in?]) |
50 | 75 | pairing-progress? (pairing-progress pairing-status)
|
51 | 76 | profile-color (or (:color (rf/sub [:onboarding/profile]))
|
52 | 77 | (rf/sub [:profile/customization-color]))]
|
|
58 | 83 | [page-title pairing-progress?]
|
59 | 84 | [illustration pairing-progress?]
|
60 | 85 | (when-not (pairing-progress pairing-status)
|
61 |
| - [try-again-button profile-color])])) |
| 86 | + [try-again-button profile-color logged-in?])])) |
62 | 87 |
|
63 | 88 | (defn view-onboarding
|
64 | 89 | []
|
|
0 commit comments