From 13a40fae93e4de115a28742a5b1a96f5c3c791c8 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Fri, 10 Jun 2016 16:08:21 +0300 Subject: [PATCH] resopnse icon in message --- src/status_im/chat/styles/message.cljs | 16 ++++++++++++---- src/status_im/chat/views/message.cljs | 8 +++++--- src/status_im/commands/handlers.cljs | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/status_im/chat/styles/message.cljs b/src/status_im/chat/styles/message.cljs index 79e3cb24a7..2357e7e0f2 100644 --- a/src/status_im/chat/styles/message.cljs +++ b/src/status_im/chat/styles/message.cljs @@ -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 diff --git a/src/status_im/chat/views/message.cljs b/src/status_im/chat/views/message.cljs index b1215423f2..93c0cec826 100644 --- a/src/status_im/chat/views/message.cljs +++ b/src/status_im/chat/views/message.cljs @@ -62,11 +62,13 @@ [view (st/command-view command) [text {:style st/command-name} (str "!" (:name command))]]] - [image {:source {:uri (:icon command)} - :style st/command-image}] + ;; todo doesn't reflect design + [view (st/command-image-view command) + [image {:source {:uri (:icon command)} + :style st/command-image}]] [text {:style st/command-text} ;; TODO isn't smart - (if (= (:command command) :keypair-password) + (if (= (:name command) "keypair-password") "******" content)]])))) diff --git a/src/status_im/commands/handlers.cljs b/src/status_im/commands/handlers.cljs index 9caf18473b..d413a3b011 100644 --- a/src/status_im/commands/handlers.cljs +++ b/src/status_im/commands/handlers.cljs @@ -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