Skip to content

Commit

Permalink
add preparing status screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Parveshdhull committed Sep 12, 2024
1 parent 28d29ed commit 69cb8d9
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 3 deletions.
Binary file added resources/images/ui2/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/ui2/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/status_im/common/resources.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
:notifications (js/require "../resources/images/ui2/notifications.png")
:nfc-prompt (js/require "../resources/images/ui2/nfc-prompt.png")
:nfc-success (js/require "../resources/images/ui2/nfc-success.png")
:preparing-status (js/require "../resources/images/ui2/preparing-status.png")
:syncing-devices (js/require "../resources/images/ui2/syncing_devices.png")
:syncing-wrong (js/require "../resources/images/ui2/syncing_wrong.png")})

Expand Down
1 change: 1 addition & 0 deletions src/status_im/contexts/centralized_metrics/tracking.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
:screen/onboarding.enable-biometrics
:screen/onboarding.generating-keys
:screen/onboarding.enable-notifications
:screen/onboarding.preparing-status
:screen/onboarding.sign-in-intro
:screen/onboarding.sign-in
:screen/onboarding.syncing-progress
Expand Down
9 changes: 6 additions & 3 deletions src/status_im/contexts/onboarding/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,20 @@
{:events [:onboarding/create-account-and-login]}
[{:keys [db] :as cofx}]
(let [{:keys [display-name seed-phrase password image-path color] :as profile}
(:onboarding/profile db)]
(:onboarding/profile db)
loading-screen (if (seq (:syncing/key-uid db))
:screen/onboarding.preparing-status
:screen/onboarding.generating-keys)]
(rf/merge cofx
{:dispatch [:navigate-to-within-stack
[:screen/onboarding.generating-keys
[loading-screen
(get db
:onboarding/navigated-to-enter-seed-phrase-from-screen
:screen/onboarding.new-to-status)]]
:dispatch-later [{:ms constants/onboarding-generating-keys-animation-duration-ms
:dispatch [:navigate-to-within-stack
[:screen/onboarding.enable-notifications
:screen/onboarding.generating-keys]]}]
loading-screen]]}]
:db (-> db
(dissoc :profile/login)
(dissoc :auth-method)
Expand Down
11 changes: 11 additions & 0 deletions src/status_im/contexts/onboarding/preparing_status/style.cljs
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 src/status_im/contexts/onboarding/preparing_status/view.cljs
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-status-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]]]))
10 changes: 10 additions & 0 deletions src/status_im/navigation/screens.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
[status-im.contexts.onboarding.generating-keys.view :as generating-keys]
[status-im.contexts.onboarding.identifiers.view :as identifiers]
[status-im.contexts.onboarding.intro.view :as intro]
[status-im.contexts.onboarding.preparing-status.view :as preparing-status]
[status-im.contexts.onboarding.sign-in.view :as sign-in]
[status-im.contexts.onboarding.syncing.progress.view :as syncing-devices]
[status-im.contexts.onboarding.syncing.results.view :as syncing-results]
Expand Down Expand Up @@ -344,6 +345,15 @@
:popStackOnPress false}}
:component generating-keys/view}

{:name :screen/onboarding.preparing-status
:options {:theme :dark
:layout options/onboarding-transparent-layout
:animations transitions/push-animations-for-transparent-background
:popGesture false
:hardwareBackButton {:dismissModalOnPress false
:popStackOnPress false}}
:component preparing-status/view}

{:name :screen/onboarding.enter-seed-phrase
:options {:theme :dark
:layout options/onboarding-transparent-layout
Expand Down
2 changes: 2 additions & 0 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,7 @@
"group-membership-request": "Group membership request",
"groups": "Groups",
"gwei": "Gwei",
"hang-in-there": "Hang in there! Just a few more seconds!",
"has-permissions": "has permission to access",
"hash": "Hash",
"have-a-sync-code?": "Have a sync code?",
Expand Down Expand Up @@ -1918,6 +1919,7 @@
"powered-by-paraswap": "Powered by Paraswap",
"preference": "Preference",
"preferred-by-receiver": "Preferred by receiver",
"preparing-status-for-you": "Preparing Status for you...",
"press": "Press",
"preview-privacy": "Preview privacy mode",
"previewing-may-share-metadata": "Previewing links from these websites may share your metadata with their owners",
Expand Down

0 comments on commit 69cb8d9

Please sign in to comment.