resopnse icon in message

This commit is contained in:
Roman Volosovskyi 2016-06-10 16:08:21 +03:00
parent 0319f9334c
commit 13a40fae93
3 changed files with 18 additions and 8 deletions

View File

@ -146,6 +146,17 @@
:borderRadius 50
:backgroundColor (:color command)})
(defn command-image-view
[command]
{:position :absolute
:top 0
:right 0
:width 24
:height 24
:borderRadius 50
:backgroundColor (:color command)
:alignItems :center})
(def command-request-image
{:position :absolute
:top 9
@ -178,12 +189,9 @@
:color color-white})
(def command-image
{:position :absolute
:top 4
:right 0
{:margin-top 5
:width 12
:height 13})
(def command-text
(merge style-message-text
{:marginTop 8

View File

@ -62,11 +62,13 @@
[view (st/command-view command)
[text {:style st/command-name}
(str "!" (:name command))]]]
;; todo doesn't reflect design
[view (st/command-image-view command)
[image {:source {:uri (:icon command)}
:style st/command-image}]
:style st/command-image}]]
[text {:style st/command-text}
;; TODO isn't smart
(if (= (:command command) :keypair-password)
(if (= (:name command) "keypair-password")
"******"
content)]]))))

View File

@ -66,7 +66,7 @@
:keypair-password {:description "Keypair password"
:color "#7099e6"
:name "keypair-password"
:icon "http://localhost:8185/images/deliveryfailed.png"}}})
:icon "icon_lock_white"}}})
(defn parse-commands! [_ [identity file]]
(parse file