resopnse icon in message

Former-commit-id: 13a40fae93
This commit is contained in:
Roman Volosovskyi 2016-06-10 16:08:21 +03:00
parent 195482f431
commit 836ebc2a30
3 changed files with 18 additions and 8 deletions

View File

@ -146,6 +146,17 @@
:borderRadius 50 :borderRadius 50
:backgroundColor (:color command)}) :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 (def command-request-image
{:position :absolute {:position :absolute
:top 9 :top 9
@ -178,12 +189,9 @@
:color color-white}) :color color-white})
(def command-image (def command-image
{:position :absolute {:margin-top 5
:top 4
:right 0
:width 12 :width 12
:height 13}) :height 13})
(def command-text (def command-text
(merge style-message-text (merge style-message-text
{:marginTop 8 {:marginTop 8

View File

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

View File

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