File tree 31 files changed +65
-34
lines changed
components/graph/wallet_graph
31 files changed +65
-34
lines changed Original file line number Diff line number Diff line change @@ -765,7 +765,7 @@ SPEC CHECKSUMS:
765
765
RNLanguages: 962e562af0d34ab1958d89bcfdb64fafc37c513e
766
766
RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467
767
767
RNReactNativeHapticFeedback: 2566b468cc8d0e7bb2f84b23adc0f4614594d071
768
- RNReanimated: 42f56dc5c032a11177b9ea12cdb57285318b432e
768
+ RNReanimated: 06a228c5a245ef7b5b03f0efc29d76ce4db9031c
769
769
RNShare: d82e10f6b7677f4b0048c23709bd04098d5aee6c
770
770
RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8
771
771
RNSVG: 80584470ff1ffc7994923ea135a3e5ad825546b9
Original file line number Diff line number Diff line change 19
19
:background-color colors/danger-50
20
20
:align-items :center
21
21
:justify-content :center })
22
+
23
+ (def empty-state
24
+ {:width 375
25
+ :height 116 })
Original file line number Diff line number Diff line change 4
4
[quo.components.graph.wallet-graph.style :as style]
5
5
[quo.components.markdown.text :as text]
6
6
[quo.foundations.colors :as colors]
7
+ [quo.foundations.resources :as resources]
7
8
[quo.theme :as quo.theme]
8
9
[react-native.charts :as charts]
9
10
[react-native.core :as rn]
11
+ [react-native.fast-image :as fast-image]
10
12
[react-native.linear-gradient :as linear-gradient]))
11
13
12
14
(defn- time-frame->max-data-points
42
44
gradient-colors [(colors/alpha line-color 0.1 ) (colors/alpha line-color 0 )]
43
45
fill-color (colors/theme-colors colors/white colors/neutral-95)]
44
46
(if (= time-frame :empty )
45
- [rn/view
46
- {:accessibility-label :illustration
47
- :style style/illustration}
48
- [text/text {:style {:color colors/white}}
49
- " Illustration here" ]]
47
+ [fast-image/fast-image
48
+ {:style style/empty-state
49
+ :source (resources/get-image
50
+ (quo.theme/theme-value :no-funds-light :no-funds-dark theme))}]
50
51
[rn/view
51
52
[linear-gradient/linear-gradient
52
53
{:colors gradient-colors
Original file line number Diff line number Diff line change 5
5
:keycard-chip-light (js/require " ../resources/images/ui2/keycard-chip-light.png" )
6
6
:keycard-chip-dark (js/require " ../resources/images/ui2/keycard-chip-dark.png" )
7
7
:keycard-watermark (js/require " ../resources/images/ui2/keycard-watermark.png" )
8
- :bored-ape (js/require " ../resources/images/mock2/bored-ape.png" )})
8
+ :bored-ape (js/require " ../resources/images/mock2/bored-ape.png" )
9
+ :no-funds
10
+ {:light (js/require " ../resources/images/ui2/no-funds-light.png" )
11
+ :dark (js/require " ../resources/images/ui2/no-funds-dark.png" )}})
9
12
10
13
(defn get-image
11
14
[k]
Original file line number Diff line number Diff line change 79
79
:dark (js/require " ../resources/images/ui2/no-contacts-to-invite-dark.png" )}
80
80
:no-notifications
81
81
{:light (js/require " ../resources/images/ui2/no-notifications-light.png" )
82
- :dark (js/require " ../resources/images/ui2/no-notifications-dark.png" )}})
82
+ :dark (js/require " ../resources/images/ui2/no-notifications-dark.png" )}
83
+ :no-activity
84
+ {:light (js/require " ../resources/images/ui2/no-activity-light.png" )
85
+ :dark (js/require " ../resources/images/ui2/no-activity-dark.png" )}
86
+ :no-collectibles
87
+ {:light (js/require " ../resources/images/ui2/no-collectibles-light.png" )
88
+ :dark (js/require " ../resources/images/ui2/no-collectibles-dark.png" )}
89
+ :no-dapps
90
+ {:light (js/require " ../resources/images/ui2/no-dapps-light.png" )
91
+ :dark (js/require " ../resources/images/ui2/no-dapps-dark.png" )}
92
+ :no-permissions
93
+ {:light (js/require " ../resources/images/ui2/no-permissions-light.png" )
94
+ :dark (js/require " ../resources/images/ui2/no-permissions-dark.png" )}})
83
95
84
96
(def mock-images
85
97
{:bored-ape (js/require " ../resources/images/mock2/bored-ape.png" )
Original file line number Diff line number Diff line change 3
3
[quo.core :as quo]
4
4
[quo.theme :as quo.theme]
5
5
[react-native.core :as rn]
6
+ [status-im2.common.resources :as resources]
6
7
[status-im2.contexts.wallet.account.tabs.dapps.style :as style]
7
8
[status-im2.contexts.wallet.common.empty-tab.view :as empty-tab]
8
9
[status-im2.contexts.wallet.common.temp :as temp]
23
24
24
25
(defn- view-internal
25
26
[{:keys [theme]}]
26
- (let [dapps-list (temp/dapps-list {:on-press-icon #(rf/dispatch [:show-bottom-sheet
27
- {:content dapp-options}])})]
27
+ (let [dapps-list []]
28
28
(if (empty? dapps-list)
29
29
[empty-tab/view
30
- {:title (i18n/label :t/no-dapps )
31
- :description (i18n/label :t/no-collectibles-description )
32
- :placeholder? true }]
30
+ {:title (i18n/label :t/no-dapps )
31
+ :description (i18n/label :t/no-collectibles-description )
32
+ :image (resources/get-image
33
+ (quo.theme/theme-value :no-dapps-light :no-dapps-dark theme))}]
33
34
[rn/view {:style style/dapps-container}
34
35
[rn/flat-list
35
36
{:data dapps-list
Original file line number Diff line number Diff line change 1
1
(ns status-im2.contexts.wallet.account.tabs.view
2
2
(:require
3
3
[react-native.core :as rn]
4
+ [status-im2.common.resources :as resources]
4
5
[status-im2.contexts.wallet.account.tabs.about.view :as about]
5
6
[status-im2.contexts.wallet.account.tabs.dapps.view :as dapps]
6
7
[status-im2.contexts.wallet.common.activity-tab.view :as activity]
10
11
[status-im2.contexts.wallet.common.token-value.view :as token-value]
11
12
[utils.i18n :as i18n]))
12
13
13
- (defn view
14
- [{:keys [selected-tab]}]
14
+ (defn- view-internal
15
+ [{:keys [selected-tab theme ]}]
15
16
(case selected-tab
16
17
:assets [rn/flat-list
17
18
{:render-fn token-value/view
20
21
:collectibles [collectibles/view]
21
22
:activity [activity/view]
22
23
:permissions [empty-tab/view
23
- {:title (i18n/label :t/no-permissions )
24
- :description (i18n/label :t/no-collectibles-description )
25
- :placeholder? true }]
24
+ {:title (i18n/label :t/no-permissions )
25
+ :description (i18n/label :t/no-collectibles-description )
26
+ :image (resources/get-image
27
+ (quo.theme/theme-value :no-permissions-light :no-permissions-dark theme))}]
26
28
:dapps [dapps/view]
27
29
[about/view]))
30
+
31
+ (def view (quo.theme/with-theme view-internal))
Original file line number Diff line number Diff line change 25
25
[{:id :assets :label (i18n/label :t/assets ) :accessibility-label :assets-tab }
26
26
{:id :collectibles :label (i18n/label :t/collectibles ) :accessibility-label :collectibles-tab }
27
27
{:id :activity :label (i18n/label :t/activity ) :accessibility-label :activity-tab }
28
- {:id :permissions :label (i18n/label :t/permissions ) :accessibility-label :permissions }
28
+ ; ; Disabled for new wallet MVP
29
+ ; {:id :permissions :label (i18n/label :t/permissions) :accessibility-label :permissions}
29
30
{:id :dapps :label (i18n/label :t/dapps ) :accessibility-label :dapps }
30
31
{:id :about :label (i18n/label :t/about ) :accessibility-label :about }])
31
32
Original file line number Diff line number Diff line change 2
2
(:require
3
3
[quo.core :as quo]
4
4
[react-native.core :as rn]
5
+ [status-im2.common.resources :as resources]
5
6
[status-im2.contexts.wallet.common.empty-tab.view :as empty-tab]
6
7
[status-im2.contexts.wallet.common.temp :as temp]
7
8
[utils.i18n :as i18n]))
14
15
(merge {:on-press #(js/alert " Item pressed" )}
15
16
item)]])
16
17
17
- (defn view
18
- []
19
- (let [activity-list temp/activity-list ]
18
+ (defn- view-internal
19
+ [{ :keys [theme]} ]
20
+ (let [activity-list [] ]
20
21
(if (empty? activity-list)
21
22
[empty-tab/view
22
- {:title (i18n/label :t/no-activity )
23
- :description (i18n/label :t/empty-tab-description )
24
- :placeholder? true }]
23
+ {:title (i18n/label :t/no-activity )
24
+ :description (i18n/label :t/empty-tab-description )
25
+ :image (resources/get-image
26
+ (quo.theme/theme-value :no-activity-light :no-activity-dark theme))}]
25
27
[rn/flat-list
26
28
{:data activity-list
27
29
:style {:flex 1 }
28
30
:render-fn activity-item}])))
31
+
32
+ (def view (quo.theme/with-theme view-internal))
Original file line number Diff line number Diff line change 2
2
(:require
3
3
[quo.core :as quo]
4
4
[react-native.core :as rn]
5
+ [status-im2.common.resources :as resources]
5
6
[status-im2.contexts.wallet.common.empty-tab.view :as empty-tab]
6
7
[utils.i18n :as i18n]
7
8
[utils.re-frame :as rf]))
8
9
9
- (defn view
10
- []
10
+ (defn- view-internal
11
+ [{ :keys [theme]} ]
11
12
(let [collectible-list (rf/sub [:wallet/collectibles ])]
12
13
(if (empty? collectible-list)
13
14
[empty-tab/view
14
- {:title (i18n/label :t/no-collectibles )
15
- :description (i18n/label :t/no-collectibles-description )
16
- :placeholder? true }]
15
+ {:title (i18n/label :t/no-collectibles )
16
+ :description (i18n/label :t/no-collectibles-description )
17
+ :image (resources/get-image
18
+ (quo.theme/theme-value :no-collectibles-light :no-collectibles-dark theme))}]
17
19
[rn/flat-list
18
20
{:data collectible-list
19
21
:style {:flex 1 }
25
27
:on-press #(rf/dispatch
26
28
[:navigate-to
27
29
:wallet-collectible ])}])}])))
30
+
31
+ (def view (quo.theme/with-theme view-internal))
Original file line number Diff line number Diff line change 53
53
[common.top-nav/view]
54
54
[rn/view {:style style/overview-container}
55
55
[quo/wallet-overview (temp/wallet-overview-state networks)]]
56
- [rn/pressable
57
- {:on-long-press #(rf/dispatch [:show-bottom-sheet
58
- {:content temp/wallet-temporary-navigation}])}
59
- [quo/wallet-graph {:time-frame :empty }]]
56
+ [quo/wallet-graph {:time-frame :empty }]
60
57
[rn/flat-list
61
58
{:style style/accounts-list
62
59
:content-container-style style/accounts-list-container
You can’t perform that action at this time.
0 commit comments