fixed styles for generated names on desktop

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Andrey Shovkoplyas 2018-11-08 13:30:42 +01:00
parent dc4841f041
commit fcd5a16409
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
3 changed files with 13 additions and 7 deletions

View File

@ -8,7 +8,7 @@
[status-im.utils.http :as http])) [status-im.utils.http :as http]))
(defn format-author [from username] (defn format-author [from username]
(str (when username (str username " :: ")) (str (when username (str username " "))
(gfycat/generate-gfy from))) ; TODO: We defensively generate the name for now, to be revisited when new protocol is defined (gfycat/generate-gfy from))) ; TODO: We defensively generate the name for now, to be revisited when new protocol is defined
(defn format-reply-author [from username current-public-key] (defn format-reply-author [from username current-public-key]

View File

@ -37,9 +37,13 @@
:width 230}) :width 230})
(def author (def author
{:color colors/black {:color colors/black
:font-size 14 :font-weight "500"
:font-weight :bold}) :font-size 14})
(def author-generated
{:color colors/gray
:font-size 14})
(defn chat-box [height] (defn chat-box [height]
{:height (+ height (* 2 chat-vertical-padding)) {:height (+ height (* 2 chat-vertical-padding))

View File

@ -60,9 +60,11 @@
(views/defview message-author-name [{:keys [from]}] (views/defview message-author-name [{:keys [from]}]
(views/letsubs [incoming-name [:contacts/contact-name-by-identity from]] (views/letsubs [incoming-name [:contacts/contact-name-by-identity from]]
(let [name (chat-utils/format-author from incoming-name)] [react/view {:flex-direction :row}
[react/touchable-highlight {:on-press #(re-frame/dispatch [:show-contact-dialog from name (boolean incoming-name)])} (when incoming-name
[react/text {:style styles/author :font :medium} name]]))) [react/text {:style styles/author} incoming-name])
[react/text {:style styles/author-generated}
(str (when incoming-name " • ") (gfycat/generate-gfy from))]]))
(views/defview member-photo [from] (views/defview member-photo [from]
(views/letsubs [current-public-key [:account/public-key] (views/letsubs [current-public-key [:account/public-key]