Wallet: account screen jump to (#19732)

Wallet: account screen jump to (#19732)
This commit is contained in:
Omar Basem 2024-05-01 21:25:52 +04:00 committed by GitHub
parent 3951b8a39c
commit a094d218d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 30 additions and 6 deletions

View File

@ -0,0 +1,6 @@
(ns status-im.contexts.wallet.account.tabs.assets.style
(:require [status-im.contexts.shell.jump-to.constants :as constants]))
(def list-container-style
{:padding-horizontal 8
:padding-bottom constants/floating-shell-button-height})

View File

@ -2,6 +2,7 @@
(:require
[quo.core :as quo]
[react-native.core :as rn]
[status-im.contexts.wallet.account.tabs.assets.style :as style]
[status-im.contexts.wallet.common.token-value.view :as token-value]
[utils.re-frame :as rf]))
@ -20,4 +21,4 @@
:style {:flex 1}
:data tokens
:render-data {:watch-only? watch-only?}
:content-container-style {:padding-horizontal 8}}])))
:content-container-style style/list-container-style}])))

View File

@ -25,7 +25,8 @@
(let [selected-tab (reagent/atom first-tab-id)]
(fn []
(let [{:keys [name color formatted-balance
watch-only?]} (rf/sub [:wallet/current-viewing-account])]
watch-only?]} (rf/sub [:wallet/current-viewing-account])
customization-color (rf/sub [:profile/customization-color])]
[rn/view {:style {:flex 1}}
[account-switcher/view
{:type :wallet-networks
@ -55,4 +56,11 @@
:on-change #(reset! selected-tab %)
:scrollable? true
:scroll-on-press? true}]
[tabs/view {:selected-tab @selected-tab}]]))))
[tabs/view {:selected-tab @selected-tab}]
[quo/floating-shell-button
{:jump-to
{:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
:customization-color customization-color
:label (i18n/label :t/jump-to)}}
{:position :absolute
:bottom 0}]]))))

View File

@ -0,0 +1,6 @@
(ns status-im.contexts.wallet.common.collectibles-tab.style
(:require [status-im.contexts.shell.jump-to.constants :as constants]))
(def list-container-style
{:margin-horizontal 12
:padding-bottom constants/floating-shell-button-height})

View File

@ -5,6 +5,7 @@
[react-native.core :as rn]
[status-im.common.resources :as resources]
[status-im.contexts.wallet.collectible.utils :as utils]
[status-im.contexts.wallet.common.collectibles-tab.style :as style]
[status-im.contexts.wallet.common.empty-tab.view :as empty-tab]
[utils.i18n :as i18n]))
@ -50,7 +51,7 @@
[rn/flat-list
{:data collectibles
:style {:flex 1}
:content-container-style {:margin-horizontal 12}
:content-container-style style/list-container-style
:window-size 11
:num-columns 2
:render-fn (fn [item index]

View File

@ -1,4 +1,6 @@
(ns status-im.contexts.wallet.home.tabs.assets.style)
(ns status-im.contexts.wallet.home.tabs.assets.style
(:require [status-im.contexts.shell.jump-to.constants :as constants]))
(def list-container
{:padding-horizontal 8})
{:padding-horizontal 8
:padding-bottom constants/floating-shell-button-height})