Skip to content

Commit a1b2721

Browse files
OmarBasemyevh-berdnyk
authored andcommitted
Wallet: illustrations (#17931)
* wallet: illustrations
1 parent 2d78a8b commit a1b2721

31 files changed

+73
-38
lines changed
8.7 KB
Loading
15.9 KB
Loading
8.69 KB
Loading
15.9 KB
Loading
14.2 KB
Loading
22.7 KB
Loading
15.8 KB
Loading
25 KB
Loading
12.6 KB
Loading
23.1 KB
Loading
12.1 KB
Loading
22.1 KB
Loading
61.2 KB
Loading
114 KB
Loading
40.2 KB
Loading
74.6 KB
Loading
16.5 KB
Loading
29.8 KB
Loading
16.7 KB
Loading
30.2 KB
Loading

src/quo/components/graph/wallet_graph/style.cljs

+4
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@
1919
:background-color colors/danger-50
2020
:align-items :center
2121
:justify-content :center})
22+
23+
(def empty-state
24+
{:width 375
25+
:height 116})

src/quo/components/graph/wallet_graph/view.cljs

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
(:require
33
[quo.components.graph.utils :as utils]
44
[quo.components.graph.wallet-graph.style :as style]
5-
[quo.components.markdown.text :as text]
65
[quo.foundations.colors :as colors]
6+
[quo.foundations.resources :as resources]
77
[quo.theme :as quo.theme]
88
[react-native.charts :as charts]
99
[react-native.core :as rn]
10+
[react-native.fast-image :as fast-image]
1011
[react-native.linear-gradient :as linear-gradient]))
1112

1213
(defn- time-frame->max-data-points
@@ -42,11 +43,10 @@
4243
gradient-colors [(colors/alpha line-color 0.1) (colors/alpha line-color 0)]
4344
fill-color (colors/theme-colors colors/white colors/neutral-95)]
4445
(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}]
5050
[rn/view
5151
[linear-gradient/linear-gradient
5252
{:colors gradient-colors

src/quo/foundations/resources.cljs

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
:keycard-watermark (js/require "../resources/images/ui2/keycard-watermark.png")
88
:bored-ape (js/require "../resources/images/mock2/bored-ape.png")})
99

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+
1019
(defn get-image
1120
[k]
1221
(get ui k))

src/status_im2/common/resources.cljs

+13-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,19 @@
7979
:dark (js/require "../resources/images/ui2/no-contacts-to-invite-dark.png")}
8080
:no-notifications
8181
{: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")}})
8395

8496
(def mock-images
8597
{:bored-ape (js/require "../resources/images/mock2/bored-ape.png")

src/status_im2/contexts/wallet/account/tabs/dapps/view.cljs

+6-8
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
[quo.core :as quo]
44
[quo.theme :as quo.theme]
55
[react-native.core :as rn]
6+
[status-im2.common.resources :as resources]
67
[status-im2.contexts.wallet.account.tabs.dapps.style :as style]
78
[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]))
1110

1211
(defn dapp-options
1312
[]
@@ -23,13 +22,12 @@
2322

2423
(defn- view-internal
2524
[{: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 []]
2826
(if (empty? dapps-list)
2927
[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)}]
3331
[rn/view {:style style/dapps-container}
3432
[rn/flat-list
3533
{:data dapps-list
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
(ns status-im2.contexts.wallet.account.tabs.view
22
(:require
3+
[quo.theme]
34
[react-native.core :as rn]
5+
[status-im2.common.resources :as resources]
46
[status-im2.contexts.wallet.account.tabs.about.view :as about]
57
[status-im2.contexts.wallet.account.tabs.dapps.view :as dapps]
68
[status-im2.contexts.wallet.common.activity-tab.view :as activity]
@@ -10,8 +12,8 @@
1012
[status-im2.contexts.wallet.common.token-value.view :as token-value]
1113
[utils.i18n :as i18n]))
1214

13-
(defn view
14-
[{:keys [selected-tab]}]
15+
(defn- view-internal
16+
[{:keys [selected-tab theme]}]
1517
(case selected-tab
1618
:assets [rn/flat-list
1719
{:render-fn token-value/view
@@ -20,8 +22,13 @@
2022
:collectibles [collectibles/view]
2123
:activity [activity/view]
2224
: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))}]
2631
:dapps [dapps/view]
2732
[about/view]))
33+
34+
(def view (quo.theme/with-theme view-internal))

src/status_im2/contexts/wallet/account/view.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
[{:id :assets :label (i18n/label :t/assets) :accessibility-label :assets-tab}
2626
{:id :collectibles :label (i18n/label :t/collectibles) :accessibility-label :collectibles-tab}
2727
{:id :activity :label (i18n/label :t/activity) :accessibility-label :activity-tab}
28-
{:id :permissions :label (i18n/label :t/permissions) :accessibility-label :permissions}
2928
{:id :dapps :label (i18n/label :t/dapps) :accessibility-label :dapps}
3029
{:id :about :label (i18n/label :t/about) :accessibility-label :about}])
3130

Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
(ns status-im2.contexts.wallet.common.activity-tab.view
22
(:require
33
[quo.core :as quo]
4+
[quo.theme]
45
[react-native.core :as rn]
6+
[status-im2.common.resources :as resources]
57
[status-im2.contexts.wallet.common.empty-tab.view :as empty-tab]
6-
[status-im2.contexts.wallet.common.temp :as temp]
78
[utils.i18n :as i18n]))
89

910
(defn activity-item
@@ -14,15 +15,17 @@
1415
(merge {:on-press #(js/alert "Item pressed")}
1516
item)]])
1617

17-
(defn view
18-
[]
19-
(let [activity-list temp/activity-list]
18+
(defn- view-internal
19+
[{:keys [theme]}]
20+
(let [activity-list []]
2021
(if (empty? activity-list)
2122
[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)}]
2526
[rn/flat-list
2627
{:data activity-list
2728
:style {:flex 1}
2829
:render-fn activity-item}])))
30+
31+
(def view (quo.theme/with-theme view-internal))
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
(ns status-im2.contexts.wallet.common.collectibles-tab.view
22
(:require
33
[quo.core :as quo]
4+
[quo.theme]
45
[react-native.core :as rn]
6+
[status-im2.common.resources :as resources]
57
[status-im2.contexts.wallet.common.empty-tab.view :as empty-tab]
68
[utils.i18n :as i18n]
79
[utils.re-frame :as rf]))
810

9-
(defn view
10-
[]
11+
(defn- view-internal
12+
[{:keys [theme]}]
1113
(let [collectible-list (rf/sub [:wallet/collectibles])]
1214
(if (empty? collectible-list)
1315
[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)}]
1719
[rn/flat-list
1820
{:data collectible-list
1921
:style {:flex 1}
@@ -25,3 +27,5 @@
2527
:on-press #(rf/dispatch
2628
[:navigate-to
2729
:wallet-collectible])}])}])))
30+
31+
(def view (quo.theme/with-theme view-internal))

src/status_im2/contexts/wallet/home/view.cljs

+1-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@
5353
[common.top-nav/view]
5454
[rn/view {:style style/overview-container}
5555
[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}]
6057
[rn/flat-list
6158
{:style style/accounts-list
6259
:content-container-style style/accounts-list-container

translations/en.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -2389,5 +2389,7 @@
23892389
"address-placeholder": "0x123abc... or bob.eth",
23902390
"invalid-address": "It’s not Ethereum address or ENS name",
23912391
"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!"
23932394
}
2395+

0 commit comments

Comments
 (0)