Skip to content

Commit 0aae13b

Browse files
authored
Chain management (#22508)
1 parent 6cc3c7f commit 0aae13b

File tree

112 files changed

+2423
-1537
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+2423
-1537
lines changed
865 Bytes
Loading
1.37 KB
Loading

src/legacy/status_im/utils/logging/core.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
[clojure.string :as string]
44
[goog.string :as gstring]
55
[legacy.status-im.ui.components.react :as react]
6-
[legacy.status-im.utils.build :as build]
76
[legacy.status-im.utils.deprecated-types :as types]
87
[legacy.status-im.utils.logging.view :as view]
98
[native-module.core :as native-module]
109
[re-frame.core :as re-frame]
1110
[react-native.mmkv :as mmkv]
1211
[react-native.platform :as platform]
12+
[status-im.app-build.core :as build]
1313
[status-im.common.json-rpc.events :as json-rpc]
1414
[status-im.common.log :as common-log]
1515
[status-im.config :as config]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
(ns quo.components.common.dot-separator
2+
(:require [quo.context :as quo.context]
3+
[quo.foundations.colors :as colors]
4+
[react-native.core :as rn]))
5+
6+
(defn view
7+
[{:keys [color size container-style]
8+
:or {size 2}}]
9+
(let [theme (quo.context/use-theme)
10+
default-color (colors/theme-colors colors/neutral-80-opa-60 colors/neutral-40 theme)]
11+
[rn/view
12+
{:style (merge {:padding-horizontal 4
13+
:align-items :center
14+
:justify-content :center}
15+
container-style)}
16+
[rn/view
17+
{:style {:width size
18+
:height size
19+
:border-radius (/ size 2)
20+
:background-color (or color default-color)}}]]))
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
(ns quo.components.common.list.style
2+
(:require [quo.foundations.colors :as colors]))
3+
4+
(defn container
5+
[blur? theme]
6+
{:border-radius 16
7+
:background-color (if blur?
8+
colors/white-opa-5
9+
(colors/theme-colors colors/white colors/neutral-95 theme))
10+
:border-width (if blur? 0 1)
11+
:border-color (if blur?
12+
colors/white-opa-5
13+
(colors/theme-colors colors/neutral-10 colors/neutral-80 theme))})
14+
15+
(defn separator
16+
[blur? theme]
17+
{:height 1
18+
:background-color (if blur?
19+
colors/white-opa-5
20+
(colors/theme-colors colors/neutral-10 colors/neutral-80 theme))})
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
(ns quo.components.common.list.view
2+
(:require
3+
[quo.components.common.list.style :as style]
4+
[quo.context :as quo.context]
5+
[react-native.core :as rn]))
6+
7+
(defn view
8+
[{:keys [data render-fn blur? container-style]}]
9+
(let [theme (quo.context/use-theme)
10+
list-items (remove nil? data)
11+
last-index (dec (count list-items))]
12+
[rn/view {:style (merge (style/container blur? theme) container-style)}
13+
(doall
14+
(map-indexed
15+
(fn [index item]
16+
^{:key index}
17+
[:<>
18+
(render-fn item)
19+
(when-not (= last-index index)
20+
[rn/view {:style (style/separator blur? theme)}])])
21+
list-items))]))

src/quo/components/common/new_feature_gradient.cljs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
[react-native.linear-gradient :as linear-gradient]))
55

66
(defn view
7-
[{:keys [style accessibility-label]}]
7+
[{:keys [style accessibility-label]} & children]
88
(let [theme (quo.context/use-theme)]
9-
[linear-gradient/linear-gradient
10-
{:style style
11-
:accessibility-label accessibility-label
12-
:colors [(colors/resolve-color :yellow theme)
13-
colors/new-feature-gradient-pink]
14-
:use-angle true
15-
:angle 78
16-
:angle-center {:x 0.5 :y 0.5}}]))
9+
(into [linear-gradient/linear-gradient
10+
{:style style
11+
:accessibility-label accessibility-label
12+
:colors [(colors/resolve-color :yellow theme)
13+
colors/new-feature-gradient-pink]
14+
:use-angle true
15+
:angle 78
16+
:angle-center {:x 0.5 :y 0.5}}]
17+
children)))
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
(ns quo.components.counter.fraction-counter.style
2+
(:require [quo.foundations.colors :as colors]))
3+
4+
(def counter
5+
{:padding-top 12
6+
:padding-bottom 2})
7+
8+
(defn counter-text
9+
[error? blur? theme]
10+
{:color (cond
11+
error? (colors/theme-colors colors/danger-50 colors/danger-60 theme)
12+
blur? (colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-40 theme)
13+
:else (colors/theme-colors colors/neutral-40 colors/neutral-50 theme))})
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
(ns quo.components.counter.fraction-counter.view
2+
(:require [quo.components.counter.fraction-counter.style :as style]
3+
[quo.components.markdown.text :as text]
4+
[quo.context :as quo.context]
5+
[react-native.core :as rn]
6+
[schema.core :as schema]
7+
[utils.number :as number]))
8+
9+
(defn- parse-value
10+
[value]
11+
(if (int? value)
12+
value
13+
(number/parse-int value 0)))
14+
15+
(defn- error-state-counter?
16+
[numerator denominator]
17+
(let [numerator (parse-value numerator)
18+
denominator (parse-value denominator)]
19+
(> numerator denominator)))
20+
21+
(defn- view-internal
22+
[{:keys [blur? left-value right-value suffix show-counter-warning?]}]
23+
(let [theme (quo.context/use-theme)
24+
counter-warning? (when show-counter-warning?
25+
(error-state-counter? left-value right-value))]
26+
[rn/view {:style style/counter}
27+
[text/text
28+
{:size :paragraph-2
29+
:weight :regular
30+
:style (style/counter-text counter-warning? blur? theme)}
31+
(str left-value
32+
"/"
33+
right-value
34+
(when suffix
35+
(str " " suffix)))]]))
36+
37+
(def ?schema
38+
[:=>
39+
[:cat
40+
[:map {:closed true}
41+
[:left-value [:or int? string?]]
42+
[:right-value [:or int? string?]]
43+
[:suffix {:optional true} [:maybe string?]]
44+
[:blur? {:optional true} [:maybe boolean?]]
45+
[:show-counter-warning? {:optional true} [:maybe boolean?]]]]
46+
:any])
47+
48+
(def view (schema/instrument #'view-internal ?schema))

src/quo/components/dropdowns/network_dropdown/style.cljs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,20 @@
4040
(def new-chain-indicator
4141
{:position :absolute
4242
:right 0})
43+
44+
(def single-network-container
45+
{:flex-direction :row
46+
:align-items :center
47+
:justify-content :center
48+
:margin-right 4})
49+
50+
(def filtered-container
51+
{:flex-direction :row
52+
:align-items :center
53+
:justify-content :center})
54+
55+
(def single-network-image
56+
{:width 20
57+
:height 20
58+
:border-radius 10
59+
:margin-right 4})

0 commit comments

Comments
 (0)