mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-26 15:21:08 +00:00
parent
914604bbe4
commit
3223c71526
@ -4,7 +4,10 @@
|
|||||||
{:padding-top 24
|
{:padding-top 24
|
||||||
:padding-bottom 12
|
:padding-bottom 12
|
||||||
:padding-horizontal 20
|
:padding-horizontal 20
|
||||||
:flex-direction :row})
|
:flex-direction :row
|
||||||
|
:justify-content :center
|
||||||
|
:flex 1
|
||||||
|
:max-height 106})
|
||||||
|
|
||||||
(def button-container
|
(def button-container
|
||||||
{:padding-vertical 8
|
{:padding-vertical 8
|
||||||
|
@ -24,3 +24,8 @@
|
|||||||
{:color colors/white}))
|
{:color colors/white}))
|
||||||
|
|
||||||
(def button-container {:margin-top 20})
|
(def button-container {:margin-top 20})
|
||||||
|
|
||||||
|
(def image-placeholder
|
||||||
|
{:width 80
|
||||||
|
:height 80
|
||||||
|
:background-color colors/danger})
|
||||||
|
@ -7,14 +7,16 @@
|
|||||||
[quo2.theme :as theme]))
|
[quo2.theme :as theme]))
|
||||||
|
|
||||||
(defn- empty-state-internal
|
(defn- empty-state-internal
|
||||||
[{:keys [customization-color image title description blur?]
|
[{:keys [customization-color image title description blur? placeholder? container-style]
|
||||||
upper-button :upper-button
|
upper-button :upper-button
|
||||||
lower-button :lower-button
|
lower-button :lower-button
|
||||||
:or {customization-color :blue}}]
|
:or {customization-color :blue}}]
|
||||||
[rn/view {:style styles/container}
|
[rn/view {:style (merge styles/container container-style)}
|
||||||
|
(if placeholder?
|
||||||
|
[rn/view {:style styles/image-placeholder}]
|
||||||
[fast-image/fast-image
|
[fast-image/fast-image
|
||||||
{:style styles/image
|
{:style styles/image
|
||||||
:source image}]
|
:source image}])
|
||||||
[rn/view {:style styles/text-container}
|
[rn/view {:style styles/text-container}
|
||||||
[text/text
|
[text/text
|
||||||
{:style (styles/title blur?)
|
{:style (styles/title blur?)
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
(defn- user-account
|
(defn- user-account
|
||||||
[{:keys [state name balance percentage-value loading? amount customization-color type emoji metrics?
|
[{:keys [state name balance percentage-value loading? amount customization-color type emoji metrics?
|
||||||
theme]}]
|
theme on-press]}]
|
||||||
(let [watch-only? (= :watch-only type)
|
(let [watch-only? (= :watch-only type)
|
||||||
empty? (= :empty type)
|
empty? (= :empty type)
|
||||||
account-amount (if (= :empty state) "€0.00" amount)
|
account-amount (if (= :empty state) "€0.00" amount)
|
||||||
@ -59,8 +59,9 @@
|
|||||||
:type type
|
:type type
|
||||||
:theme theme
|
:theme theme
|
||||||
:metrics? metrics?}]
|
:metrics? metrics?}]
|
||||||
[:<>
|
[rn/pressable
|
||||||
[rn/view {:style (style/card customization-color watch-only? metrics? theme)}
|
{:style (style/card customization-color watch-only? metrics? theme)
|
||||||
|
:on-press on-press}
|
||||||
[rn/view {:style style/profile-container}
|
[rn/view {:style style/profile-container}
|
||||||
[rn/view {:style {:padding-bottom 2 :margin-right 2}}
|
[rn/view {:style {:padding-bottom 2 :margin-right 2}}
|
||||||
[text/text {:style style/emoji} emoji]]
|
[text/text {:style style/emoji} emoji]]
|
||||||
@ -93,10 +94,10 @@
|
|||||||
:style (style/metrics watch-only? theme)} account-amount]
|
:style (style/metrics watch-only? theme)} account-amount]
|
||||||
[rn/view {:style {:margin-left 4}}
|
[rn/view {:style {:margin-left 4}}
|
||||||
[icon/icon :positive
|
[icon/icon :positive
|
||||||
{:color (if (and watch-only? (not (colors/dark?)))
|
{:color (colors/theme-colors (if watch-only? colors/neutral-50 colors/white-opa-70)
|
||||||
colors/neutral-50
|
colors/white-opa-70
|
||||||
colors/white-opa-70)
|
theme)
|
||||||
:size 16}]]])])]])))
|
:size 16}]]])])])))
|
||||||
|
|
||||||
(defn- add-account-view
|
(defn- add-account-view
|
||||||
[{:keys [on-press customization-color theme metrics?]}]
|
[{:keys [on-press customization-color theme metrics?]}]
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{:padding-top 24
|
{:padding-top 24
|
||||||
:padding-horizontal 20
|
:padding-horizontal 20
|
||||||
:padding-bottom 20
|
:padding-bottom 20
|
||||||
:height 78
|
:height 130
|
||||||
:align-items :center
|
:align-items :center
|
||||||
:justify-content :center})
|
:justify-content :center})
|
||||||
|
|
||||||
|
@ -9,7 +9,9 @@
|
|||||||
|
|
||||||
(defn- loading-state
|
(defn- loading-state
|
||||||
[color]
|
[color]
|
||||||
[:<>
|
[rn/view
|
||||||
|
{:style {:height 130
|
||||||
|
:align-items :center}}
|
||||||
[rn/view
|
[rn/view
|
||||||
(style/loading-bar-margin-bottom {:color color
|
(style/loading-bar-margin-bottom {:color color
|
||||||
:width 104
|
:width 104
|
||||||
@ -99,7 +101,9 @@
|
|||||||
{:style style/account-overview-wrapper}
|
{:style style/account-overview-wrapper}
|
||||||
(if (= :loading state)
|
(if (= :loading state)
|
||||||
[loading-state (colors/theme-colors colors/neutral-5 colors/neutral-90 theme)]
|
[loading-state (colors/theme-colors colors/neutral-5 colors/neutral-90 theme)]
|
||||||
[:<>
|
[rn/view
|
||||||
|
{:style {:height 130
|
||||||
|
:align-items :center}}
|
||||||
[account-details account-name account theme]
|
[account-details account-name account theme]
|
||||||
[text/text
|
[text/text
|
||||||
{:weight :semi-bold
|
{:weight :semi-bold
|
||||||
|
15
src/status_im2/contexts/wallet/account/style.cljs
Normal file
15
src/status_im2/contexts/wallet/account/style.cljs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
(ns status-im2.contexts.wallet.account.style)
|
||||||
|
|
||||||
|
(def tabs
|
||||||
|
{:padding-left 20
|
||||||
|
:padding-vertical 12})
|
||||||
|
|
||||||
|
(def wip
|
||||||
|
{:justify-content :center
|
||||||
|
:align-items :center
|
||||||
|
:flex 1})
|
||||||
|
|
||||||
|
(def empty-container-style
|
||||||
|
{:justify-content :center
|
||||||
|
:flex 1
|
||||||
|
:margin-bottom 44})
|
37
src/status_im2/contexts/wallet/account/tabs/view.cljs
Normal file
37
src/status_im2/contexts/wallet/account/tabs/view.cljs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
(ns status-im2.contexts.wallet.account.tabs.view
|
||||||
|
(:require
|
||||||
|
[quo2.core :as quo]
|
||||||
|
[react-native.core :as rn]
|
||||||
|
[status-im2.contexts.wallet.account.style :as style]
|
||||||
|
[status-im2.contexts.wallet.common.temp :as temp]
|
||||||
|
[utils.i18n :as i18n]))
|
||||||
|
|
||||||
|
(defn view
|
||||||
|
[selected-tab]
|
||||||
|
(case selected-tab
|
||||||
|
:assets [rn/flat-list
|
||||||
|
{:render-fn quo/token-value
|
||||||
|
:data temp/tokens
|
||||||
|
:content-container-style {:padding-horizontal 8}}]
|
||||||
|
:collectibles [quo/empty-state
|
||||||
|
{:title (i18n/label :t/no-collectibles)
|
||||||
|
:description (i18n/label :t/no-collectibles-description)
|
||||||
|
:placeholder? true
|
||||||
|
:container-style style/empty-container-style}]
|
||||||
|
:activity [quo/empty-state
|
||||||
|
{:title (i18n/label :t/no-activity)
|
||||||
|
:description (i18n/label :t/empty-tab-description)
|
||||||
|
:placeholder? true
|
||||||
|
:container-style style/empty-container-style}]
|
||||||
|
:permissions [quo/empty-state
|
||||||
|
{:title (i18n/label :t/no-permissions)
|
||||||
|
:description (i18n/label :t/no-collectibles-description)
|
||||||
|
:placeholder? true
|
||||||
|
:container-style style/empty-container-style}]
|
||||||
|
:dapps [quo/empty-state
|
||||||
|
{:title (i18n/label :t/no-dapps)
|
||||||
|
:description (i18n/label :t/no-collectibles-description)
|
||||||
|
:placeholder? true
|
||||||
|
:container-style style/empty-container-style}]
|
||||||
|
[rn/view {:style style/wip}
|
||||||
|
[quo/text "[WIP]"]]))
|
@ -1,15 +1,47 @@
|
|||||||
(ns status-im2.contexts.wallet.account.view
|
(ns status-im2.contexts.wallet.account.view
|
||||||
(:require [react-native.core :as rn]
|
(:require [react-native.core :as rn]
|
||||||
[quo2.core :as quo]
|
[quo2.core :as quo]
|
||||||
[utils.re-frame :as rf]))
|
[react-native.safe-area :as safe-area]
|
||||||
|
[reagent.core :as reagent]
|
||||||
|
[status-im2.contexts.wallet.common.temp :as temp]
|
||||||
|
[utils.i18n :as i18n]
|
||||||
|
[utils.re-frame :as rf]
|
||||||
|
[status-im2.contexts.wallet.account.style :as style]
|
||||||
|
[status-im2.contexts.wallet.account.tabs.view :as tabs]))
|
||||||
|
|
||||||
|
(def tabs-data
|
||||||
|
[{:id :assets :label (i18n/label :t/assets) :accessibility-label :assets-tab}
|
||||||
|
{:id :collectibles :label (i18n/label :t/collectibles) :accessibility-label :collectibles-tab}
|
||||||
|
{:id :activity :label (i18n/label :t/activity) :accessibility-label :activity-tab}
|
||||||
|
{:id :permissions :label (i18n/label :t/permissions) :accessibility-label :permissions}
|
||||||
|
{:id :dapps :label (i18n/label :t/dapps) :accessibility-label :dapps}
|
||||||
|
{:id :about :label (i18n/label :t/about) :accessibility-label :about}])
|
||||||
|
|
||||||
(defn view
|
(defn view
|
||||||
[]
|
[]
|
||||||
|
(let [top (safe-area/get-top)
|
||||||
|
selected-tab (reagent/atom (:id (first tabs-data)))]
|
||||||
|
(fn []
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style {:flex 1
|
{:style {:flex 1
|
||||||
:align-items :center
|
:margin-top top}}
|
||||||
:justify-content :center}}
|
[quo/page-nav
|
||||||
[quo/text {} "ACCOUNTS PAGE"]
|
{:align-mid? true
|
||||||
[quo/divider-label]
|
:mid-section {:type :text-only :main-text ""}
|
||||||
[quo/button {:on-press #(rf/dispatch [:navigate-back])}
|
:left-section {:type :grey
|
||||||
"NAVIGATE BACK"]])
|
:icon :i/close
|
||||||
|
:on-press #(rf/dispatch [:navigate-back])}
|
||||||
|
:right-section-buttons [{:type :grey
|
||||||
|
:label "[WIP]"
|
||||||
|
:on-press #(rf/dispatch [:open-modal :how-to-pair])}]}]
|
||||||
|
[quo/account-overview temp/account-overview-state]
|
||||||
|
[quo/wallet-graph {:time-frame :empty}]
|
||||||
|
[quo/wallet-ctas]
|
||||||
|
[quo/tabs
|
||||||
|
{:style style/tabs
|
||||||
|
:size 32
|
||||||
|
:default-active @selected-tab
|
||||||
|
:data tabs-data
|
||||||
|
:on-change #(reset! selected-tab %)
|
||||||
|
:scrollable? true}]
|
||||||
|
[tabs/view @selected-tab]])))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
(ns status-im2.contexts.wallet.home.temp
|
(ns status-im2.contexts.wallet.common.temp
|
||||||
(:require [quo2.core :as quo]
|
(:require [quo2.core :as quo]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[utils.re-frame :as rf]))
|
[utils.re-frame :as rf]))
|
||||||
@ -36,7 +36,8 @@
|
|||||||
:percentage-value "€0.00"
|
:percentage-value "€0.00"
|
||||||
:customization-color :blue
|
:customization-color :blue
|
||||||
:type :empty
|
:type :empty
|
||||||
:emoji "🍑"}
|
:emoji "🍑"
|
||||||
|
:on-press #(rf/dispatch [:navigate-to :wallet-accounts])}
|
||||||
{:customization-color :blue
|
{:customization-color :blue
|
||||||
:on-press #(js/alert "Button pressed")
|
:on-press #(js/alert "Button pressed")
|
||||||
:type :add-account}])
|
:type :add-account}])
|
||||||
@ -66,3 +67,9 @@
|
|||||||
:fiat-value "€0.00"
|
:fiat-value "€0.00"
|
||||||
:percentage-change "0.00"
|
:percentage-change "0.00"
|
||||||
:fiat-change "€0.00"}}])
|
:fiat-change "€0.00"}}])
|
||||||
|
|
||||||
|
(def account-overview-state
|
||||||
|
{:current-value "€0.00"
|
||||||
|
:account-name "Account 1"
|
||||||
|
:account :default
|
||||||
|
:customization-color :blue})
|
@ -1,24 +1,17 @@
|
|||||||
(ns status-im2.contexts.wallet.home.style
|
(ns status-im2.contexts.wallet.home.style)
|
||||||
(:require [quo2.foundations.colors :as colors]))
|
|
||||||
|
|
||||||
(def tabs
|
(def tabs
|
||||||
{:padding-horizontal 20
|
{:padding-horizontal 20
|
||||||
:padding-top 8
|
:padding-top 8
|
||||||
:padding-bottom 12})
|
:padding-bottom 12})
|
||||||
|
|
||||||
(def empty-container
|
|
||||||
{:justify-content :center
|
|
||||||
:align-items :center
|
|
||||||
:margin-bottom 44
|
|
||||||
:flex 1})
|
|
||||||
|
|
||||||
(def image-placeholder
|
|
||||||
{:width 80
|
|
||||||
:height 80
|
|
||||||
:background-color colors/danger})
|
|
||||||
|
|
||||||
(def accounts-list
|
(def accounts-list
|
||||||
{:padding-horizontal 20
|
{:padding-horizontal 20
|
||||||
:padding-top 32
|
:padding-top 32
|
||||||
:padding-bottom 12
|
:padding-bottom 12
|
||||||
:max-height 112})
|
:max-height 112})
|
||||||
|
|
||||||
|
(def empty-container-style
|
||||||
|
{:justify-content :center
|
||||||
|
:flex 1
|
||||||
|
:margin-bottom 44})
|
||||||
|
@ -8,27 +8,13 @@
|
|||||||
[status-im2.contexts.wallet.home.style :as style]
|
[status-im2.contexts.wallet.home.style :as style]
|
||||||
[utils.i18n :as i18n]
|
[utils.i18n :as i18n]
|
||||||
[utils.re-frame :as rf]
|
[utils.re-frame :as rf]
|
||||||
[status-im2.contexts.wallet.home.temp :as temp]))
|
[status-im2.contexts.wallet.common.temp :as temp]))
|
||||||
|
|
||||||
(def tabs-data
|
(def tabs-data
|
||||||
[{:id :assets :label (i18n/label :t/assets) :accessibility-label :assets-tab}
|
[{:id :assets :label (i18n/label :t/assets) :accessibility-label :assets-tab}
|
||||||
{:id :collectibles :label (i18n/label :t/collectibles) :accessibility-label :collectibles-tab}
|
{:id :collectibles :label (i18n/label :t/collectibles) :accessibility-label :collectibles-tab}
|
||||||
{:id :activity :label (i18n/label :t/activity) :accessibility-label :activity-tab}])
|
{:id :activity :label (i18n/label :t/activity) :accessibility-label :activity-tab}])
|
||||||
|
|
||||||
(defn collectibles
|
|
||||||
[]
|
|
||||||
[rn/view {:style style/empty-container}
|
|
||||||
[rn/view {:style style/image-placeholder}]
|
|
||||||
[quo/text {:weight :semi-bold :style {:margin-top 12}} (i18n/label :t/no-collectibles)]
|
|
||||||
[quo/text {:size :paragraph-2 :style {:margin-top 2}} (i18n/label :t/no-collectibles-description)]])
|
|
||||||
|
|
||||||
(defn activity
|
|
||||||
[]
|
|
||||||
[rn/view {:style style/empty-container}
|
|
||||||
[rn/view {:style style/image-placeholder}]
|
|
||||||
[quo/text {:weight :semi-bold :style {:margin-top 12}} (i18n/label :t/no-activity)]
|
|
||||||
[quo/text {:size :paragraph-2 :style {:margin-top 2}} (i18n/label :t/no-activity-description)]])
|
|
||||||
|
|
||||||
(defn view
|
(defn view
|
||||||
[]
|
[]
|
||||||
(let [top (safe-area/get-top)
|
(let [top (safe-area/get-top)
|
||||||
@ -59,5 +45,13 @@
|
|||||||
{:render-fn quo/token-value
|
{:render-fn quo/token-value
|
||||||
:data temp/tokens
|
:data temp/tokens
|
||||||
:content-container-style {:padding-horizontal 8}}]
|
:content-container-style {:padding-horizontal 8}}]
|
||||||
:collectibles [collectibles]
|
:collectibles [quo/empty-state
|
||||||
[activity])])))
|
{:title (i18n/label :t/no-collectibles)
|
||||||
|
:description (i18n/label :t/no-collectibles-description)
|
||||||
|
:placeholder? true
|
||||||
|
:container-style style/empty-container-style}]
|
||||||
|
[quo/empty-state
|
||||||
|
{:title (i18n/label :t/no-activity)
|
||||||
|
:description (i18n/label :t/empty-tab-description)
|
||||||
|
:placeholder? true
|
||||||
|
:container-style style/empty-container-style}])])))
|
||||||
|
@ -391,7 +391,7 @@
|
|||||||
"custom-networks": "Custom networks",
|
"custom-networks": "Custom networks",
|
||||||
"dapp": "ÐApp",
|
"dapp": "ÐApp",
|
||||||
"dapp-would-like-to-connect-wallet": "would like to connect to",
|
"dapp-would-like-to-connect-wallet": "would like to connect to",
|
||||||
"dapps": "ÐApps",
|
"dapps": "dApps",
|
||||||
"dapps-permissions": "DApp permissions",
|
"dapps-permissions": "DApp permissions",
|
||||||
"data": "Data",
|
"data": "Data",
|
||||||
"datetime-ago": "ago",
|
"datetime-ago": "ago",
|
||||||
@ -2001,7 +2001,7 @@
|
|||||||
"no-pinned-messages-desc": "This chat doesn't have any pinned messages.",
|
"no-pinned-messages-desc": "This chat doesn't have any pinned messages.",
|
||||||
"no-pinned-messages-community-desc": "This channel doesn't have any pinned messages.",
|
"no-pinned-messages-community-desc": "This channel doesn't have any pinned messages.",
|
||||||
"shell-placeholder-subtitle": "Open tabs of your communities, messages,\nwallet account and browser windows",
|
"shell-placeholder-subtitle": "Open tabs of your communities, messages,\nwallet account and browser windows",
|
||||||
"invite-friends-to-status": "Invite friends to status",
|
"invite-friends-to-status": "Invite friends to Status",
|
||||||
"share-invite-link": "Share an invite link",
|
"share-invite-link": "Share an invite link",
|
||||||
"pending-requests": "Pending requests",
|
"pending-requests": "Pending requests",
|
||||||
"received": "Received",
|
"received": "Received",
|
||||||
@ -2280,10 +2280,13 @@
|
|||||||
"collectibles": "Collectibles",
|
"collectibles": "Collectibles",
|
||||||
"no-collectibles-description": "Don't be a bored ape",
|
"no-collectibles-description": "Don't be a bored ape",
|
||||||
"no-activity": "No activity",
|
"no-activity": "No activity",
|
||||||
"no-activity-description": "C'mon do something...",
|
"empty-tab-description": "C'mon do something...",
|
||||||
"buy": "Buy",
|
"buy": "Buy",
|
||||||
"bridge": "Bridge",
|
"bridge": "Bridge",
|
||||||
"on-device": "On device",
|
"on-device": "On device",
|
||||||
"on-keycard": "On Keycard",
|
"on-keycard": "On Keycard",
|
||||||
"keypair-title": "{{name}}'s default keypair"
|
"keypair-title": "{{name}}'s default keypair",
|
||||||
|
"about": "About",
|
||||||
|
"no-permissions": "No permissions",
|
||||||
|
"no-dapps": "No connected dApps"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user