From 396b9345a6388bb6f6348f91eb3e6dcb006e5cad Mon Sep 17 00:00:00 2001 From: Jamie Caprani Date: Tue, 1 Aug 2023 14:28:10 +0100 Subject: [PATCH] fix: onboarding customization colors --- src/status_im2/common/home/view.cljs | 2 +- .../contexts/chat/composer/reply/view.cljs | 10 ++++------ .../onboarding/enable_notifications/view.cljs | 2 +- src/status_im2/contexts/onboarding/welcome/view.cljs | 2 +- .../contexts/shell/activity_center/header/view.cljs | 2 ++ src/status_im2/subs/onboarding.cljs | 12 ++++++++++++ src/status_im2/subs/root.cljs | 3 ++- 7 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 src/status_im2/subs/onboarding.cljs diff --git a/src/status_im2/common/home/view.cljs b/src/status_im2/common/home/view.cljs index a88667a2f126..118e6eedad1b 100644 --- a/src/status_im2/common/home/view.cljs +++ b/src/status_im2/common/home/view.cljs @@ -45,7 +45,7 @@ [quo/counter {:accessibility-label :activity-center-unread-count :type unread-type - :container-style (style/unread-indicator unread-count + :style (style/unread-indicator unread-count constants/activity-center-max-unread-count)} unread-count]))) diff --git a/src/status_im2/contexts/chat/composer/reply/view.cljs b/src/status_im2/contexts/chat/composer/reply/view.cljs index a84cf2de08c6..25aef9147401 100644 --- a/src/status_im2/contexts/chat/composer/reply/view.cljs +++ b/src/status_im2/contexts/chat/composer/reply/view.cljs @@ -125,17 +125,15 @@ (i18n/label :t/photo)) constant/content-type-sticker (i18n/label :t/sticker) constant/content-type-audio (i18n/label :t/audio) - ""))] - ])] + ""))]])] (when (and in-chat-input? (not recording-audio?)) [quo/button - {:size 24 + {:icon-only? true + :size 24 :accessibility-label :reply-cancel-button :on-press #(rf/dispatch [:chat.ui/cancel-message-reply]) :type :outline} - [quo/icon :i/close - {:size 16 - :color (colors/theme-colors colors/neutral-100 colors/neutral-40)}]]) + :i/close]) (when (and in-chat-input? recording-audio?) [linear-gradient/linear-gradient {:colors [(colors/theme-colors colors/white-opa-0 colors/neutral-90-opa-0) diff --git a/src/status_im2/contexts/onboarding/enable_notifications/view.cljs b/src/status_im2/contexts/onboarding/enable_notifications/view.cljs index 4089e368e1ec..819bb4c407ee 100644 --- a/src/status_im2/contexts/onboarding/enable_notifications/view.cljs +++ b/src/status_im2/contexts/onboarding/enable_notifications/view.cljs @@ -22,7 +22,7 @@ (defn enable-notification-buttons [{:keys [insets]}] - (let [profile-color (:color (rf/sub [:onboarding-2/profile]))] + (let [profile-color (rf/sub [:onboarding-2/customization-color])] [rn/view {:style (style/buttons insets)} [quo/button {:on-press (fn [] diff --git a/src/status_im2/contexts/onboarding/welcome/view.cljs b/src/status_im2/contexts/onboarding/welcome/view.cljs index e11fb30ce615..eb56fb5a2a83 100644 --- a/src/status_im2/contexts/onboarding/welcome/view.cljs +++ b/src/status_im2/contexts/onboarding/welcome/view.cljs @@ -45,7 +45,7 @@ (defn view [] - (let [profile-color (:color (rf/sub [:onboarding-2/profile])) + (let [profile-color (rf/sub [:onboarding-2/customization-color]) {:keys [status-type]} (rf/sub [:multiaccount/current-user-visibility-status]) insets (safe-area/get-insets)] [rn/view {:style (style/page-container insets)} diff --git a/src/status_im2/contexts/shell/activity_center/header/view.cljs b/src/status_im2/contexts/shell/activity_center/header/view.cljs index 0efc0695e3c7..af6c58b65a06 100644 --- a/src/status_im2/contexts/shell/activity_center/header/view.cljs +++ b/src/status_im2/contexts/shell/activity_center/header/view.cljs @@ -25,6 +25,7 @@ [quo/button {:icon-only? true :type :grey + :background :blur :size 32 :accessibility-label :close-activity-center :on-press #(rf/dispatch [:navigate-back])} @@ -32,6 +33,7 @@ [quo/button {:icon-only? true :type :grey + :background :blur :size 32 :accessibility-label :activity-center-open-more :on-press #(rf/dispatch [:show-bottom-sheet diff --git a/src/status_im2/subs/onboarding.cljs b/src/status_im2/subs/onboarding.cljs new file mode 100644 index 000000000000..451f173543cd --- /dev/null +++ b/src/status_im2/subs/onboarding.cljs @@ -0,0 +1,12 @@ +(ns status-im2.subs.onboarding + (:require [re-frame.core :as re-frame])) + +(re-frame/reg-sub + :onboarding-2/customization-color + :<- [:onboarding-2/profile] + :<- [:profile/customization-color] + :<- [:onboarding-2/new-account?] + (fn [[{:keys [color]} customization-color new-account?]] + (if new-account? + color + customization-color))) diff --git a/src/status_im2/subs/root.cljs b/src/status_im2/subs/root.cljs index 9db5b8a268f3..583db442022c 100644 --- a/src/status_im2/subs/root.cljs +++ b/src/status_im2/subs/root.cljs @@ -13,9 +13,10 @@ status-im2.subs.home status-im2.subs.keycard status-im2.subs.mailservers - status-im2.subs.profile status-im2.subs.networks + status-im2.subs.onboarding status-im2.subs.pairing + status-im2.subs.profile status-im2.subs.search status-im2.subs.shell status-im2.subs.stickers