From 1e9ed89a7f9924567c9dd982ebdb06fed388a3bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Thor=C3=A9n?= Date: Tue, 24 Oct 2017 15:07:46 +0200 Subject: [PATCH] Discover: Public chats preview style fixup --- .../ui/screens/discover/components/views.cljs | 7 +++++++ src/status_im/ui/screens/discover/styles.cljs | 11 +++-------- src/status_im/ui/screens/discover/views.cljs | 14 ++++++-------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/status_im/ui/screens/discover/components/views.cljs b/src/status_im/ui/screens/discover/components/views.cljs index 8ba66a53ce..e4ff3d7570 100644 --- a/src/status_im/ui/screens/discover/components/views.cljs +++ b/src/status_im/ui/screens/discover/components/views.cljs @@ -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 diff --git a/src/status_im/ui/screens/discover/styles.cljs b/src/status_im/ui/screens/discover/styles.cljs index 2f9780cead..003ba63674 100644 --- a/src/status_im/ui/screens/discover/styles.cljs +++ b/src/status_im/ui/screens/discover/styles.cljs @@ -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}) diff --git a/src/status_im/ui/screens/discover/views.cljs b/src/status_im/ui/screens/discover/views.cljs index 4c83beaa84..b39ca72ece 100644 --- a/src/status_im/ui/screens/discover/views.cljs +++ b/src/status_im/ui/screens/discover/views.cljs @@ -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}]])