File tree 31 files changed +73
-38
lines changed
components/graph/wallet_graph
31 files changed +73
-38
lines changed 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 2
2
(:require
3
3
[quo.components.graph.utils :as utils]
4
4
[quo.components.graph.wallet-graph.style :as style]
5
- [quo.components.markdown.text :as text]
6
5
[quo.foundations.colors :as colors]
6
+ [quo.foundations.resources :as resources]
7
7
[quo.theme :as quo.theme]
8
8
[react-native.charts :as charts]
9
9
[react-native.core :as rn]
10
+ [react-native.fast-image :as fast-image]
10
11
[react-native.linear-gradient :as linear-gradient]))
11
12
12
13
(defn- time-frame->max-data-points
42
43
gradient-colors [(colors/alpha line-color 0.1 ) (colors/alpha line-color 0 )]
43
44
fill-color (colors/theme-colors colors/white colors/neutral-95)]
44
45
(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" ]]
46
+ [fast-image/fast-image
47
+ {:style style/empty-state
48
+ :source (resources/get-themed-image :no-funds theme)
49
+ :accessibility-label :illustration }]
50
50
[rn/view
51
51
[linear-gradient/linear-gradient
52
52
{:colors gradient-colors
Original file line number Diff line number Diff line change 7
7
:keycard-watermark (js/require " ../resources/images/ui2/keycard-watermark.png" )
8
8
:bored-ape (js/require " ../resources/images/mock2/bored-ape.png" )})
9
9
10
+ (def ui-themed
11
+ {:no-funds
12
+ {:light (js/require " ../resources/images/ui2/no-funds-light.png" )
13
+ :dark (js/require " ../resources/images/ui2/no-funds-dark.png" )}})
14
+
15
+ (defn get-themed-image
16
+ [k theme]
17
+ (get-in ui-themed [k theme]))
18
+
10
19
(defn get-image
11
20
[k]
12
21
(get ui 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
- [status-im2.contexts.wallet.common.temp :as temp]
9
- [utils.i18n :as i18n]
10
- [utils.re-frame :as rf]))
9
+ [utils.i18n :as i18n]))
11
10
12
11
(defn dapp-options
13
12
[]
23
22
24
23
(defn- view-internal
25
24
[{:keys [theme]}]
26
- (let [dapps-list (temp/dapps-list {:on-press-icon #(rf/dispatch [:show-bottom-sheet
27
- {:content dapp-options}])})]
25
+ (let [dapps-list []]
28
26
(if (empty? dapps-list)
29
27
[empty-tab/view
30
- {:title (i18n/label :t/no-dapps )
31
- :description (i18n/label :t/no-collectibles -description )
32
- :placeholder? true }]
28
+ {:title (i18n/label :t/no-dapps )
29
+ :description (i18n/label :t/no-dapps -description )
30
+ :image ( resources/get-themed-image :no-dapps theme) }]
33
31
[rn/view {:style style/dapps-container}
34
32
[rn/flat-list
35
33
{: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
+ [quo.theme]
3
4
[react-native.core :as rn]
5
+ [status-im2.common.resources :as resources]
4
6
[status-im2.contexts.wallet.account.tabs.about.view :as about]
5
7
[status-im2.contexts.wallet.account.tabs.dapps.view :as dapps]
6
8
[status-im2.contexts.wallet.common.activity-tab.view :as activity]
10
12
[status-im2.contexts.wallet.common.token-value.view :as token-value]
11
13
[utils.i18n :as i18n]))
12
14
13
- (defn view
14
- [{:keys [selected-tab]}]
15
+ (defn- view-internal
16
+ [{:keys [selected-tab theme ]}]
15
17
(case selected-tab
16
18
:assets [rn/flat-list
17
19
{:render-fn token-value/view
20
22
:collectibles [collectibles/view]
21
23
:activity [activity/view]
22
24
:permissions [empty-tab/view
23
- {:title (i18n/label :t/no-permissions )
24
- :description (i18n/label :t/no-collectibles-description )
25
- :placeholder? true }]
25
+ {:title (i18n/label :t/no-permissions )
26
+ :description (i18n/label :t/no-collectibles-description )
27
+ :image (resources/get-image
28
+ (quo.theme/theme-value :no-permissions-light
29
+ :no-permissions-dark
30
+ theme))}]
26
31
:dapps [dapps/view]
27
32
[about/view]))
33
+
34
+ (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 }
29
28
{:id :dapps :label (i18n/label :t/dapps ) :accessibility-label :dapps }
30
29
{:id :about :label (i18n/label :t/about ) :accessibility-label :about }])
31
30
Original file line number Diff line number Diff line change 1
1
(ns status-im2.contexts.wallet.common.activity-tab.view
2
2
(:require
3
3
[quo.core :as quo]
4
+ [quo.theme]
4
5
[react-native.core :as rn]
6
+ [status-im2.common.resources :as resources]
5
7
[status-im2.contexts.wallet.common.empty-tab.view :as empty-tab]
6
- [status-im2.contexts.wallet.common.temp :as temp]
7
8
[utils.i18n :as i18n]))
8
9
9
10
(defn activity-item
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-themed-image :no-activity theme) }]
25
26
[rn/flat-list
26
27
{:data activity-list
27
28
:style {:flex 1 }
28
29
:render-fn activity-item}])))
30
+
31
+ (def view (quo.theme/with-theme view-internal))
Original file line number Diff line number Diff line change 1
1
(ns status-im2.contexts.wallet.common.collectibles-tab.view
2
2
(:require
3
3
[quo.core :as quo]
4
+ [quo.theme]
4
5
[react-native.core :as rn]
6
+ [status-im2.common.resources :as resources]
5
7
[status-im2.contexts.wallet.common.empty-tab.view :as empty-tab]
6
8
[utils.i18n :as i18n]
7
9
[utils.re-frame :as rf]))
8
10
9
- (defn view
10
- []
11
+ (defn- view-internal
12
+ [{ :keys [theme]} ]
11
13
(let [collectible-list (rf/sub [:wallet/collectibles ])]
12
14
(if (empty? collectible-list)
13
15
[empty-tab/view
14
- {:title (i18n/label :t/no-collectibles )
15
- :description (i18n/label :t/no-collectibles-description )
16
- :placeholder? true }]
16
+ {:title (i18n/label :t/no-collectibles )
17
+ :description (i18n/label :t/no-collectibles-description )
18
+ :image ( resources/get-themed-image :no-collectibles 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
Original file line number Diff line number Diff line change 2389
2389
"address-placeholder" : " 0x123abc... or bob.eth" ,
2390
2390
"invalid-address" : " It’s not Ethereum address or ENS name" ,
2391
2391
"address-already-in-use" : " Address already being used" ,
2392
- "address-copied" : " Address copied"
2392
+ "address-copied" : " Address copied" ,
2393
+ "no-dapps-description" : " We want dApps!"
2393
2394
}
2395
+
You can’t perform that action at this time.
0 commit comments