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"
|
||||
:error-incorrect-name "Please select another name"
|
||||
: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
|
||||
:image-source-title "Profile image"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
(ns status-im.ui.screens.profile.styles
|
||||
(:require [status-im.components.styles
|
||||
:as styles
|
||||
:refer
|
||||
[color-black
|
||||
color-gray4
|
||||
|
@ -190,3 +191,26 @@
|
|||
(def add-a-status
|
||||
(merge profile-status-text
|
||||
{: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}
|
||||
(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 []
|
||||
(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
|
||||
[status-bar]
|
||||
[my-profile-toolbar]
|
||||
(when (= network "testnet")
|
||||
[testnet-only])
|
||||
[react/scroll-view
|
||||
[react/view styles/profile-form
|
||||
[profile-badge current-account]
|
||||
|
@ -207,10 +219,13 @@
|
|||
status
|
||||
whisper-identity]
|
||||
:as contact} [:contact]
|
||||
chat-id [:get :current-chat-id]]
|
||||
chat-id [:get :current-chat-id]
|
||||
network [:get :network]]
|
||||
[react/view styles/profile
|
||||
[status-bar]
|
||||
[profile-toolbar contact]
|
||||
(when (= network "testnet")
|
||||
[testnet-only])
|
||||
[react/scroll-view
|
||||
[react/view styles/profile-form
|
||||
[profile-badge contact]
|
||||
|
|
Loading…
Reference in New Issue