parent
98321167fe
commit
48ef39ae33
|
@ -41,7 +41,7 @@
|
||||||
[image {:source (if (s/blank? photo-path)
|
[image {:source (if (s/blank? photo-path)
|
||||||
res/user-no-photo
|
res/user-no-photo
|
||||||
{:uri photo-path})
|
{:uri photo-path})
|
||||||
:style st/chat-photo-st}]])
|
:style st/chat-photo}]])
|
||||||
|
|
||||||
(defn contact-online [{:keys [online]}]
|
(defn contact-online [{:keys [online]}]
|
||||||
(when online
|
(when online
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
(str member " is typing")]]])
|
(str member " is typing")]]])
|
||||||
|
|
||||||
(defn typing-all []
|
(defn typing-all []
|
||||||
[view st/typing-all-st
|
[view st/typing-all
|
||||||
(for [member ["Geoff" "Justas"]]
|
(for [member ["Geoff" "Justas"]]
|
||||||
^{:key member} [typing member])])
|
^{:key member} [typing member])])
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
[view st/action-icon-row
|
[view st/action-icon-row
|
||||||
[view st/action-icon-view
|
[view st/action-icon-view
|
||||||
[icon icon-name icon-style]]
|
[icon icon-name icon-style]]
|
||||||
[view st/action-view-st
|
[view st/action-view
|
||||||
[text {:style st/action-title} title]
|
[text {:style st/action-title} title]
|
||||||
(when-let [subtitle subtitle]
|
(when-let [subtitle subtitle]
|
||||||
[text {:style st/action-subtitle}
|
[text {:style st/action-subtitle}
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
:handler (fn [])}])]
|
:handler (fn [])}])]
|
||||||
[view st/actions-wrapper
|
[view st/actions-wrapper
|
||||||
[view st/actions-separator]
|
[view st/actions-separator]
|
||||||
[view st/actions-view-st
|
[view st/actions-view
|
||||||
(for [action actions]
|
(for [action actions]
|
||||||
^{:key action} [action-view action])]])))
|
^{:key action} [action-view action])]])))
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,6 @@
|
||||||
content-type-command
|
content-type-command
|
||||||
content-type-command-request]]))
|
content-type-command-request]]))
|
||||||
|
|
||||||
;-------------------------------------------------------------------------------
|
|
||||||
;styles
|
|
||||||
|
|
||||||
|
|
||||||
;-------------------------------------------------------------------------------
|
|
||||||
;components
|
|
||||||
|
|
||||||
(defn message-date [{:keys [date]}]
|
(defn message-date [{:keys [date]}]
|
||||||
[view {}
|
[view {}
|
||||||
[view st/message-date-container
|
[view st/message-date-container
|
||||||
|
@ -34,7 +27,7 @@
|
||||||
[image {:source (if (s/blank? photo-path)
|
[image {:source (if (s/blank? photo-path)
|
||||||
res/user-no-photo
|
res/user-no-photo
|
||||||
{:uri photo-path})
|
{:uri photo-path})
|
||||||
:style st/contact-photo-st}]])
|
:style st/contact-photo}]])
|
||||||
|
|
||||||
(defn contact-online [{:keys [online]}]
|
(defn contact-online [{:keys [online]}]
|
||||||
(when online
|
(when online
|
||||||
|
@ -67,14 +60,14 @@
|
||||||
(let [commands @commands-atom
|
(let [commands @commands-atom
|
||||||
{:keys [command content]}
|
{:keys [command content]}
|
||||||
(parse-command-msg-content commands content)]
|
(parse-command-msg-content commands content)]
|
||||||
[view st/conetent-command-view
|
[view st/content-command-view
|
||||||
[view st/command-container
|
[view st/command-container
|
||||||
[view (st/command-view command)
|
[view (st/command-view command)
|
||||||
[text {:style st/command-text}
|
[text {:style st/command-name}
|
||||||
(:text command)]]]
|
(:text command)]]]
|
||||||
[image {:source (:icon command)
|
[image {:source (:icon command)
|
||||||
:style st/command-image}]
|
:style st/command-image}]
|
||||||
[text {:style st/command-text-st}
|
[text {:style st/command-text}
|
||||||
;; TODO isn't smart
|
;; TODO isn't smart
|
||||||
(if (= (:command command) :keypair-password)
|
(if (= (:command command) :keypair-password)
|
||||||
"******"
|
"******"
|
||||||
|
@ -107,7 +100,7 @@
|
||||||
|
|
||||||
(defn message-view
|
(defn message-view
|
||||||
[message content]
|
[message content]
|
||||||
[view (st/message-view-st message)
|
[view (st/message-view message)
|
||||||
#_(when incoming-group
|
#_(when incoming-group
|
||||||
[text {:style message-author-text}
|
[text {:style message-author-text}
|
||||||
"Justas"])
|
"Justas"])
|
||||||
|
@ -123,7 +116,7 @@
|
||||||
(defn text-message
|
(defn text-message
|
||||||
[{:keys [content] :as message}]
|
[{:keys [content] :as message}]
|
||||||
[message-view message
|
[message-view message
|
||||||
[text {:style (st/text-message-st message)}
|
[text {:style (st/text-message message)}
|
||||||
content]])
|
content]])
|
||||||
|
|
||||||
(defmethod message-content text-content-type
|
(defmethod message-content text-content-type
|
||||||
|
@ -187,7 +180,7 @@
|
||||||
(defn message-body
|
(defn message-body
|
||||||
[{:keys [outgoing] :as message} content]
|
[{:keys [outgoing] :as message} content]
|
||||||
(let [delivery-status :seen]
|
(let [delivery-status :seen]
|
||||||
[view (st/message-body-st message)
|
[view (st/message-body message)
|
||||||
content
|
content
|
||||||
(when (and outgoing delivery-status)
|
(when (and outgoing delivery-status)
|
||||||
[message-delivery-status {:delivery-status delivery-status}])]))
|
[message-delivery-status {:delivery-status delivery-status}])]))
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
{:paddingRight 8
|
{:paddingRight 8
|
||||||
:paddingLeft 8})
|
:paddingLeft 8})
|
||||||
|
|
||||||
(defn message-body-st
|
(defn message-body
|
||||||
[{:keys [outgoing] :as message}]
|
[{:keys [outgoing] :as message}]
|
||||||
(let [align (if outgoing :flex-end :flex-start)]
|
(let [align (if outgoing :flex-end :flex-start)]
|
||||||
(merge message-body-base
|
(merge message-body-base
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
:color text2-color
|
:color text2-color
|
||||||
:marginLeft 5})
|
:marginLeft 5})
|
||||||
|
|
||||||
(defn text-message-st
|
(defn text-message
|
||||||
[{:keys [outgoing group-chat incoming-group]}]
|
[{:keys [outgoing group-chat incoming-group]}]
|
||||||
(merge style-message-text
|
(merge style-message-text
|
||||||
{:marginTop (if incoming-group
|
{:marginTop (if incoming-group
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
(when (and outgoing group-chat)
|
(when (and outgoing group-chat)
|
||||||
{:color color-white})))
|
{:color color-white})))
|
||||||
|
|
||||||
(defn message-view-st
|
(defn message-view
|
||||||
[{:keys [content-type outgoing group-chat selected]}]
|
[{:keys [content-type outgoing group-chat selected]}]
|
||||||
(merge {:borderRadius 14
|
(merge {:borderRadius 14
|
||||||
:padding 12
|
:padding 12
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
:height 14})
|
:height 14})
|
||||||
|
|
||||||
|
|
||||||
(def conetent-command-view
|
(def content-command-view
|
||||||
{:flexDirection :column})
|
{:flexDirection :column})
|
||||||
|
|
||||||
(def command-container
|
(def command-container
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
:paddingTop 3
|
:paddingTop 3
|
||||||
:paddingHorizontal 12})
|
:paddingHorizontal 12})
|
||||||
|
|
||||||
(def command-text
|
(def command-name
|
||||||
{:fontSize 12
|
{:fontSize 12
|
||||||
:fontFamily font
|
:fontFamily font
|
||||||
:color color-white})
|
:color color-white})
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
:width 12
|
:width 12
|
||||||
:height 13})
|
:height 13})
|
||||||
|
|
||||||
(def command-text-st
|
(def command-text
|
||||||
(merge style-message-text
|
(merge style-message-text
|
||||||
{:marginTop 8
|
{:marginTop 8
|
||||||
:marginHorizontal 0}))
|
:marginHorizontal 0}))
|
||||||
|
@ -292,7 +292,7 @@
|
||||||
(def contact-photo-container
|
(def contact-photo-container
|
||||||
{:borderRadius 50})
|
{:borderRadius 50})
|
||||||
|
|
||||||
(def contact-photo-st
|
(def contact-photo
|
||||||
{:borderRadius 50
|
{:borderRadius 50
|
||||||
:width 64
|
:width 64
|
||||||
:height 64})
|
:height 64})
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
:height 1.5
|
:height 1.5
|
||||||
:backgroundColor separator-color})
|
:backgroundColor separator-color})
|
||||||
|
|
||||||
(def actions-view-st
|
(def actions-view
|
||||||
{:marginVertical 10})
|
{:marginVertical 10})
|
||||||
|
|
||||||
(def action-icon-row
|
(def action-icon-row
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
{:alignItems :center
|
{:alignItems :center
|
||||||
:justifyContent :center}))
|
:justifyContent :center}))
|
||||||
|
|
||||||
(def action-view-st
|
(def action-view
|
||||||
{:flex 1
|
{:flex 1
|
||||||
:alignItems :flex-start
|
:alignItems :flex-start
|
||||||
:justifyContent :center})
|
:justifyContent :center})
|
||||||
|
@ -130,8 +130,9 @@
|
||||||
(def online-dot-left (merge online-dot {:left 3}))
|
(def online-dot-left (merge online-dot {:left 3}))
|
||||||
(def online-dot-right (merge online-dot {:left 9}))
|
(def online-dot-right (merge online-dot {:left 9}))
|
||||||
|
|
||||||
(def typing-all-st
|
(def typing-all
|
||||||
{:marginBottom 20})
|
{:marginBottom 20})
|
||||||
|
|
||||||
(def typing-view
|
(def typing-view
|
||||||
{:width 260
|
{:width 260
|
||||||
:marginTop 10
|
:marginTop 10
|
||||||
|
@ -152,7 +153,7 @@
|
||||||
:fontFamily font
|
:fontFamily font
|
||||||
:color text2-color})
|
:color text2-color})
|
||||||
|
|
||||||
(def chat-photo-st
|
(def chat-photo
|
||||||
{:borderRadius 50
|
{:borderRadius 50
|
||||||
:width 36
|
:width 36
|
||||||
:height 36})
|
:height 36})
|
||||||
|
|
Loading…
Reference in New Issue