From c85f47dcf261fb4e101fdb75ff9d8b7ccb34970f Mon Sep 17 00:00:00 2001 From: Siddarth Kumar Date: Tue, 4 Apr 2023 12:19:53 +0530 Subject: [PATCH] `:show-popover` -> `:open-modal` --- src/status_im/ui/screens/popover/views.cljs | 6 +----- src/status_im2/common/home/view.cljs | 2 +- src/status_im2/contexts/share/style.cljs | 5 +++++ src/status_im2/contexts/share/view.cljs | 6 ++++-- src/status_im2/navigation/screens.cljs | 5 +++++ 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/status_im/ui/screens/popover/views.cljs b/src/status_im/ui/screens/popover/views.cljs index c63113886992..e021f7929e3e 100644 --- a/src/status_im/ui/screens/popover/views.cljs +++ b/src/status_im/ui/screens/popover/views.cljs @@ -19,8 +19,7 @@ [status-im.ui.screens.wallet.request.views :as request] [status-im.ui.screens.wallet.signing-phrase.views :as signing-phrase] [status-im.utils.platform :as platform] - [status-im2.contexts.activity-center.view :as activity-center] - [status-im2.contexts.share.view :as share])) + [status-im2.contexts.activity-center.view :as activity-center])) (defn hide-panel-anim [bottom-anim-value alpha-value window-height] @@ -189,9 +188,6 @@ (= :activity-center view) [activity-center/view request-close] - (= :profile-share view) - [share/view] - :else [view])]]]])))}))) diff --git a/src/status_im2/common/home/view.cljs b/src/status_im2/common/home/view.cljs index 109b27de5b59..facb22e782cf 100644 --- a/src/status_im2/common/home/view.cljs +++ b/src/status_im2/common/home/view.cljs @@ -97,7 +97,7 @@ [quo/button (merge button-common-props {:accessibility-label :show-qr-button - :on-press #(rf/dispatch [:share/open])}) + :on-press #(rf/dispatch [:open-modal :share-shell])}) :i/qr-code] [rn/view [unread-indicator] diff --git a/src/status_im2/contexts/share/style.cljs b/src/status_im2/contexts/share/style.cljs index 0afadaa83eab..bdf5a2add14b 100644 --- a/src/status_im2/contexts/share/style.cljs +++ b/src/status_im2/contexts/share/style.cljs @@ -3,6 +3,11 @@ (def screen-padding 20) +(def blur + {:style {:position :absolute :top 0 :left 0 :right 0 :bottom 0} + :overlayColor colors/neutral-80-opa-80 + :blur-amount 20}) + (def header-button {:margin-bottom 12 :margin-left screen-padding}) diff --git a/src/status_im2/contexts/share/view.cljs b/src/status_im2/contexts/share/view.cljs index a6b03e8f15fe..08f59aabea55 100644 --- a/src/status_im2/contexts/share/view.cljs +++ b/src/status_im2/contexts/share/view.cljs @@ -10,6 +10,7 @@ [status-im2.common.qr-code.qr :as qr] [clojure.string :as string] [status-im2.constants :as const] + [react-native.blur :as blur] ;;TODO(siddarthkay) : move the components below over to status-im2 ns ;; issue -> https://github.com/status-im/status-mobile/issues/15549 [status-im.ui.components.list-selection :as list-selection] @@ -25,10 +26,10 @@ {:icon true :type :blur-bg :size 32 - :accessibility-label :close-activity-center + :accessibility-label :close-shell-share-tab :override-theme :dark :style style/header-button - :on-press #(rf/dispatch [:hide-popover])} + :on-press #(rf/dispatch [:navigate-back])} :i/close] [quo/text {:size :heading-1 @@ -125,6 +126,7 @@ (fn [{:keys [top bottom]}] (let [window-width (rf/sub [:dimensions/window-width])] [rn/view {:style (style/screen-container window-width top bottom)} + [blur/view style/blur] [header] [rn/view {:style style/tabs-container} [quo/segmented-control diff --git a/src/status_im2/navigation/screens.cljs b/src/status_im2/navigation/screens.cljs index 49e7ec1474d1..e2c524641c7b 100644 --- a/src/status_im2/navigation/screens.cljs +++ b/src/status_im2/navigation/screens.cljs @@ -27,6 +27,7 @@ [status-im2.contexts.syncing.view :as settings-syncing] [status-im2.navigation.options :as options] [status-im2.contexts.chat.group-details.view :as group-details] + [status-im2.contexts.share.view :as share] [status-im.ui.screens.screens :as old-screens] [status-im2.contexts.communities.menus.request-to-join.view :as join-menu])) @@ -43,6 +44,10 @@ :options options/transparent-screen-options :component activity-center/view} + {:name :share-shell + :options options/transparent-screen-options + :component share/view} + {:name :shell-stack :component shell/shell-stack}