From d4a58ac2fb3cbccf3dc65d21c6547190d3f7303b Mon Sep 17 00:00:00 2001 From: Sean Hagstrom Date: Wed, 14 Aug 2024 12:17:15 +0100 Subject: [PATCH] chore: add beta tags to communities and chat home screen titles (#21018) * chore: add english translation for "Beta" * tweak: add beta tags to communities and chat home screen titles * fix: use smaller size for beta tags on chat and communities home screens --- .../common/home/title_column/view.cljs | 24 +++++++++++++++---- src/status_im/contexts/chat/home/view.cljs | 3 ++- .../contexts/communities/home/view.cljs | 3 ++- translations/en.json | 1 + 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/status_im/common/home/title_column/view.cljs b/src/status_im/common/home/title_column/view.cljs index 907314f59b..53b03c0335 100644 --- a/src/status_im/common/home/title_column/view.cljs +++ b/src/status_im/common/home/title_column/view.cljs @@ -3,14 +3,30 @@ [quo.core :as quo] [react-native.core :as rn] [status-im.common.home.title-column.style :as style] - [status-im.common.plus-button.view :as plus-button])) + [status-im.common.plus-button.view :as plus-button] + [utils.i18n :as i18n])) (defn view - [{:keys [label handler accessibility-label customization-color]}] + [{:keys [beta? label handler accessibility-label customization-color]}] [rn/view style/title-column - [rn/view {:flex 1} + [rn/view + {:style {:flex 1 + :align-items :center + :flex-direction :row}} [quo/text style/title-column-text - label]] + label] + (when beta? + [rn/view + {:style {:padding-top 6 + :padding-bottom 2}} + [quo/tag + {:accessibility-label :communities-chat-beta-tag + :size 24 + :type :label + :label (i18n/label :t/beta) + :labelled? true + :blurred? false}]])] + (when handler [plus-button/plus-button {:on-press handler diff --git a/src/status_im/contexts/chat/home/view.cljs b/src/status_im/contexts/chat/home/view.cljs index 07ee48ff6b..3f49aae168 100644 --- a/src/status_im/contexts/chat/home/view.cljs +++ b/src/status_im/contexts/chat/home/view.cljs @@ -118,7 +118,8 @@ (defn- banner-data [profile-link] {:title-props - {:label (i18n/label :t/messages) + {:beta? true + :label (i18n/label :t/messages) :handler #(rf/dispatch [:show-bottom-sheet {:content chat.actions.view/new-chat}]) :accessibility-label :new-chat-button} diff --git a/src/status_im/contexts/communities/home/view.cljs b/src/status_im/contexts/communities/home/view.cljs index e0573ae338..84f2cec6c7 100644 --- a/src/status_im/contexts/communities/home/view.cljs +++ b/src/status_im/contexts/communities/home/view.cljs @@ -64,7 +64,8 @@ (def ^:private banner-data {:title-props - {:label (i18n/label :t/communities) + {:beta? true + :label (i18n/label :t/communities) :handler (when config/fast-create-community-enabled? #(rf/dispatch [:show-bottom-sheet {:content actions.home-plus/view}])) :accessibility-label :new-communities-button} diff --git a/translations/en.json b/translations/en.json index 63ba3b1c62..b0b1c57edc 100644 --- a/translations/en.json +++ b/translations/en.json @@ -186,6 +186,7 @@ "balance": "Balance", "begin-set-up": "Begin setup", "below-base-fee": "max fee below base fee", + "beta": "Beta", "bio": "Bio", "bio-added": "Bio added", "bio-is-too-long": "Bio is too long",