Skip to content

Commit 4850c30

Browse files
[#17986] fix: address feedbacks
1 parent ad1d740 commit 4850c30

File tree

4 files changed

+51
-56
lines changed

4 files changed

+51
-56
lines changed

src/quo/components/overlay/style.cljs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
(ns quo.components.overlay.style)
1+
(ns quo.components.overlay.style
2+
(:require [quo.foundations.colors :as colors]))
23

34
(defn overlay-background
4-
[background-color]
5-
{:position :absolute
6-
:top 0
7-
:left 0
8-
:right 0
9-
:bottom 0
10-
:background-color background-color})
5+
[type]
6+
(let [background-color (case type
7+
:shell colors/neutral-80-opa-80-blur
8+
:drawer colors/neutral-100-opa-70-blur
9+
nil)]
10+
{:position :absolute
11+
:top 0
12+
:left 0
13+
:right 0
14+
:bottom 0
15+
:background-color background-color}))
1116

1217
(def container
1318
{:flex 1})

src/quo/components/overlay/view.cljs

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
(ns quo.components.overlay.view
22
(:require
33
[quo.components.overlay.style :as style]
4-
[quo.foundations.colors :as colors]
54
[react-native.blur :as blur]
65
[react-native.core :as rn]))
76

87
(defn view
9-
[{:keys [type]} child]
10-
(let [background-color (case type
11-
:shell colors/neutral-80-opa-80-blur
12-
:drawer colors/neutral-100-opa-70-blur
13-
nil)]
14-
[rn/view {:style (style/overlay-background background-color)}
15-
(if (= type :shell)
16-
[blur/view
17-
{:blur-amount 20
18-
:blur-radius 25
19-
:blur-type :transparent
20-
:overlay-color :transparent
21-
:style style/container}
22-
[rn/view {:style style/blur-container}
23-
child]]
24-
[rn/view {:style style/container}
25-
child])]))
8+
[{:keys [type]} & children]
9+
[rn/view {:style (style/overlay-background type)}
10+
(if (= type :shell)
11+
[blur/view
12+
{:blur-amount 20
13+
:blur-radius 25
14+
:blur-type :transparent
15+
:overlay-color :transparent
16+
:style style/container}
17+
[rn/view {:style style/blur-container}
18+
children]]
19+
[rn/view {:style style/container}
20+
children])])

src/status_im2/contexts/profile/settings/header/view.cljs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[utils.i18n :as i18n]
1111
[utils.re-frame :as rf]))
1212

13-
(defn- f-view
13+
(defn view
1414
[{:keys [theme scroll-y]}]
1515
(let [{:keys [public-key emoji-hash] :as profile} (rf/sub [:profile/profile-with-image])
1616
online? (rf/sub [:visibility-status-updates/online?
@@ -44,7 +44,3 @@
4444
{:container-style style/title-container
4545
:emoji-hash emoji-string
4646
:title full-name}]]))
47-
48-
(defn view
49-
[params]
50-
[:f> f-view params])

src/status_im2/contexts/profile/settings/view.cljs

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[utils.i18n :as i18n]
1414
[utils.re-frame :as rf]))
1515

16-
(defn- f-settings-item-view
16+
(defn- settings-item-view
1717
[data]
1818
[quo/category
1919
{:list-type :settings
@@ -25,7 +25,7 @@
2525
(let [current-y (oops/oget event "nativeEvent.contentOffset.y")]
2626
(reanimated/set-shared-value scroll-y current-y)))
2727

28-
(defn- f-footer
28+
(defn- footer
2929
[logout-press]
3030
[rn/view {:style style/footer-container}
3131
[quo/button
@@ -41,29 +41,28 @@
4141
scroll-y (reanimated/use-shared-value 0)
4242
logout-press #(rf/dispatch [:multiaccounts.logout.ui/logout-pressed])]
4343
[quo/overlay {:type :shell}
44-
[rn/view {:style {:flex 1}}
45-
[rn/view
46-
{:style (style/navigation-wrapper {:customization-color customization-color
47-
:inset (:top insets)
48-
:theme theme})}
49-
[quo/page-nav
50-
{:background :blur
51-
:icon-name :i/close
52-
:on-press #(rf/dispatch [:navigate-back])
53-
:right-side [{:icon-name :i/multi-profile :on-press #(rf/dispatch [:open-modal :sign-in])}
54-
{:icon-name :i/qr-code :on-press not-implemented/alert}
55-
{:icon-name :i/share
56-
:on-press #(debounce/dispatch-and-chill [:open-modal :share-shell] 1000)}]}]]
57-
[rn/flat-list
58-
{:header [settings.header/view {:scroll-y scroll-y}]
59-
:data settings.items/items
60-
:key-fn :title
61-
:shows-vertical-scroll-indicator false
62-
:render-fn f-settings-item-view
63-
:footer [f-footer logout-press]
64-
:scroll-event-throttle 16
65-
:on-scroll #(scroll-handler % scroll-y)
66-
:bounces false}]]]))
44+
[rn/view
45+
{:style (style/navigation-wrapper {:customization-color customization-color
46+
:inset (:top insets)
47+
:theme theme})}
48+
[quo/page-nav
49+
{:background :blur
50+
:icon-name :i/close
51+
:on-press #(rf/dispatch [:navigate-back])
52+
:right-side [{:icon-name :i/multi-profile :on-press #(rf/dispatch [:open-modal :sign-in])}
53+
{:icon-name :i/qr-code :on-press not-implemented/alert}
54+
{:icon-name :i/share
55+
:on-press #(debounce/dispatch-and-chill [:open-modal :share-shell] 1000)}]}]]
56+
[rn/flat-list
57+
{:header [settings.header/view {:scroll-y scroll-y}]
58+
:data settings.items/items
59+
:key-fn :title
60+
:shows-vertical-scroll-indicator false
61+
:render-fn settings-item-view
62+
:footer [footer logout-press]
63+
:scroll-event-throttle 16
64+
:on-scroll #(scroll-handler % scroll-y)
65+
:bounces false}]]))
6766

6867
(defn- internal-view
6968
[props]

0 commit comments

Comments
 (0)