update select user screen
This commit is contained in:
parent
15955ffb98
commit
6e42338fdc
|
@ -6,6 +6,7 @@
|
||||||
[status-im.utils.types :refer [json->clj]]
|
[status-im.utils.types :refer [json->clj]]
|
||||||
[status-im.persistence.simple-kv-store :as kv]
|
[status-im.persistence.simple-kv-store :as kv]
|
||||||
[status-im.protocol.state.storage :as storage]
|
[status-im.protocol.state.storage :as storage]
|
||||||
|
[status-im.utils.identicon :refer [identicon]]
|
||||||
[clojure.string :as str]))
|
[clojure.string :as str]))
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,7 +26,9 @@
|
||||||
public-key (:pubkey data)
|
public-key (:pubkey data)
|
||||||
address (:address data)
|
address (:address data)
|
||||||
account {:public-key public-key
|
account {:public-key public-key
|
||||||
:address address}]
|
:address address
|
||||||
|
:name address
|
||||||
|
:photo-path (identicon address)}]
|
||||||
(log/debug "Created account: " result)
|
(log/debug "Created account: " result)
|
||||||
(when (not (str/blank? public-key))
|
(when (not (str/blank? public-key))
|
||||||
(do
|
(do
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
[status-im.discovery.screen :refer [discovery]]
|
[status-im.discovery.screen :refer [discovery]]
|
||||||
[status-im.discovery.tag :refer [discovery-tag]]
|
[status-im.discovery.tag :refer [discovery-tag]]
|
||||||
[status-im.chat.screen :refer [chat]]
|
[status-im.chat.screen :refer [chat]]
|
||||||
|
[status-im.login.screen :refer [login]]
|
||||||
[status-im.users.screen :refer [users]]
|
[status-im.users.screen :refer [users]]
|
||||||
[status-im.chats-list.screen :refer [chats-list]]
|
[status-im.chats-list.screen :refer [chats-list]]
|
||||||
[status-im.new-group.screen :refer [new-group]]
|
[status-im.new-group.screen :refer [new-group]]
|
||||||
|
|
|
@ -17,8 +17,10 @@
|
||||||
:optinal true}}}
|
:optinal true}}}
|
||||||
{:name :accounts
|
{:name :accounts
|
||||||
:primaryKey :address
|
:primaryKey :address
|
||||||
:properties {:address "string"
|
:properties {:address "string"
|
||||||
:public-key "string"}}
|
:public-key "string"
|
||||||
|
:name "string"
|
||||||
|
:photo-path "string"}}
|
||||||
{:name :requests
|
{:name :requests
|
||||||
:properties {:message-id :string
|
:properties {:message-id :string
|
||||||
:chat-id :string
|
:chat-id :string
|
||||||
|
|
|
@ -39,9 +39,9 @@
|
||||||
|
|
||||||
(defview users []
|
(defview users []
|
||||||
[accounts [:get :accounts]]
|
[accounts [:get :accounts]]
|
||||||
(let [accounts (conj accounts {:name (label :t/add-account)
|
(let [accounts (conj (vals accounts) {:name (label :t/add-account)
|
||||||
:address "0x0"
|
:address "0x0"
|
||||||
:photo-path :icon_plus})]
|
:photo-path :icon_plus})]
|
||||||
[view st/screen-container
|
[view st/screen-container
|
||||||
[linear-gradient {:colors ["rgba(182, 116, 241, 1)" "rgba(107, 147, 231, 1)" "rgba(43, 171, 238, 1)"]
|
[linear-gradient {:colors ["rgba(182, 116, 241, 1)" "rgba(107, 147, 231, 1)" "rgba(43, 171, 238, 1)"]
|
||||||
:start [0, 0]
|
:start [0, 0]
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
(dispatch [:navigate-to :login address])
|
(dispatch [:navigate-to :login address])
|
||||||
(dispatch [:set-in [:login :address] address]))
|
(dispatch [:set-in [:login :address] address]))
|
||||||
|
|
||||||
(defview user-view [{:keys [address photo-path name ] :as account}]
|
(defview user-view [{:keys [address photo-path name] :as account}]
|
||||||
[current-account [:get :current-account]]
|
[current-account [:get :current-account]]
|
||||||
[touchable-highlight
|
[touchable-highlight
|
||||||
{:onPress #(on-press address)}
|
{:onPress #(on-press address)}
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
:style icon-plus}])]]
|
:style icon-plus}])]]
|
||||||
[view st/name-container
|
[view st/name-container
|
||||||
[text {:style st/name-text
|
[text {:style st/name-text
|
||||||
:numberOfLines 1} name]
|
:numberOfLines 1} (or name address)]
|
||||||
(when (not= address "0x0")
|
(when (not= address "0x0")
|
||||||
[text {:style st/address-text
|
[text {:style st/address-text
|
||||||
:numberOfLines 1} address])]
|
:numberOfLines 1} address])]
|
||||||
|
|
Loading…
Reference in New Issue