mirror of
https://github.com/status-im/status-react.git
synced 2025-01-12 03:54:32 +00:00
1628: Add Testnet warning, so no real ether or SNT is sent to the app
This commit is contained in:
parent
ed3597fd7c
commit
7875e11ea0
@ -97,6 +97,8 @@
|
|||||||
:share-qr "Share QR"
|
:share-qr "Share QR"
|
||||||
:error-incorrect-name "Please select another name"
|
:error-incorrect-name "Please select another name"
|
||||||
:error-incorrect-email "Incorrect e-mail"
|
:error-incorrect-email "Incorrect e-mail"
|
||||||
|
:profile-testnet-icon "Testnet"
|
||||||
|
:profile-testnet-text "Ropsten Testnet Only. Please do not send real ETH or SNT to your address"
|
||||||
|
|
||||||
;;make_photo
|
;;make_photo
|
||||||
:image-source-title "Profile image"
|
:image-source-title "Profile image"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
(ns status-im.ui.screens.profile.styles
|
(ns status-im.ui.screens.profile.styles
|
||||||
(:require [status-im.components.styles
|
(:require [status-im.components.styles
|
||||||
|
:as styles
|
||||||
:refer
|
:refer
|
||||||
[color-black
|
[color-black
|
||||||
color-gray4
|
color-gray4
|
||||||
@ -190,3 +191,26 @@
|
|||||||
(def add-a-status
|
(def add-a-status
|
||||||
(merge profile-status-text
|
(merge profile-status-text
|
||||||
{:color color-gray4}))
|
{:color color-gray4}))
|
||||||
|
|
||||||
|
(def testnet-only-container
|
||||||
|
{:background-color styles/color-dark
|
||||||
|
:flex-direction :row
|
||||||
|
:padding 14})
|
||||||
|
|
||||||
|
(def testnet-only-text
|
||||||
|
{:flex 1
|
||||||
|
:color color-white
|
||||||
|
:margin-left 12})
|
||||||
|
|
||||||
|
(def testnet-icon
|
||||||
|
{:border-radius 15
|
||||||
|
:border-width 1
|
||||||
|
:border-color styles/color-gray
|
||||||
|
:height 27
|
||||||
|
:width 65
|
||||||
|
:flex-direction :row
|
||||||
|
:align-items :center
|
||||||
|
:justify-content :center})
|
||||||
|
|
||||||
|
(def testnet-icon-text
|
||||||
|
{:color color-white})
|
||||||
|
@ -182,11 +182,23 @@
|
|||||||
[react/text {:style styles/profile-status-text}
|
[react/text {:style styles/profile-status-text}
|
||||||
(colorize-status-hashtags status)]]]])])
|
(colorize-status-hashtags status)]]]])])
|
||||||
|
|
||||||
|
|
||||||
|
(defn testnet-only []
|
||||||
|
[react/view styles/testnet-only-container
|
||||||
|
[react/view styles/testnet-icon
|
||||||
|
[react/text {:style styles/testnet-icon-text}
|
||||||
|
(label :t/profile-testnet-icon)]]
|
||||||
|
[react/text {:style styles/testnet-only-text}
|
||||||
|
(label :t/profile-testnet-text)]])
|
||||||
|
|
||||||
(defview my-profile []
|
(defview my-profile []
|
||||||
(letsubs [{:keys [status] :as current-account} [:get-current-account]]
|
(letsubs [{:keys [status] :as current-account} [:get-current-account]
|
||||||
|
network [:get :network]]
|
||||||
[react/view styles/profile
|
[react/view styles/profile
|
||||||
[status-bar]
|
[status-bar]
|
||||||
[my-profile-toolbar]
|
[my-profile-toolbar]
|
||||||
|
(when (= network "testnet")
|
||||||
|
[testnet-only])
|
||||||
[react/scroll-view
|
[react/scroll-view
|
||||||
[react/view styles/profile-form
|
[react/view styles/profile-form
|
||||||
[profile-badge current-account]
|
[profile-badge current-account]
|
||||||
@ -207,10 +219,13 @@
|
|||||||
status
|
status
|
||||||
whisper-identity]
|
whisper-identity]
|
||||||
:as contact} [:contact]
|
:as contact} [:contact]
|
||||||
chat-id [:get :current-chat-id]]
|
chat-id [:get :current-chat-id]
|
||||||
|
network [:get :network]]
|
||||||
[react/view styles/profile
|
[react/view styles/profile
|
||||||
[status-bar]
|
[status-bar]
|
||||||
[profile-toolbar contact]
|
[profile-toolbar contact]
|
||||||
|
(when (= network "testnet")
|
||||||
|
[testnet-only])
|
||||||
[react/scroll-view
|
[react/scroll-view
|
||||||
[react/view styles/profile-form
|
[react/view styles/profile-form
|
||||||
[profile-badge contact]
|
[profile-badge contact]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user