Discover: Public chats preview style fixup

This commit is contained in:
Oskar Thorén 2017-10-24 15:07:46 +02:00 committed by Roman Volosovskyi
parent f37a5a39a7
commit 1e9ed89a7f
3 changed files with 16 additions and 16 deletions

View File

@ -26,6 +26,13 @@
:uppercase? (:uppercase? styles/subtitle-text-augment)}
(i18n/label action-kw)]]]])
;; TODO(oskarth): Reconcile with above fn
(defn title-no-action [label-kw]
[react/view styles/title
[react/text {:style styles/title-text
:font :medium}
(i18n/label label-kw)]])
(defn display-name [me? account-name contact-name name whisper-id]
(cond
me? account-name ;status by current user

View File

@ -29,8 +29,7 @@
(defstyle title-text
{:ios {:color styles/color-steel
:font-size 13
:letter-spacing 1}
:font-size 13}
:android {:color styles/color-gray2
:font-size 14}})
@ -326,8 +325,7 @@
:align-items :center})
(def public-chats-icon-text
{:font-size 25
:color styles/color-gray-transparent-light})
{:font-size 25})
(def public-chats-item-inner
{:flex (- 1 public-chats-icon-width-ratio)
@ -338,12 +336,9 @@
{:flex-direction :row})
(def public-chats-item-name-text
{:color styles/color-gray-transparent
:font-weight :bold
:font-size 16
{:font-size 16
:margin-left 5})
(def dapp-details-inner-container
{:flex-direction :column})

View File

@ -104,20 +104,20 @@
[empty-section :empty-recent :t/no-statuses-discovered :t/no-statuses-discovered-body])]))
;; TODO(oskarth): Figure out chat count how to get from public chat list subscription
;; TODO(oskarth): Move colors into common namespace
(def public-chats-mock-data
[{:name "Status"
:topic "status"
:count 25
:color "#B2F3E3"}
:color "#77DCC6"}
{:name "ETH news"
:topic "ethnews"
:count 12
:color "#F7A7E8"}
:color "#DC77CE"}
{:name "All about Ethereum"
:topic "ethereum"
:count 32
:color "#C1B8F0"}])
:color "#778CDC"}])
(defn navigate-to-public-chat [topic]
(re-frame/dispatch [:create-new-public-chat topic]))
@ -132,9 +132,7 @@
(-> name first str)]]]
[react/view styles/public-chats-item-inner
[react/view styles/public-chats-item-name-container
;; TODO(goranjovic) lightgray intentionally hardcoded while only a teaser
;; will be removed and properly styled when enabled
[vector-icons/icon :icons/public {:color "lightgray"}]
[vector-icons/icon :icons/public-chat]
[react/text {:font :medium
:style styles/public-chats-item-name-text}
name]]
@ -144,7 +142,7 @@
(defn public-chats-teaser []
[react/view styles/public-chats-container
[components/title :t/public-chats :t/soon #() false]
[components/title-no-action :t/public-chats]
[list/flat-list {:data public-chats-mock-data
:render-fn render-public-chats-item}]])