From 66dd3a2e82f9dbae2b3efd8b6dc3d389d9ba0076 Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Tue, 12 Sep 2017 14:59:35 +0300 Subject: [PATCH] implemented request transaction --- package-lock.json | 26 +++---- package.json | 2 +- resources/icons/share.svg | 5 ++ .../components/icons/vector_icons.cljs | 3 +- src/status_im/components/styles.cljs | 3 + .../components/toolbar_new/actions.cljs | 3 + .../components/toolbar_new/view.cljs | 7 +- src/status_im/translations/en.cljs | 4 ++ .../contacts/contact_list_modal/views.cljs | 20 +++--- src/status_im/ui/screens/db.cljs | 3 +- src/status_im/ui/screens/views.cljs | 2 + .../ui/screens/wallet/components/styles.cljs | 63 +++++++++++++++++ .../ui/screens/wallet/components/views.cljs | 40 +++++++++++ src/status_im/ui/screens/wallet/db.cljs | 4 +- src/status_im/ui/screens/wallet/events.cljs | 5 +- .../ui/screens/wallet/main/views.cljs | 6 +- .../ui/screens/wallet/navigation.cljs | 4 ++ .../ui/screens/wallet/request/db.cljs | 8 +++ .../ui/screens/wallet/request/events.cljs | 13 ++++ .../ui/screens/wallet/request/styles.cljs | 57 +++++++++++++++ .../ui/screens/wallet/request/views.cljs | 69 +++++++++++++++++++ .../ui/screens/wallet/send/styles.cljs | 12 +++- 22 files changed, 322 insertions(+), 37 deletions(-) create mode 100644 resources/icons/share.svg create mode 100644 src/status_im/ui/screens/wallet/components/styles.cljs create mode 100644 src/status_im/ui/screens/wallet/components/views.cljs create mode 100644 src/status_im/ui/screens/wallet/request/db.cljs create mode 100644 src/status_im/ui/screens/wallet/request/events.cljs create mode 100644 src/status_im/ui/screens/wallet/request/styles.cljs create mode 100644 src/status_im/ui/screens/wallet/request/views.cljs diff --git a/package-lock.json b/package-lock.json index 45adc35a19..ae171d15ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,11 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "Base64": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" + }, "abbrev": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", @@ -958,11 +963,6 @@ "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz", "integrity": "sha1-eAqZyE59YAJgNhURxId2E78k9rs=" }, - "Base64": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", - "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg=" - }, "base64-js": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", @@ -4940,9 +4940,9 @@ "integrity": "sha1-lpHS50yRBGvRiiAgtk4qPYvpQLI=" }, "react-native-qrcode": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/react-native-qrcode/-/react-native-qrcode-0.2.5.tgz", - "integrity": "sha1-DYHxnVlEsL/m7MNX/gqgmSnAEQU=", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/react-native-qrcode/-/react-native-qrcode-0.2.6.tgz", + "integrity": "sha1-3ZLxUcEYhgCSr5+lvAmV8vnd2xY=", "requires": { "create-react-class": "15.6.0", "prop-types": "15.5.10", @@ -6125,11 +6125,6 @@ } } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, "string-range": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/string-range/-/string-range-1.2.2.tgz", @@ -6150,6 +6145,11 @@ "resolved": "https://registry.npmjs.org/string.fromcodepoint/-/string.fromcodepoint-0.2.1.tgz", "integrity": "sha1-jZeDM8C8klOPUPOD5IiPPlYZ1lM=" }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", diff --git a/package.json b/package.json index 769afa19f9..3bb2f9bdad 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "react-native-mapbox-gl": "github:mapbox/react-native-mapbox-gl#d2a0a851d57672132344596b26a4776172370937", "react-native-orientation": "github:youennPennarun/react-native-orientation", "react-native-popup-menu": "^0.7.1", - "react-native-qrcode": "^0.2.2", + "react-native-qrcode": "^0.2.6", "react-native-randombytes": "^2.1.0", "react-native-sortable-listview": "^0.1.1", "react-native-splash-screen": "1.0.9", diff --git a/resources/icons/share.svg b/resources/icons/share.svg new file mode 100644 index 0000000000..541929b4e1 --- /dev/null +++ b/resources/icons/share.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/status_im/components/icons/vector_icons.cljs b/src/status_im/components/icons/vector_icons.cljs index e8b7b73ed5..89ef7c4cb7 100644 --- a/src/status_im/components/icons/vector_icons.cljs +++ b/src/status_im/components/icons/vector_icons.cljs @@ -63,7 +63,8 @@ :icons/commands-list (slurp-svg "./resources/icons/commands_list.svg") :icons/dropdown-up (slurp-svg "./resources/icons/dropdown_up.svg") :icons/dropdown (slurp-svg "./resources/icons/dropdown.svg") - :icons/grab (slurp-svg "./resources/icons/grab.svg")}) + :icons/grab (slurp-svg "./resources/icons/grab.svg") + :icons/share (slurp-svg "./resources/icons/share.svg")}) (defn normalize-property-name [n] (if (= n :icons/options) diff --git a/src/status_im/components/styles.cljs b/src/status_im/components/styles.cljs index dee2dae15c..8ff40b514e 100644 --- a/src/status_im/components/styles.cljs +++ b/src/status_im/components/styles.cljs @@ -27,7 +27,10 @@ (def color-steel "#838b91") (def color-white "white") (def color-white-transparent "#ffffff66") +(def color-white-transparent-1 "#f1f1f11a") (def color-white-transparent-2 "#fefefe21") +(def color-white-transparent-3 "#FFFFFF1A") +(def color-white-transparent-4 "#FFFFFF33") (def color-light-blue "#628fe3") (def color-light-blue-transparent "#628fe333") (def color-light-blue2 "#eff3fc") diff --git a/src/status_im/components/toolbar_new/actions.cljs b/src/status_im/components/toolbar_new/actions.cljs index f31218dbca..c6d1691d56 100644 --- a/src/status_im/components/toolbar_new/actions.cljs +++ b/src/status_im/components/toolbar_new/actions.cljs @@ -47,6 +47,9 @@ {:icon :icons/close :handler handler}) +(def default-close + (close default-handler)) + (defn close-white [handler] {:icon :icons/close :icon-opts {:color :white} diff --git a/src/status_im/components/toolbar_new/view.cljs b/src/status_im/components/toolbar_new/view.cljs index 890c517184..bee14ac57d 100644 --- a/src/status_im/components/toolbar_new/view.cljs +++ b/src/status_im/components/toolbar_new/view.cljs @@ -118,6 +118,7 @@ background-color custom-content hide-border? + modal? border-style title-style style]}] @@ -126,7 +127,7 @@ [rn/view tst/toolbar (when-not hide-nav? [rn/view (tst/toolbar-nav-actions-container actions) - [nav-button (or nav-action act/default-back)]]) + [nav-button (or nav-action (if modal? act/default-close act/default-back))]]) (or custom-content [rn/view {:style tst/toolbar-container} [rn/text {:style (merge tst/toolbar-title-text title-style) @@ -195,6 +196,7 @@ nav-action actions style + modal? on-search-submit] :as opts}] (let [toggle-search-fn #(do @@ -207,7 +209,8 @@ (rf/dispatch [:set-in [:toolbar-search :text] ""])))] [act/search-icon]) (into [(act/search #(toggle-search-fn search-key))] actions))] - [toolbar {:style style + [toolbar {:modal? modal? + :style style :nav-action (if show-search? (act/back #(toggle-search-fn nil)) nav-action) diff --git a/src/status_im/translations/en.cljs b/src/status_im/translations/en.cljs index ed95316754..1ae8e71250 100644 --- a/src/status_im/translations/en.cljs +++ b/src/status_im/translations/en.cljs @@ -345,6 +345,10 @@ :wallet-add-asset "Add asset" :wallet-total-value "Total value" :wallet-settings "Wallet Settings" + :request-transaction "Request Transaction" + :send-request "Send request" + :share "Share" + :currency "Currency" :transactions "Transactions" :transactions-sign "Sign" :transactions-sign-all "Sign all" diff --git a/src/status_im/ui/screens/contacts/contact_list_modal/views.cljs b/src/status_im/ui/screens/contacts/contact_list_modal/views.cljs index cefb58f8e2..a54dd78f81 100644 --- a/src/status_im/ui/screens/contacts/contact_list_modal/views.cljs +++ b/src/status_im/ui/screens/contacts/contact_list_modal/views.cljs @@ -19,7 +19,8 @@ (letsubs [show-search [:get-in [:toolbar-search :show]] search-text [:get-in [:toolbar-search :text]]] (toolbar-with-search - {:show-search? (= show-search :contact-list) + {:modal? true + :show-search? (= show-search :contact-list) :search-text search-text :search-key :contact-list :title (label :t/contacts) @@ -61,20 +62,21 @@ params [:get :contacts/click-params]] [drawer-view [view {:flex 1} - [status-bar {:type :modal}] + [status-bar] [contact-list-modal-toolbar] [list-view {:dataSource (lw/to-datasource contacts) :enableEmptySections true :renderRow (render-row click-handler action params) :bounces false :keyboardShouldPersistTaps :always - :renderHeader #(list-item - [view - [actions-view action click-handler] - [common/bottom-shadow] - [common/form-title (label :t/choose-from-contacts) - {:count-value (count contacts)}] - [common/list-header]]) + :renderHeader (when-not (:hide-actions? params) + #(list-item + [view + [actions-view action click-handler] + [common/bottom-shadow] + [common/form-title (label :t/choose-from-contacts) + {:count-value (count contacts)}] + [common/list-header]])) :renderFooter #(list-item [view [common/list-footer] [common/bottom-shadow]]) diff --git a/src/status_im/ui/screens/db.cljs b/src/status_im/ui/screens/db.cljs index 998cd1c9a3..a51aa85f12 100644 --- a/src/status_im/ui/screens/db.cljs +++ b/src/status_im/ui/screens/db.cljs @@ -102,7 +102,8 @@ :accounts/login :my-profile/drawer :my-profile/profile - :my-profile/default-name] + :my-profile/default-name + :wallet/request-transaction] :opt-un [::current-public-key ::modal diff --git a/src/status_im/ui/screens/views.cljs b/src/status_im/ui/screens/views.cljs index 7648893cca..03cd3b5bd0 100644 --- a/src/status_im/ui/screens/views.cljs +++ b/src/status_im/ui/screens/views.cljs @@ -43,6 +43,7 @@ [status-im.ui.screens.profile.qr-code.views :refer [qr-code-view]] [status-im.ui.screens.wallet.send.views :refer [send-transaction]] + [status-im.ui.screens.wallet.request.views :refer [request-transaction]] [status-im.ui.screens.wallet.wallet-list.views :refer [wallet-list-screen]] [status-im.ui.screens.wallet.transactions.views :as wallet-transactions])) @@ -63,6 +64,7 @@ (:wallet :chat-list :discover :contact-list) main-tabs :wallet-list wallet-list-screen :wallet-send-transaction send-transaction + :wallet-request-transaction request-transaction :discover-search-results discover-search-results :new-chat new-chat :new-group new-group diff --git a/src/status_im/ui/screens/wallet/components/styles.cljs b/src/status_im/ui/screens/wallet/components/styles.cljs new file mode 100644 index 0000000000..3e2d16a262 --- /dev/null +++ b/src/status_im/ui/screens/wallet/components/styles.cljs @@ -0,0 +1,63 @@ +(ns status-im.ui.screens.wallet.components.styles + (:require-macros [status-im.utils.styles :refer [defnstyle defstyle]]) + (:require [status-im.components.styles :as styles])) + +(def text-input + {:color :white + :padding-left 14 + :padding-right 14 + :font-size 15 + :padding-bottom 0 + :padding-top 0 + :height 52 + :letter-spacing -0.2}) + +(def label + {:color :white + :font-size 14 + :line-height 16 + :letter-spacing -0.2}) + +(defstyle amount-container + {:margin-top 8 + :height 52 + :background-color styles/color-white-transparent-3 + :ios {:border-radius 8} + :android {:border-radius 4}}) + +(def network + {:color :white + :font-size 13 + :letter-spacing -0.2}) + +(def network-container + {:padding-horizontal 10 + :height 27 + :border-radius 100 + :border-width 1 + :border-color styles/color-white-transparent-4 + :align-items :center + :justify-content :center}) + +(defstyle currency-container + {:margin-top 8 + :height 52 + :background-color styles/color-white-transparent-3 + :justify-content :center + :padding 14 + :ios {:border-radius 8} + :android {:border-radius 4}}) + +(defstyle wallet-container + {:margin-top 8 + :height 52 + :background-color styles/color-white-transparent-3 + :justify-content :center + :padding 14 + :ios {:border-radius 8} + :android {:border-radius 4}}) + +(def value + {:color :white + :font-size 15 + :letter-spacing -0.2}) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/components/views.cljs b/src/status_im/ui/screens/wallet/components/views.cljs new file mode 100644 index 0000000000..85c4c2f5ba --- /dev/null +++ b/src/status_im/ui/screens/wallet/components/views.cljs @@ -0,0 +1,40 @@ +(ns status-im.ui.screens.wallet.components.views + (:require [status-im.components.react :as react] + [status-im.ui.screens.wallet.components.styles :as styles] + [status-im.i18n :as i18n])) + +(defn amount-input [& [{:keys [input-options style]}]] + [react/view {:flex 1} + [react/text {:style styles/label} (i18n/label :t/amount)] + [react/view (merge styles/amount-container style) + [react/text-input + (merge + {:keyboard-type :numeric + :max-length 15 + :placeholder "0.000" + :placeholder-text-color "#ffffff66" + :selection-color :white + :style styles/text-input} + input-options)]]]) + +;;TODO (andrey) this should be choose component with the list of currencies +(defn choose-currency [& [style]] + [react/view + [react/text {:style styles/label} (i18n/label :t/currency)] + [react/view (merge styles/currency-container + style) + [react/text {:style styles/value} "ETH"]]]) + +;;TODO (andrey) this should be choose component with the list of wallets +(defn choose-wallet [& [style]] + [react/view + [react/text {:style styles/label} (i18n/label :t/wallet)] + [react/view (merge styles/wallet-container + style) + [react/text {:style styles/value} "Main wallet"]]]) + +(defn network-label + ([n] (network-label [{} n])) + ([style n] [react/view (merge styles/network-container + style) + [react/text {:style styles/network} n]])) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/db.cljs b/src/status_im/ui/screens/wallet/db.cljs index 05416c5b88..8158f9a2a5 100644 --- a/src/status_im/ui/screens/wallet/db.cljs +++ b/src/status_im/ui/screens/wallet/db.cljs @@ -1,6 +1,6 @@ (ns status-im.ui.screens.wallet.db - (:require [cljs.spec.alpha :as spec])) - + (:require [cljs.spec.alpha :as spec] + status-im.ui.screens.wallet.request.db)) ;; (angusiguess) If we add more error types we can treat them as 'one-of' the following (spec/def :wallet/error #{:error}) diff --git a/src/status_im/ui/screens/wallet/events.cljs b/src/status_im/ui/screens/wallet/events.cljs index cadef25b11..017e654903 100644 --- a/src/status_im/ui/screens/wallet/events.cljs +++ b/src/status_im/ui/screens/wallet/events.cljs @@ -8,7 +8,8 @@ [status-im.native-module.core :as status] [status-im.ui.screens.wallet.navigation] - [taoensso.timbre :as log])) + [taoensso.timbre :as log] + status-im.ui.screens.wallet.request.events)) (defn get-balance [{:keys [web3 account-id on-success on-error]}] (if (and web3 account-id) @@ -128,4 +129,4 @@ (log/debug "Unable to get prices: " err) (-> db (assoc-error-message :prices-update err) - (assoc :prices-loading? false)))) + (assoc :prices-loading? false)))) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/main/views.cljs b/src/status_im/ui/screens/wallet/main/views.cljs index 4403c76595..d4e2f0a74f 100644 --- a/src/status_im/ui/screens/wallet/main/views.cljs +++ b/src/status_im/ui/screens/wallet/main/views.cljs @@ -73,7 +73,7 @@ :on-press show-not-implemented! ;; #(rf/dispatch [:navigate-to :wallet-send-transaction]) :disabled? (not config/wallet-wip-enabled?)} {:text (i18n/label :t/wallet-request) - :on-press show-not-implemented! ;; #(rf/dispatch [:navigate-to :wallet-request-transaction]) + :on-press #(rf/dispatch [:navigate-to :wallet-request-transaction]) :disabled? (not config/wallet-wip-enabled?)} {:text (i18n/label :t/wallet-exchange) :disabled? true}]]]]) @@ -102,7 +102,7 @@ [react/view {:style wallet.styles/asset-item-value-container} [react/text {:style wallet.styles/asset-item-value} (str amount)] [react/text {:style wallet.styles/asset-item-currency - :uppercase? true} + :uppercase? true} id]]]]) (defn render-add-asset-fn [{:keys [id currency amount]}] @@ -127,7 +127,7 @@ :renderItem (list/wrap-render-fn render-add-asset-fn)}] :render-section-header-fn #() :on-refresh #(rf/dispatch [:update-wallet]) - :refreshing (or prices-loading? balance-loading?)}]])) + :refreshing (boolean (or prices-loading? balance-loading?))}]])) (defview wallet [] (letsubs [eth-balance [:eth-balance] diff --git a/src/status_im/ui/screens/wallet/navigation.cljs b/src/status_im/ui/screens/wallet/navigation.cljs index 9f3cbf701f..8388a02b23 100644 --- a/src/status_im/ui/screens/wallet/navigation.cljs +++ b/src/status_im/ui/screens/wallet/navigation.cljs @@ -11,3 +11,7 @@ [db _] (re-frame/dispatch [:update-transactions]) db) + +(defmethod navigation/preload-data! :wallet-request-transaction + [db _] + (dissoc db :wallet/request-transaction)) diff --git a/src/status_im/ui/screens/wallet/request/db.cljs b/src/status_im/ui/screens/wallet/request/db.cljs new file mode 100644 index 0000000000..368274149c --- /dev/null +++ b/src/status_im/ui/screens/wallet/request/db.cljs @@ -0,0 +1,8 @@ +(ns status-im.ui.screens.wallet.request.db + (:require-macros [status-im.utils.db :refer [allowed-keys]]) + (:require [cljs.spec.alpha :as spec])) + +(spec/def ::amount (spec/nilable string?)) + +(spec/def :wallet/request-transaction (allowed-keys + :opt-un [::amount])) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/request/events.cljs b/src/status_im/ui/screens/wallet/request/events.cljs new file mode 100644 index 0000000000..10f41f0753 --- /dev/null +++ b/src/status_im/ui/screens/wallet/request/events.cljs @@ -0,0 +1,13 @@ +(ns status-im.ui.screens.wallet.request.events + (:require + [re-frame.core :as re-frame :refer [dispatch reg-fx]] + [status-im.utils.handlers :as handlers])) + +(handlers/register-handler-fx + :wallet-send-request + (fn [{{:wallet/keys [request-transaction]} :db} [_ {:keys [whisper-identity] :as contact}]] + {:dispatch-n [[:navigate-back] + [:navigate-to-clean :chat-list] + [:chat-with-command whisper-identity :request + {:contact contact + :amount (:amount request-transaction)}]]})) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/request/styles.cljs b/src/status_im/ui/screens/wallet/request/styles.cljs new file mode 100644 index 0000000000..5b0c5ffcbd --- /dev/null +++ b/src/status_im/ui/screens/wallet/request/styles.cljs @@ -0,0 +1,57 @@ +(ns status-im.ui.screens.wallet.request.styles + (:require [status-im.components.styles :as styles])) + +(def main-container + {:flex 1}) + +(def network-label + {:margin-top 27}) + +(def network-container + {:flex 1 + :align-items :center}) + +(def qr-container + {:margin-top 16}) + +(def choose-wallet-container + {:margin-top 27 + :margin-horizontal 15}) + +(def amount-container + {:margin-top 16 + :margin-horizontal 15 + :flex-direction :row}) + +(def choose-currency-container + {:margin-left 8}) + +(def choose-currency + {:width 116}) + +(def separator + {:height 1 + :margin-horizontal 15 + :background-color styles/color-white-transparent-1 + :margin-top 16}) + +(def buttons-container + {:margin-vertical 15 + :padding-horizontal 12 + :flex-direction :row + :align-items :center}) + +(def share-icon-container + {:margin-right 8}) + +(def forward-icon-container + {:margin-left 8}) + +(def button-text + {:color :white + :font-size 15 + :letter-spacing -0.2}) + +(def send-request-container + {:flex-direction :row + :align-items :center}) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/request/views.cljs b/src/status_im/ui/screens/wallet/request/views.cljs new file mode 100644 index 0000000000..dcc6c62595 --- /dev/null +++ b/src/status_im/ui/screens/wallet/request/views.cljs @@ -0,0 +1,69 @@ +(ns status-im.ui.screens.wallet.request.views + (:require-macros [status-im.utils.views :as views]) + (:require + [re-frame.core :as re-frame] + [status-im.components.react :as react] + [status-im.components.qr-code :as components.qr-code] + [status-im.components.toolbar-new.actions :as actions] + [status-im.components.toolbar-new.view :as toolbar] + [status-im.components.status-bar :as status-bar] + [status-im.ui.screens.wallet.send.styles :as wallet-styles] + [status-im.components.icons.vector-icons :as vi] + [status-im.ui.screens.wallet.components.views :as components] + [status-im.ui.screens.wallet.request.styles :as styles] + [status-im.i18n :as i18n] + [status-im.utils.platform :as platform])) + +(defn toolbar-view [] + [toolbar/toolbar2 {:style wallet-styles/toolbar :hide-border? true} + [toolbar/nav-button (actions/back-white actions/default-handler)] + [toolbar/content-title {:color :white} (i18n/label :t/request-transaction)]]) + +(defn send-request [] + (re-frame/dispatch [:navigate-to-modal + :contact-list-modal + {:handler #(re-frame/dispatch [:wallet-send-request %1]) + :action :request + :params {:hide-actions? true}}])) + +(views/defview qr-code [] + (views/letsubs [account [:get-current-account]] + [components.qr-code/qr-code + {:value (.stringify js/JSON (clj->js {:address (:address account) + :amount 0})) + :bgColor :white + :fgColor "#4360df" + :size 256}])) + +(views/defview request-transaction [] + [react/keyboard-avoiding-view {:style wallet-styles/wallet-modal-container} + [status-bar/status-bar {:type :wallet}] + [toolbar-view] + [react/view styles/main-container + [react/scroll-view + [react/view styles/network-container + ;;TODO (andrey) name of active network should be used + [components/network-label styles/network-label "Testnet"] + [react/view styles/qr-container + [qr-code]]]] + [react/view styles/choose-wallet-container + [components/choose-wallet]] + [react/view styles/amount-container + [components/amount-input + {:input-options {:on-change-text + #(re-frame/dispatch [:set-in [:wallet/request-transaction :amount] %])}}] + [react/view styles/choose-currency-container + [components/choose-currency styles/choose-currency]]]] + [react/view styles/separator] + [react/view styles/buttons-container + [vi/icon :icons/share {:color :white :container-style styles/share-icon-container}] + [react/text {:style styles/button-text + :font (if platform/android? :medium :default) + :uppercase? (get-in platform/platform-specific [:uppercase?])} (i18n/label :t/share)] + [react/view {:flex 1}] + [react/touchable-highlight {:on-press send-request} + [react/view styles/send-request-container + [react/text {:style styles/button-text + :font (if platform/android? :medium :default) + :uppercase? (get-in platform/platform-specific [:uppercase?])} (i18n/label :t/send-request)] + [vi/icon :icons/forward {:color :white :container-style styles/forward-icon-container}]]]]]) \ No newline at end of file diff --git a/src/status_im/ui/screens/wallet/send/styles.cljs b/src/status_im/ui/screens/wallet/send/styles.cljs index 69bd8531b7..91345cc568 100644 --- a/src/status_im/ui/screens/wallet/send/styles.cljs +++ b/src/status_im/ui/screens/wallet/send/styles.cljs @@ -1,13 +1,19 @@ (ns status-im.ui.screens.wallet.send.styles + (:require-macros [status-im.utils.styles :refer [defnstyle defstyle]]) (:require [status-im.components.styles :as styles])) (def wallet-container {:flex 1 :background-color styles/color-white}) -(def toolbar - {:background-color styles/color-blue5 - :elevation 0}) +(def wallet-modal-container + {:flex 1 + :background-color styles/color-blue4}) + +(defstyle toolbar + {:ios {:background-color styles/color-blue4} + :android {:background-color styles/color-blue5 + :elevation 0}}) (def toolbar-title-container {:flex 1