mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-05 13:25:43 +00:00
parent
df2b5147cd
commit
191f5de6f1
@ -18,10 +18,11 @@
|
|||||||
- `blur?` Boolean to enable blur background support.}"
|
- `blur?` Boolean to enable blur background support.}"
|
||||||
[{:keys [default-selected]}]
|
[{:keys [default-selected]}]
|
||||||
(let [selected (reagent/atom default-selected)]
|
(let [selected (reagent/atom default-selected)]
|
||||||
(fn [{:keys [blur? on-change feng-shui?]}]
|
(fn [{:keys [blur? on-change feng-shui? container-style]}]
|
||||||
[rn/scroll-view
|
[rn/scroll-view
|
||||||
{:horizontal true
|
{:horizontal true
|
||||||
:shows-horizontal-scroll-indicator false}
|
:shows-horizontal-scroll-indicator false
|
||||||
|
:content-container-style container-style}
|
||||||
(doall (map (fn [color]
|
(doall (map (fn [color]
|
||||||
[color/view
|
[color/view
|
||||||
{:selected? (= color @selected)
|
{:selected? (= color @selected)
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
[rn/text-input
|
[rn/text-input
|
||||||
{:style
|
{:style
|
||||||
(text/text-style
|
(text/text-style
|
||||||
{:size :heading-2
|
{:size :heading-1
|
||||||
:weight :semi-bold
|
:weight :semi-bold
|
||||||
:style (style/title-text theme)})
|
:style (style/title-text theme)})
|
||||||
:default-value default-value
|
:default-value default-value
|
||||||
|
@ -13,9 +13,10 @@
|
|||||||
{:flex-direction :row
|
{:flex-direction :row
|
||||||
:align-items (if (or tag description) :flex-start :center)})
|
:align-items (if (or tag description) :flex-start :center)})
|
||||||
|
|
||||||
(def sub-container
|
(defn sub-container
|
||||||
|
[align-action]
|
||||||
{:flex-direction :row
|
{:flex-direction :row
|
||||||
:align-items :center})
|
:align-items (or align-action :center)})
|
||||||
|
|
||||||
(def left-container
|
(def left-container
|
||||||
{:margin-left 12
|
{:margin-left 12
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
[{:keys [description-props blur? theme]}]
|
[{:keys [description-props blur? theme]}]
|
||||||
(let [{:keys [text icon]} description-props]
|
(let [{:keys [text icon]} description-props]
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style style/sub-container}
|
{:style (style/sub-container :center)}
|
||||||
[text/text
|
[text/text
|
||||||
{:size :paragraph-2
|
{:size :paragraph-2
|
||||||
:style (style/color blur? theme)}
|
:style (style/color blur? theme)}
|
||||||
@ -93,15 +93,15 @@
|
|||||||
(case action
|
(case action
|
||||||
:arrow [icon/icon :i/chevron-right (style/color blur? theme)]
|
:arrow [icon/icon :i/chevron-right (style/color blur? theme)]
|
||||||
:button [button/button
|
:button [button/button
|
||||||
{:type :outline
|
(merge action-props
|
||||||
:size 24
|
{:type :outline
|
||||||
:on-press (:on-press action-props)}
|
:size 24})
|
||||||
(:button-text action-props)]
|
(:button-text action-props)]
|
||||||
:selector [selectors/toggle action-props]
|
:selector [selectors/toggle action-props]
|
||||||
nil)])
|
nil)])
|
||||||
|
|
||||||
(defn- internal-view
|
(defn- internal-view
|
||||||
[{:keys [title on-press accessibility-label] :as props}]
|
[{:keys [title on-press action-props accessibility-label] :as props}]
|
||||||
[rn/pressable
|
[rn/pressable
|
||||||
{:style (style/container props)
|
{:style (style/container props)
|
||||||
:on-press on-press
|
:on-press on-press
|
||||||
@ -112,7 +112,7 @@
|
|||||||
[text/text {:weight :medium} title]
|
[text/text {:weight :medium} title]
|
||||||
[description-component props]
|
[description-component props]
|
||||||
[tag-component props]]]
|
[tag-component props]]]
|
||||||
[rn/view {:style style/sub-container}
|
[rn/view {:style (style/sub-container (:alignment action-props))}
|
||||||
[label-component props]
|
[label-component props]
|
||||||
[action-component props]]])
|
[action-component props]]])
|
||||||
|
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
(ns status-im2.contexts.wallet.common.temp
|
(ns status-im2.contexts.wallet.common.temp
|
||||||
(:require [quo2.core :as quo]
|
(:require
|
||||||
[quo2.foundations.resources :as quo.resources]
|
[clojure.string :as string]
|
||||||
[react-native.core :as rn]
|
[quo2.core :as quo]
|
||||||
[status-im2.contexts.wallet.common.utils :as utils]
|
[quo2.foundations.resources :as quo.resources]
|
||||||
[utils.i18n :as i18n]
|
[react-native.core :as rn]
|
||||||
[utils.re-frame :as rf]))
|
[status-im2.constants :as constants]
|
||||||
|
[status-im2.contexts.wallet.common.utils :as utils]
|
||||||
|
[utils.i18n :as i18n]
|
||||||
|
[utils.re-frame :as rf]))
|
||||||
|
|
||||||
(def networks
|
(def networks
|
||||||
[{:source (quo.resources/get-network :ethereum)}
|
[{:source (quo.resources/get-network :ethereum)}
|
||||||
@ -78,9 +81,24 @@
|
|||||||
|
|
||||||
(defn create-account-state
|
(defn create-account-state
|
||||||
[name]
|
[name]
|
||||||
[{:title (keypair-string name)
|
[{:title (keypair-string name)
|
||||||
:button-props {:title (i18n/label :t/edit)}
|
:image :avatar
|
||||||
:left-icon :i/placeholder}
|
:image-props {:full-name "A Y"
|
||||||
{:title (i18n/label :t/derivation-path)
|
:size :xxs
|
||||||
:button-props {:title (i18n/label :t/edit)}
|
:customization-color :blue}
|
||||||
:left-icon :i/derivated-path}])
|
:action :button
|
||||||
|
:action-props {:on-press #(js/alert "Button pressed!")
|
||||||
|
:button-text (i18n/label :t/edit)
|
||||||
|
:alignment :flex-start}
|
||||||
|
:description :text
|
||||||
|
:description-props {:text (i18n/label :t/on-device)}}
|
||||||
|
{:title (i18n/label :t/derivation-path)
|
||||||
|
:image :icon
|
||||||
|
:image-props :i/derivated-path
|
||||||
|
:action :button
|
||||||
|
:action-props {:on-press #(js/alert "Button pressed!")
|
||||||
|
:button-text (i18n/label :t/edit)
|
||||||
|
:icon-left :i/placeholder
|
||||||
|
:alignment :flex-start}
|
||||||
|
:description :text
|
||||||
|
:description-props {:text (string/replace constants/path-default-wallet #"/" " / ")}}])
|
||||||
|
@ -24,20 +24,17 @@
|
|||||||
:padding-bottom 16})
|
:padding-bottom 16})
|
||||||
|
|
||||||
(def color-picker-container
|
(def color-picker-container
|
||||||
{:padding-vertical 12
|
{:padding-vertical 12})
|
||||||
:padding-horizontal 20})
|
|
||||||
|
|
||||||
(defn color-label
|
(defn color-label
|
||||||
[theme]
|
[theme]
|
||||||
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)
|
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)
|
||||||
:padding-bottom 4})
|
:padding-bottom 4
|
||||||
|
:padding-horizontal 20})
|
||||||
|
|
||||||
(defn divider-line
|
(def divider-line
|
||||||
[theme]
|
{:margin-top 12
|
||||||
{:border-color (colors/theme-colors colors/neutral-10 colors/neutral-90 theme)
|
:margin-bottom 8})
|
||||||
:padding-top 12
|
|
||||||
:padding-bottom 8
|
|
||||||
:border-bottom-width 1})
|
|
||||||
|
|
||||||
(defn slide-button-container
|
(defn slide-button-container
|
||||||
[bottom]
|
[bottom]
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
:disabled? false
|
:disabled? false
|
||||||
:default-value "Account 2"
|
:default-value "Account 2"
|
||||||
:container-style style/title-input-container}]
|
:container-style style/title-input-container}]
|
||||||
|
[quo/divider-line]
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style style/color-picker-container}
|
{:style style/color-picker-container}
|
||||||
[quo/text
|
[quo/text
|
||||||
@ -66,14 +67,16 @@
|
|||||||
(i18n/label :t/colour)]
|
(i18n/label :t/colour)]
|
||||||
[quo/color-picker
|
[quo/color-picker
|
||||||
{:default-selected @account-color
|
{:default-selected @account-color
|
||||||
:on-change #(reset! account-color %)}]]
|
:on-change #(reset! account-color %)
|
||||||
[rn/view {:style (style/divider-line theme)}]
|
:container-style {:padding-horizontal 12
|
||||||
|
:padding-vertical 12}}]]
|
||||||
|
[quo/divider-line]
|
||||||
[quo/category
|
[quo/category
|
||||||
{:list-type :settings
|
{:list-type :settings
|
||||||
:label (i18n/label :t/origin)
|
:label (i18n/label :t/origin)
|
||||||
:data (temp/create-account-state display-name)}]
|
:data (temp/create-account-state display-name)}]
|
||||||
[quo/slide-button
|
[quo/slide-button
|
||||||
{:track-text (i18n/label :t/slide-create)
|
{:track-text (i18n/label :t/slide-to-sign)
|
||||||
:track-icon :face-id
|
:track-icon :face-id
|
||||||
:customization-color @account-color
|
:customization-color @account-color
|
||||||
:on-complete (fn []
|
:on-complete (fn []
|
||||||
|
@ -2300,7 +2300,7 @@
|
|||||||
"add-address-description": "Watch a public address or ENS name",
|
"add-address-description": "Watch a public address or ENS name",
|
||||||
"colour": "Colour",
|
"colour": "Colour",
|
||||||
"origin": "Origin",
|
"origin": "Origin",
|
||||||
"slide-create": "Slide to create account",
|
"slide-to-sign": "Slide to sign",
|
||||||
"user-keypair": "{{name}}'s Keypair",
|
"user-keypair": "{{name}}'s Keypair",
|
||||||
"trip-accounts": "Trip accounts",
|
"trip-accounts": "Trip accounts",
|
||||||
"destroy": "Destroy",
|
"destroy": "Destroy",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user