Tap on bubble to enable command input
This commit is contained in:
parent
49a5b82a8c
commit
5e38d5589a
|
@ -92,34 +92,35 @@
|
||||||
|
|
||||||
(defn message-content-command-request [content outgoing text-color background-color]
|
(defn message-content-command-request [content outgoing text-color background-color]
|
||||||
(let [{:keys [command content]} (commands/parse-command-request-msg-content content)]
|
(let [{:keys [command content]} (commands/parse-command-request-msg-content content)]
|
||||||
[view {:style {:marginTop 10}}
|
[touchable-highlight {:onPress (fn []
|
||||||
[view {:style (merge {:borderRadius 6
|
(set-chat-command command))}
|
||||||
:paddingVertical 12
|
[view {}
|
||||||
:paddingHorizontal 16}
|
[view {:style (merge {:marginTop 15
|
||||||
(if outgoing
|
:borderRadius 6
|
||||||
{:backgroundColor "#D3EEEF"}
|
:paddingVertical 12
|
||||||
{:backgroundColor background-color}))}
|
:paddingHorizontal 16}
|
||||||
[text {:style (merge {:fontSize 14
|
|
||||||
:fontFamily "Avenir-Roman"}
|
|
||||||
(if outgoing
|
(if outgoing
|
||||||
{:color "#4A5258"}
|
{:backgroundColor "#D3EEEF"}
|
||||||
{:color text-color}))}
|
{:backgroundColor background-color}))}
|
||||||
content]]
|
[text {:style (merge {:fontSize 14
|
||||||
[touchable-highlight {:style {:position "absolute"
|
:fontFamily "Avenir-Roman"}
|
||||||
:top -15
|
(if outgoing
|
||||||
:left 20}
|
{:color "#4A5258"}
|
||||||
:onPress (fn []
|
{:color text-color}))}
|
||||||
(set-chat-command command))}
|
content]]
|
||||||
[view {:style {:width 30
|
[view {:style {:position "absolute"
|
||||||
|
:top 0
|
||||||
|
:left 20
|
||||||
|
:width 30
|
||||||
:height 30
|
:height 30
|
||||||
:borderRadius 50
|
:borderRadius 50
|
||||||
:backgroundColor (:color command)}}
|
:backgroundColor (:color command)}}
|
||||||
[image {:source res/att
|
[image {:source res/att
|
||||||
:style {:width 17
|
:style {:width 17
|
||||||
:height 14
|
:height 14
|
||||||
:position "absolute"
|
:position "absolute"
|
||||||
:top 8
|
:top 8
|
||||||
:left 6}}]]]]))
|
:left 6}}]]]]))
|
||||||
|
|
||||||
(defn message-content [{:keys [content-type content outgoing text-color background-color]}]
|
(defn message-content [{:keys [content-type content outgoing text-color background-color]}]
|
||||||
(if (= content-type content-type-command-request)
|
(if (= content-type content-type-command-request)
|
||||||
|
|
Loading…
Reference in New Issue