This commit is contained in:
parent
5a9279b232
commit
eecd1d50e4
|
@ -19,8 +19,10 @@
|
|||
:text-color (colors/resolve-color :danger theme)}})
|
||||
|
||||
(defn- banner
|
||||
[{:keys [text type second-banner? colors-map]}]
|
||||
[rn/view (when second-banner? {:style style/second-banner-wrapper})
|
||||
[{:keys [text type second-banner? colors-map on-press]}]
|
||||
[rn/pressable
|
||||
{:on-press #(when on-press (on-press))
|
||||
:style (when second-banner? style/second-banner-wrapper)}
|
||||
[hole-view/hole-view
|
||||
{:style (style/hole-view (get-in colors-map [type :background-color]))
|
||||
:holes (if second-banner?
|
||||
|
|
|
@ -126,7 +126,8 @@
|
|||
[reanimated/view
|
||||
{:style (reanimated/apply-animations-to-style
|
||||
{:opacity bg-opacity}
|
||||
{:flex 1 :background-color colors/neutral-100-opa-70})}]]
|
||||
{:flex 1
|
||||
:background-color (if shell? colors/neutral-100-opa-60 colors/neutral-100-opa-70)})}]]
|
||||
;; sheet
|
||||
[gesture/gesture-detector {:gesture sheet-gesture}
|
||||
[reanimated/view
|
||||
|
@ -138,7 +139,7 @@
|
|||
[quo/blur
|
||||
{:style style/shell-bg
|
||||
:blur-radius (or blur-radius 20)
|
||||
:blur-amount 32
|
||||
:blur-amount 15
|
||||
:blur-type :transparent
|
||||
:overlay-color :transparent}]])
|
||||
(when selected-item
|
||||
|
|
|
@ -251,5 +251,6 @@
|
|||
config/enable-alert-banner?)
|
||||
{:fx [[:dispatch
|
||||
[:alert-banners/add
|
||||
{:type :alert
|
||||
:text (i18n/label :t/testnet-mode-enabled)}]]]})))
|
||||
{:type :alert
|
||||
:text (i18n/label :t/testnet-mode-enabled)
|
||||
:on-press #(rf/dispatch [:wallet/show-disable-testnet-mode-confirmation])}]]]})))
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
(:require
|
||||
[clojure.string :as string]
|
||||
[native-module.core :as native-module]
|
||||
[react-native.platform :as platform]
|
||||
[status-im.contexts.settings.wallet.data-store :as data-store]
|
||||
[status-im.contexts.settings.wallet.network-settings.testnet-mode.view :as testnet]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]
|
||||
|
@ -292,3 +294,15 @@
|
|||
|
||||
(rf/reg-event-fx :wallet/make-partially-operable-accounts-fully-operable
|
||||
make-partially-operable-accounts-fully-operable)
|
||||
|
||||
(rf/reg-event-fx :wallet/show-disable-testnet-mode-confirmation
|
||||
(fn [{:keys [db]} _]
|
||||
(let [theme (:theme db)
|
||||
blur? (and (not platform/android?) (= theme :dark))]
|
||||
{:fx [[:dispatch
|
||||
[:show-bottom-sheet
|
||||
{:content (fn [] [testnet/view
|
||||
{:enable? false
|
||||
:blur? blur?}])
|
||||
:shell? blur?
|
||||
:theme (when-not platform/android? theme)}]]]})))
|
||||
|
|
Loading…
Reference in New Issue