Skip to content

Commit

Permalink
[#17393] fix: setting items connection
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen-ghafouri committed Dec 12, 2023
1 parent 5360847 commit 4980203
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/quo/components/settings/category/settings/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
[react-native.core :as rn]))

(defn- category-internal
[{:keys [label data blur? theme]}]
[rn/view {:style (style/container label)}
[{:keys [label data blur? container-style theme]}]
[rn/view {:style (merge (style/container label) container-style)}
(when label
[text/text
{:weight :medium
Expand Down
2 changes: 1 addition & 1 deletion src/quo/components/settings/category/style.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:background-color (if blur?
colors/white-opa-5
(colors/theme-colors colors/white colors/neutral-95 theme))
:border-width 1
:border-width (if blur? 0 1)
:border-color (if blur?
colors/white-opa-5
(colors/theme-colors colors/neutral-10 colors/neutral-80 theme))})
Expand Down
8 changes: 5 additions & 3 deletions src/quo/components/settings/settings_item/style.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

(defn container
[{:keys [container-style]}]
(merge {:padding 12
:flex-direction :row
:justify-content :space-between}
(merge {:padding-horizontal 12
:padding-top 12
:padding-bottom 14
:flex-direction :row
:justify-content :space-between}
container-style))

(defn left-sub-container
Expand Down
22 changes: 18 additions & 4 deletions src/status_im2/contexts/profile/settings/list_items.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,72 +8,86 @@
:on-press not-implemented/alert
:image-props :i/edit
:image :icon
:blur? true
:action :arrow}
{:title (i18n/label :t/password)
:on-press not-implemented/alert
:image-props :i/password
:image :icon
:blur? true
:action :arrow}]
[{:title (i18n/label :t/messages)
:on-press not-implemented/alert
:image-props :i/messages
:image :icon
:blur? true
:action :arrow}
{:title (i18n/label :t/wallet)
:on-press not-implemented/alert
:image-props :i/wallet
:image :icon
:blur? true
:action :arrow}
{:title (i18n/label :t/dapps)
:on-press not-implemented/alert
:image-props :i/placeholder
:image :icon
:blur? true
:action :arrow}
{:title (i18n/label :t/browser)
:on-press not-implemented/alert
:image-props :i/browser
:image :icon
:blur? true
:action :arrow}
{:title (i18n/label :t/keycard)
:on-press not-implemented/alert
:image-props :i/keycard
:image :icon
:blur? true
:action :arrow}]
[{:title (i18n/label :t/syncing)
:on-press not-implemented/alert
:on-press #(rf/dispatch [:navigate-to :settings-syncing])
:image-props :i/syncing
:image :icon
:blur? true
:action :arrow}
{:title (i18n/label :t/notifications)
:on-press not-implemented/alert
:on-press #(rf/dispatch [:navigate-to :notifications])
:image-props :i/notifications
:image :icon
:blur? true
:action :arrow}
{:title (i18n/label :t/appearance)
:on-press not-implemented/alert
:on-press #(rf/dispatch [:navigate-to :appearance])
:image-props :i/light
:image :icon
:blur? true
:action :arrow}
{:title (i18n/label :t/language-and-currency)
:on-press not-implemented/alert
:image-props :i/globe
:image :icon
:blur? true
:action :arrow}]
[{:title (i18n/label :t/data-usage)
:on-press not-implemented/alert
:image-props :i/mobile
:image :icon
:blur? true
:action :arrow}
{:title (i18n/label :t/advanced)
:on-press not-implemented/alert
:on-press #(rf/dispatch [:navigate-to :advanced-settings])
:image-props :i/settings
:image :icon
:blur? true
:action :arrow}]
;; temporary link to legacy settings
[{:title "Legacy settings"
:on-press #(rf/dispatch [:navigate-to :my-profile])
:action :arrow
:image :icon
:blur? true
:image-props :i/toggle}]
[{:title (i18n/label :t/about)
:on-press not-implemented/alert
Expand Down
13 changes: 7 additions & 6 deletions src/status_im2/contexts/profile/settings/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
(defn- settings-item-view
[data]
[quo/category
{:list-type :settings
:blur? true
:data data}])
{:list-type :settings
:container-style {:padding-bottom 0}
:blur? true
:data data}])

(defn scroll-handler
[event scroll-y]
Expand Down Expand Up @@ -51,9 +52,9 @@
:icon-name :i/close
:on-press #(rf/dispatch [:navigate-back])
:right-side [{:icon-name :i/multi-profile :on-press #(rf/dispatch [:open-modal :sign-in])}
{:icon-name :i/qr-code :on-press not-implemented/alert}
{:icon-name :i/share
:on-press #(debounce/dispatch-and-chill [:open-modal :share-shell] 1000)}]}]]
{:icon-name :i/qr-code
:on-press #(debounce/dispatch-and-chill [:open-modal :share-shell] 1000)}
{:icon-name :i/share :on-press not-implemented/alert}]}]]
[rn/flat-list
{:key :list
:header [settings.header/view {:scroll-y scroll-y}]
Expand Down

0 comments on commit 4980203

Please sign in to comment.