mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-13 02:04:28 +00:00
parent
ec469f59b1
commit
6921587e13
@ -82,8 +82,7 @@
|
|||||||
{:margin-left 48})
|
{:margin-left 48})
|
||||||
|
|
||||||
(def empty-transactions-title-container
|
(def empty-transactions-title-container
|
||||||
{:margin-bottom 32
|
{:align-items :center})
|
||||||
:align-items :center})
|
|
||||||
|
|
||||||
(defstyle transactions-title-container
|
(defstyle transactions-title-container
|
||||||
{:margin-left 16
|
{:margin-left 16
|
||||||
@ -164,3 +163,13 @@
|
|||||||
{:color common/color-light-blue
|
{:color common/color-light-blue
|
||||||
:android {:font-size 14}
|
:android {:font-size 14}
|
||||||
:ios {:font-size 17}})
|
:ios {:font-size 17}})
|
||||||
|
|
||||||
|
(def switch-account-container
|
||||||
|
{:align-items :center
|
||||||
|
:margin-bottom 10
|
||||||
|
:margin-top 10})
|
||||||
|
|
||||||
|
(defstyle switch-account-text
|
||||||
|
{:color common/color-light-blue
|
||||||
|
:android {:font-size 14}
|
||||||
|
:ios {:font-size 17}})
|
||||||
|
@ -95,8 +95,8 @@
|
|||||||
|
|
||||||
(defview transaction-list-item [{:keys [to value timestamp] :as transaction}]
|
(defview transaction-list-item [{:keys [to value timestamp] :as transaction}]
|
||||||
[recipient [:contact-by-address to]]
|
[recipient [:contact-by-address to]]
|
||||||
(let [eth-value (.fromWei js/Web3.prototype value "ether")
|
(let [eth-value (.fromWei js/Web3.prototype value "ether")
|
||||||
value (i18n/label-number eth-value)
|
value (i18n/label-number eth-value)
|
||||||
recipient-name (or (:name recipient) to)]
|
recipient-name (or (:name recipient) to)]
|
||||||
[touchable-highlight {:on-press #(rf/dispatch [:navigate-to-modal :transaction-details transaction])}
|
[touchable-highlight {:on-press #(rf/dispatch [:navigate-to-modal :transaction-details transaction])}
|
||||||
[view {:style st/transaction}
|
[view {:style st/transaction}
|
||||||
@ -117,8 +117,8 @@
|
|||||||
(fn [_ row-id _]
|
(fn [_ row-id _]
|
||||||
(when (< row-id (dec transactions-count))
|
(when (< row-id (dec transactions-count))
|
||||||
(list-item
|
(list-item
|
||||||
^{:key row-id}
|
^{:key row-id}
|
||||||
[common/separator {} st/transactions-list-separator]))))
|
[common/separator {} st/transactions-list-separator]))))
|
||||||
|
|
||||||
(defview unsigned-transactions []
|
(defview unsigned-transactions []
|
||||||
[all-transactions [:transactions]]
|
[all-transactions [:transactions]]
|
||||||
@ -146,13 +146,26 @@
|
|||||||
[text {:style st/network-title} "Ropsten"]])
|
[text {:style st/network-title} "Ropsten"]])
|
||||||
|
|
||||||
(defn options-btn []
|
(defn options-btn []
|
||||||
(let [options [{:value (fn []
|
[view {:style st/options-button}
|
||||||
(close-drawer)
|
[touchable-highlight
|
||||||
(rf/dispatch [:set-in [:profile-edit :name] nil])
|
{:on-press (fn []
|
||||||
(rf/dispatch [:navigate-to :accounts]))
|
(close-drawer)
|
||||||
:text (i18n/label :t/switch-users)}]]
|
(rf/dispatch [:set-in [:profile-edit :name] nil])
|
||||||
[view {:style st/options-button}
|
(rf/dispatch [:navigate-to :my-profile]))}
|
||||||
[context-menu/context-menu [icon :options_gray] options]]))
|
[view [icon :options_gray]]]])
|
||||||
|
|
||||||
|
(defn switch-account []
|
||||||
|
[view st/switch-account-container
|
||||||
|
[touchable-highlight
|
||||||
|
{:on-press (fn []
|
||||||
|
(close-drawer)
|
||||||
|
(rf/dispatch [:set-in [:profile-edit :name] nil])
|
||||||
|
(rf/dispatch [:navigate-to :accounts]))}
|
||||||
|
[view
|
||||||
|
[text {:style st/switch-account-text
|
||||||
|
:font (if platform/android? :medium :default)
|
||||||
|
:uppercase? platform/android?}
|
||||||
|
(i18n/label :t/switch-users)]]]])
|
||||||
|
|
||||||
(defn drawer []
|
(defn drawer []
|
||||||
(let [placeholder (gfycat/generate-gfy)]
|
(let [placeholder (gfycat/generate-gfy)]
|
||||||
@ -166,7 +179,9 @@
|
|||||||
[status-input]
|
[status-input]
|
||||||
[options-btn]]
|
[options-btn]]
|
||||||
[current-network]]
|
[current-network]]
|
||||||
[unsigned-transactions]]])))
|
[view
|
||||||
|
[unsigned-transactions]
|
||||||
|
[switch-account]]]])))
|
||||||
|
|
||||||
(defn drawer-view [items]
|
(defn drawer-view [items]
|
||||||
[drawer-layout {:drawerWidth 300
|
[drawer-layout {:drawerWidth 300
|
||||||
|
Loading…
x
Reference in New Issue
Block a user