From 55caf0230e4d7789dfe67ebe550bd69239e82e3b Mon Sep 17 00:00:00 2001 From: Icaro Motta Date: Fri, 27 Jan 2023 15:24:30 -0300 Subject: [PATCH] Update empty state (#14916) Fixes #14899 Updates the empty states according to latest design in Figma. --- .../contexts/activity_center/style.cljs | 12 +++++++- .../contexts/activity_center/view.cljs | 29 ++++++++++++------- translations/en.json | 6 ++-- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/status_im2/contexts/activity_center/style.cljs b/src/status_im2/contexts/activity_center/style.cljs index 4a1ba1c40d..294958f00d 100644 --- a/src/status_im2/contexts/activity_center/style.cljs +++ b/src/status_im2/contexts/activity_center/style.cljs @@ -47,4 +47,14 @@ :padding-vertical 12}) (def empty-title - {:padding-bottom 2}) + {:padding-bottom 2 + :color colors/white}) + +(def empty-subtitle + {:color colors/white}) + +(def empty-rectangle-placeholder + {:width 120 + :height 120 + :background-color colors/danger-50 + :margin-bottom 20}) diff --git a/src/status_im2/contexts/activity_center/view.cljs b/src/status_im2/contexts/activity_center/view.cljs index e9204b9bde..08d966e3b5 100644 --- a/src/status_im2/contexts/activity_center/view.cljs +++ b/src/status_im2/contexts/activity_center/view.cljs @@ -29,17 +29,24 @@ (defn empty-tab [] - [rn/view - {:style style/empty-container - :accessibility-label :empty-notifications} - [quo/icon :i/placeholder] - [quo/text - {:size :paragraph-1 - :style style/empty-title - :weight :semi-bold} - (i18n/label :t/empty-notifications-title)] - [quo/text {:size :paragraph-2} - (i18n/label :t/empty-notifications-subtitle)]]) + (let [filter-status (rf/sub [:activity-center/filter-status])] + [rn/view + {:style style/empty-container + :accessibility-label :empty-notifications} + [rn/view {:style style/empty-rectangle-placeholder}] + [quo/text + {:size :paragraph-1 + :style style/empty-title + :weight :semi-bold} + (i18n/label (if (= :unread filter-status) + :t/empty-notifications-title-unread + :t/empty-notifications-title-read))] + [quo/text + {:size :paragraph-2 + :style style/empty-subtitle} + (i18n/label (if (= :unread filter-status) + :t/empty-notifications-subtitle-unread + :t/empty-notifications-subtitle-read))]])) (defn tabs [] diff --git a/translations/en.json b/translations/en.json index ba19feceaf..9bac5f667f 100644 --- a/translations/en.json +++ b/translations/en.json @@ -1909,8 +1909,10 @@ "bold": "Bold", "italic": "Italic", "strikethrough": "Strikethrough", - "empty-notifications-title": "No notifications", - "empty-notifications-subtitle": "Your notifications will be here", + "empty-notifications-title-unread": "You're up to date", + "empty-notifications-subtitle-unread": "Unread notifications will be here", + "empty-notifications-title-read": "No notifications", + "empty-notifications-subtitle-read": "Your notifications will be here", "add-text": "Add text", "send": "Send", "unmute-group": "Unmute group",