mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-14 10:46:21 +00:00
This commit is contained in:
parent
5a9279b232
commit
eecd1d50e4
@ -19,8 +19,10 @@
|
|||||||
:text-color (colors/resolve-color :danger theme)}})
|
:text-color (colors/resolve-color :danger theme)}})
|
||||||
|
|
||||||
(defn- banner
|
(defn- banner
|
||||||
[{:keys [text type second-banner? colors-map]}]
|
[{:keys [text type second-banner? colors-map on-press]}]
|
||||||
[rn/view (when second-banner? {:style style/second-banner-wrapper})
|
[rn/pressable
|
||||||
|
{:on-press #(when on-press (on-press))
|
||||||
|
:style (when second-banner? style/second-banner-wrapper)}
|
||||||
[hole-view/hole-view
|
[hole-view/hole-view
|
||||||
{:style (style/hole-view (get-in colors-map [type :background-color]))
|
{:style (style/hole-view (get-in colors-map [type :background-color]))
|
||||||
:holes (if second-banner?
|
:holes (if second-banner?
|
||||||
|
@ -126,7 +126,8 @@
|
|||||||
[reanimated/view
|
[reanimated/view
|
||||||
{:style (reanimated/apply-animations-to-style
|
{:style (reanimated/apply-animations-to-style
|
||||||
{:opacity bg-opacity}
|
{: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
|
;; sheet
|
||||||
[gesture/gesture-detector {:gesture sheet-gesture}
|
[gesture/gesture-detector {:gesture sheet-gesture}
|
||||||
[reanimated/view
|
[reanimated/view
|
||||||
@ -138,7 +139,7 @@
|
|||||||
[quo/blur
|
[quo/blur
|
||||||
{:style style/shell-bg
|
{:style style/shell-bg
|
||||||
:blur-radius (or blur-radius 20)
|
:blur-radius (or blur-radius 20)
|
||||||
:blur-amount 32
|
:blur-amount 15
|
||||||
:blur-type :transparent
|
:blur-type :transparent
|
||||||
:overlay-color :transparent}]])
|
:overlay-color :transparent}]])
|
||||||
(when selected-item
|
(when selected-item
|
||||||
|
@ -252,4 +252,5 @@
|
|||||||
{:fx [[:dispatch
|
{:fx [[:dispatch
|
||||||
[:alert-banners/add
|
[:alert-banners/add
|
||||||
{:type :alert
|
{:type :alert
|
||||||
:text (i18n/label :t/testnet-mode-enabled)}]]]})))
|
:text (i18n/label :t/testnet-mode-enabled)
|
||||||
|
:on-press #(rf/dispatch [:wallet/show-disable-testnet-mode-confirmation])}]]]})))
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
(:require
|
(:require
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[native-module.core :as native-module]
|
[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.data-store :as data-store]
|
||||||
|
[status-im.contexts.settings.wallet.network-settings.testnet-mode.view :as testnet]
|
||||||
[taoensso.timbre :as log]
|
[taoensso.timbre :as log]
|
||||||
[utils.i18n :as i18n]
|
[utils.i18n :as i18n]
|
||||||
[utils.re-frame :as rf]
|
[utils.re-frame :as rf]
|
||||||
@ -292,3 +294,15 @@
|
|||||||
|
|
||||||
(rf/reg-event-fx :wallet/make-partially-operable-accounts-fully-operable
|
(rf/reg-event-fx :wallet/make-partially-operable-accounts-fully-operable
|
||||||
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…
x
Reference in New Issue
Block a user