Skip to content

Commit

Permalink
Merge branch 'develop' into 17116-3
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrkhalil authored Dec 12, 2023
2 parents 786d565 + f1bcc62 commit fa3803f
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 26 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.
Binary file added resources/videos2/notifications_01.mp4
Binary file not shown.
Binary file added resources/videos2/notifications_02.mp4
Binary file not shown.
Binary file added resources/videos2/notifications_03.mp4
Binary file not shown.
Binary file added resources/videos2/notifications_04.mp4
Binary file not shown.
7 changes: 6 additions & 1 deletion src/status_im2/common/resources.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
:no-contacts-to-invite-dark (js/require "../resources/images/ui2/no-contacts-to-invite-dark.png")
:no-notifications-light (js/require "../resources/images/ui2/no-notifications-light.png")
:no-notifications-dark (js/require "../resources/images/ui2/no-notifications-dark.png")
:notifications (js/require "../resources/images/ui2/notifications.png")
:welcome-illustration (js/require "../resources/images/ui2/welcome_illustration.png")})

(def ui-themed
Expand Down Expand Up @@ -138,7 +139,11 @@
(js/require "../resources/videos2/biometrics_04.mp4")]
:generate-keys [(js/require "../resources/videos2/generating_keys_01.mp4")
(js/require "../resources/videos2/generating_keys_02.mp4")
(js/require "../resources/videos2/generating_keys_03.mp4")]})
(js/require "../resources/videos2/generating_keys_03.mp4")]
:notifications [(js/require "../resources/videos2/notifications_01.mp4")
(js/require "../resources/videos2/notifications_02.mp4")
(js/require "../resources/videos2/notifications_03.mp4")
(js/require "../resources/videos2/notifications_04.mp4")]})

(def services
{:latamex (js/require "../resources/images/services/Latamex.png")
Expand Down
23 changes: 10 additions & 13 deletions src/status_im2/contexts/onboarding/enable_notifications/style.cljs
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
(ns status-im2.contexts.onboarding.enable-notifications.style
(:require
[quo.foundations.colors :as colors]))
(ns status-im2.contexts.onboarding.enable-notifications.style)

(def default-margin 20)

(defn page-container
[insets]
{:flex 1
:padding-top (:top insets)})
{:flex 1
:justify-content :space-between
:padding-top (:top insets)})

(def page-illustration
{:flex 1
:background-color colors/danger-50
:align-items :center
:margin-horizontal default-margin
:border-radius 20
:margin-top default-margin
:justify-content :center})
(defn page-illustration
[width]
{:flex 1
:width width})

(def page-heading {:z-index 1})

(defn buttons
[insets]
Expand Down
43 changes: 33 additions & 10 deletions src/status_im2/contexts/onboarding/enable_notifications/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
[react-native.core :as rn]
[react-native.platform :as platform]
[react-native.safe-area :as safe-area]
[status-im2.common.parallax.view :as parallax]
[status-im2.common.parallax.whitelist :as whitelist]
[status-im2.common.resources :as resources]
[status-im2.contexts.onboarding.enable-notifications.style :as style]
[status-im2.contexts.shell.jump-to.utils :as shell.utils]
[taoensso.timbre :as log]
Expand Down Expand Up @@ -35,7 +38,7 @@
(rf/dispatch [:navigate-to-within-stack
[:welcome :enable-notifications]]))
:type :primary
:before :i/notifications
:icon-left :i/notifications
:accessibility-label :enable-notifications-button
:customization-color profile-color}
(i18n/label :t/intro-wizard-title6)]
Expand All @@ -50,16 +53,36 @@
:container-style {:margin-top 12}}
(i18n/label :t/maybe-later)]]))

(defn enable-notifications
(defn enable-notifications-parallax
[]
(let [stretch (if rn/small-screen? -40 -25)]
[parallax/video
{:layers (:notifications resources/parallax-video)
:stretch stretch}]))

(defn enable-notifications-simple
[]
(let [width (:width (rn/get-window))]
[rn/image
{:resize-mode :contain
:style (style/page-illustration width)
:source (resources/get-image :notifications)}]))

(defn f-enable-notifications
[]
(let [insets (safe-area/get-insets)]
[rn/view {:style (style/page-container insets)}
[quo/page-nav
{:background :blur
:icon-name :i/arrow-left
:on-press #(rf/dispatch [:navigate-back-within-stack :enable-biometrics])}]
[page-title]
[rn/view {:style style/page-illustration}
[quo/text
"Illustration here"]]
[rn/view {:style style/page-heading}
[quo/page-nav
{:background :blur
:icon-name :i/arrow-left
:on-press #(rf/dispatch [:navigate-back-within-stack :enable-biometrics])}]
[page-title]]
(if whitelist/whitelisted?
[enable-notifications-parallax]
[enable-notifications-simple])
[enable-notification-buttons {:insets insets}]]))

(defn view
[]
[:f> f-enable-notifications])
2 changes: 1 addition & 1 deletion src/status_im2/navigation/screens.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
:animations (merge transitions/new-to-status-modal-animations
transitions/push-animations-for-transparent-background)
:modalPresentationStyle :overCurrentContext}
:component enable-notifications/enable-notifications}
:component enable-notifications/view}

{:name :identifiers
:component identifiers/view
Expand Down
2 changes: 1 addition & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@
"empty-chat-description-community": "It's been quiet here for the last {{quiet-hours}}.",
"empty-chat-description-public-share-this": "share this chat.",
"enable": "Enable",
"enable-notifications-sub-title": "Receive notifications when somebody sends you a message or crypto to your wallet",
"enable-notifications-sub-title": "Receive notifications about your new messages or wallet transactions",
"encrypt-with-password": "Encrypt with password",
"ending-not-allowed": "{{ending}} ending is not allowed",
"ends-with-space": "Cannot end with space",
Expand Down

0 comments on commit fa3803f

Please sign in to comment.