From bccf0f8d116000be2e730c7a66a49d9c00f163df Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Thu, 14 Mar 2024 16:48:08 +0530 Subject: [PATCH] re add progress root and popover overlay (#19241) --- .../status_im/multiaccounts/logout/core.cljs | 3 ++- src/status_im/navigation/core.cljs | 7 ++++++- src/status_im/navigation/roots.cljs | 18 +++++++++++++++++- src/status_im/navigation/view.cljs | 12 ++++++++++++ 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/legacy/status_im/multiaccounts/logout/core.cljs b/src/legacy/status_im/multiaccounts/logout/core.cljs index 07834e6dbb..16ef78dd02 100644 --- a/src/legacy/status_im/multiaccounts/logout/core.cljs +++ b/src/legacy/status_im/multiaccounts/logout/core.cljs @@ -28,7 +28,8 @@ [{:keys [db] :as cofx} {:keys [auth-method logout?]}] (let [key-uid (get-in db [:profile/profile :key-uid])] (rf/merge cofx - {:effects.shell/reset-state nil + {:set-root :progress + :effects.shell/reset-state nil :hide-popover nil ::logout nil :profile.settings/webview-debug-changed false diff --git a/src/status_im/navigation/core.cljs b/src/status_im/navigation/core.cljs index f1ba93faab..6099d6af0f 100644 --- a/src/status_im/navigation/core.cljs +++ b/src/status_im/navigation/core.cljs @@ -106,4 +106,9 @@ (navigation/register-component "bottom-sheet-old" (fn [] (gesture/gesture-handler-root-hoc views/sheet-comp-old)) - (fn [] views/sheet-comp-old))) + (fn [] views/sheet-comp-old)) + + (navigation/register-component + "popover" + (fn [] (gesture/gesture-handler-root-hoc views/popover-comp)) + (fn [] views/popover-comp))) diff --git a/src/status_im/navigation/roots.cljs b/src/status_im/navigation/roots.cljs index 5d3cb36d28..9a09c478a1 100644 --- a/src/status_im/navigation/roots.cljs +++ b/src/status_im/navigation/roots.cljs @@ -14,7 +14,7 @@ :profiles constants/theme-type-dark :shell-stack nil}) -(defn roots +(defn roots-internal [] {:intro {:root @@ -49,3 +49,19 @@ {:root {:stack {:children [{:component {:name :syncing-results :id :syncing-results :options (options/dark-root-options)}}]}}}}) + +(defn old-roots + [] + {:progress + {:root {:stack {:children [{:component {:name :progress + :id :progress + :options (options/root-options nil)}}] + :options (assoc (options/root-options nil) + :topBar + {:visible false})}}}}) + +(defn roots + [] + (merge + (old-roots) + (roots-internal))) diff --git a/src/status_im/navigation/view.cljs b/src/status_im/navigation/view.cljs index 64364b5a41..d3bcbc3764 100644 --- a/src/status_im/navigation/view.cljs +++ b/src/status_im/navigation/view.cljs @@ -1,6 +1,7 @@ (ns status-im.navigation.view (:require [legacy.status-im.bottom-sheet.sheets :as bottom-sheets-old] + [legacy.status-im.ui.screens.popover.views :as popover] [quo.foundations.colors :as colors] [quo.theme :as theme] [react-native.core :as rn] @@ -125,3 +126,14 @@ [inactive] [bottom-sheets-old/bottom-sheet]]) functional-compiler)) + +(def popover-comp + (reagent/reactify-component + (fn [] + ^{:key (str "popover" @reloader/cnt)} + [:<> + [inactive] + [popover/popover] + (when js/goog.DEBUG + [reloader/reload-view])]) + functional-compiler))