fix typo & postfixes

This commit is contained in:
Roman Volosovskyi 2016-05-08 23:13:24 +03:00
parent 27302d9027
commit 060a6d40d1
4 changed files with 23 additions and 29 deletions

View File

@ -41,7 +41,7 @@
[image {:source (if (s/blank? photo-path)
res/user-no-photo
{:uri photo-path})
:style st/chat-photo-st}]])
:style st/chat-photo}]])
(defn contact-online [{:keys [online]}]
(when online
@ -56,7 +56,7 @@
(str member " is typing")]]])
(defn typing-all []
[view st/typing-all-st
[view st/typing-all
(for [member ["Geoff" "Justas"]]
^{:key member} [typing member])])
@ -89,7 +89,7 @@
[view st/action-icon-row
[view st/action-icon-view
[icon icon-name icon-style]]
[view st/action-view-st
[view st/action-view
[text {:style st/action-title} title]
(when-let [subtitle subtitle]
[text {:style st/action-subtitle}
@ -126,7 +126,7 @@
:handler (fn [])}])]
[view st/actions-wrapper
[view st/actions-separator]
[view st/actions-view-st
[view st/actions-view
(for [action actions]
^{:key action} [action-view action])]])))

View File

@ -17,13 +17,6 @@
content-type-command
content-type-command-request]]))
;-------------------------------------------------------------------------------
;styles
;-------------------------------------------------------------------------------
;components
(defn message-date [{:keys [date]}]
[view {}
[view st/message-date-container
@ -34,7 +27,7 @@
[image {:source (if (s/blank? photo-path)
res/user-no-photo
{:uri photo-path})
:style st/contact-photo-st}]])
:style st/contact-photo}]])
(defn contact-online [{:keys [online]}]
(when online
@ -67,14 +60,14 @@
(let [commands @commands-atom
{:keys [command content]}
(parse-command-msg-content commands content)]
[view st/conetent-command-view
[view st/content-command-view
[view st/command-container
[view (st/command-view command)
[text {:style st/command-text}
[text {:style st/command-name}
(:text command)]]]
[image {:source (:icon command)
:style st/command-image}]
[text {:style st/command-text-st}
[text {:style st/command-text}
;; TODO isn't smart
(if (= (:command command) :keypair-password)
"******"
@ -107,7 +100,7 @@
(defn message-view
[message content]
[view (st/message-view-st message)
[view (st/message-view message)
#_(when incoming-group
[text {:style message-author-text}
"Justas"])
@ -123,7 +116,7 @@
(defn text-message
[{:keys [content] :as message}]
[message-view message
[text {:style (st/text-message-st message)}
[text {:style (st/text-message message)}
content]])
(defmethod message-content text-content-type
@ -187,7 +180,7 @@
(defn message-body
[{:keys [outgoing] :as message} content]
(let [delivery-status :seen]
[view (st/message-body-st message)
[view (st/message-body message)
content
(when (and outgoing delivery-status)
[message-delivery-status {:delivery-status delivery-status}])]))

View File

@ -43,7 +43,7 @@
{:paddingRight 8
:paddingLeft 8})
(defn message-body-st
(defn message-body
[{:keys [outgoing] :as message}]
(let [align (if outgoing :flex-end :flex-start)]
(merge message-body-base
@ -103,7 +103,7 @@
:color text2-color
:marginLeft 5})
(defn text-message-st
(defn text-message
[{:keys [outgoing group-chat incoming-group]}]
(merge style-message-text
{:marginTop (if incoming-group
@ -112,7 +112,7 @@
(when (and outgoing group-chat)
{:color color-white})))
(defn message-view-st
(defn message-view
[{:keys [content-type outgoing group-chat selected]}]
(merge {:borderRadius 14
:padding 12
@ -159,7 +159,7 @@
:height 14})
(def conetent-command-view
(def content-command-view
{:flexDirection :column})
(def command-container
@ -173,7 +173,7 @@
:paddingTop 3
:paddingHorizontal 12})
(def command-text
(def command-name
{:fontSize 12
:fontFamily font
:color color-white})
@ -185,7 +185,7 @@
:width 12
:height 13})
(def command-text-st
(def command-text
(merge style-message-text
{:marginTop 8
:marginHorizontal 0}))
@ -292,7 +292,7 @@
(def contact-photo-container
{:borderRadius 50})
(def contact-photo-st
(def contact-photo
{:borderRadius 50
:width 64
:height 64})

View File

@ -79,7 +79,7 @@
:height 1.5
:backgroundColor separator-color})
(def actions-view-st
(def actions-view
{:marginVertical 10})
(def action-icon-row
@ -91,7 +91,7 @@
{:alignItems :center
:justifyContent :center}))
(def action-view-st
(def action-view
{:flex 1
:alignItems :flex-start
:justifyContent :center})
@ -130,8 +130,9 @@
(def online-dot-left (merge online-dot {:left 3}))
(def online-dot-right (merge online-dot {:left 9}))
(def typing-all-st
(def typing-all
{:marginBottom 20})
(def typing-view
{:width 260
:marginTop 10
@ -152,7 +153,7 @@
:fontFamily font
:color text2-color})
(def chat-photo-st
(def chat-photo
{:borderRadius 50
:width 36
:height 36})