Skip to content

Commit acb0c49

Browse files
committed
lint
1 parent 582f297 commit acb0c49

File tree

3 files changed

+73
-48
lines changed

3 files changed

+73
-48
lines changed

ios/Podfile.lock

+4
Original file line numberDiff line numberDiff line change
@@ -772,11 +772,15 @@ SPEC CHECKSUMS:
772772
RNLanguages: 962e562af0d34ab1958d89bcfdb64fafc37c513e
773773
RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467
774774
RNReactNativeHapticFeedback: 2566b468cc8d0e7bb2f84b23adc0f4614594d071
775+
<<<<<<< HEAD
775776
<<<<<<< HEAD
776777
RNReanimated: 43adb0307a62c1ce9694f36f124ca3b51a15272a
777778
=======
778779
RNReanimated: 06a228c5a245ef7b5b03f0efc29d76ce4db9031c
779780
>>>>>>> c50db2fd2 (lint)
781+
=======
782+
RNReanimated: d0db0ee059c33381bca787a2193c27e52750ccaf
783+
>>>>>>> a52fda25e (lint)
780784
RNShare: d82e10f6b7677f4b0048c23709bd04098d5aee6c
781785
RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8
782786
RNSVG: 80584470ff1ffc7994923ea135a3e5ad825546b9

src/quo2/components/wallet/keypair/style.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(:require [quo2.foundations.colors :as colors]))
33

44
(defn container
5-
[selected? blur? customization-color theme]
5+
[{:keys [blur? customization-color theme selected?]}]
66
{:flex 1
77
:border-radius 20
88
:border-width 1

src/quo2/components/wallet/keypair/view.cljs

+68-47
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,41 @@
2525
(if (= stored :on-device) (i18n/label :t/on-device) (i18n/label :t/on-keycard))))
2626

2727
(defn avatar
28-
[type full-name customization-color]
29-
(if (= type :default-keypair)
30-
[user-avatar/user-avatar
31-
{:full-name full-name
32-
:ring? true
33-
:size :small
34-
:customization-color customization-color}]
35-
[icon-avatar/icon-avatar
36-
{:size :size/s-32
37-
:icon :i/placeholder
38-
:border? true}]))
28+
[{:keys [type details customization-color]}]
29+
(let [{:keys [full-name]} details]
30+
(if (= type :default-keypair)
31+
[user-avatar/user-avatar
32+
{:full-name full-name
33+
:ring? true
34+
:size :small
35+
:customization-color customization-color}]
36+
[icon-avatar/icon-avatar
37+
{:size :size/s-32
38+
:icon :i/placeholder
39+
:border? true}])))
3940

4041
(defn title-view
41-
[full-name action selected? type blur? customization-color on-options-press theme]
42-
[rn/view
43-
{:style style/title-container
44-
:accessibility-label :title}
45-
[text/text {:weight :semi-bold}
46-
(if (= type :default-keypair) (keypair-string full-name) full-name)]
47-
(if (= action :selector)
48-
[selectors/radio
49-
{:checked? selected?
50-
:blur? blur?
51-
:customization-color customization-color}]
52-
[rn/pressable {:on-press on-options-press}
53-
[icon/icon :i/options
54-
{:color (if blur?
55-
colors/white-opa-70
56-
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))
57-
:accessibility-label :options-button}]])])
42+
[{:keys [details action selected? type blur? customization-color on-options-press theme]}]
43+
(let [{:keys [full-name]} details]
44+
[rn/view
45+
{:style style/title-container
46+
:accessibility-label :title}
47+
[text/text {:weight :semi-bold}
48+
(if (= type :default-keypair) (keypair-string full-name) full-name)]
49+
(if (= action :selector)
50+
[selectors/radio
51+
{:checked? selected?
52+
:blur? blur?
53+
:customization-color customization-color}]
54+
[rn/pressable {:on-press on-options-press}
55+
[icon/icon :i/options
56+
{:color (if blur?
57+
colors/white-opa-70
58+
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))
59+
:accessibility-label :options-button}]])]))
5860

5961
(defn details-view
62+
<<<<<<< HEAD
6063
[address stored blur? theme]
6164
[rn/view
6265
{:style {:flex-direction :row
@@ -79,28 +82,46 @@
7982
colors/white-opa-40
8083
(colors/theme-colors colors/neutral-50 colors/neutral-40))}]])])
8184
>>>>>>> be98d71dc (quo2: keypair blur)
85+
=======
86+
[details stored blur? theme]
87+
(let [{:keys [address]} details]
88+
[rn/view
89+
{:style {:flex-direction :row
90+
:align-items :center}}
91+
[text/text
92+
{:size :paragraph-2
93+
:accessibility-label :details
94+
:style {:color (if blur?
95+
colors/white-opa-40
96+
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))}}
97+
(details-string address stored)]
98+
(when (= stored :on-keycard)
99+
[rn/view {:style {:margin-left 4}}
100+
[icon/icon :i/keycard-card
101+
{:size 16
102+
:color (if blur?
103+
colors/white-opa-40
104+
(colors/theme-colors colors/neutral-50 colors/neutral-40))}]])]))
105+
>>>>>>> a52fda25e (lint)
82106

83107
(defn- view-internal
84108
[]
85109
(let [selected? (reagent/atom true)]
86-
(fn [{:keys [theme accounts customization-color type details stored action blur? on-options-press]}]
87-
(let [{:keys [address full-name]} details]
88-
[rn/pressable
89-
{:style (style/container @selected? blur? customization-color theme)
90-
:on-press #(when (= action :selector) (reset! selected? (not @selected?)))}
91-
[rn/view {:style style/header-container}
92-
[avatar type full-name customization-color]
93-
[rn/view
94-
{:style {:margin-left 8
95-
:flex 1}}
96-
[title-view full-name action @selected? type blur? customization-color on-options-press theme]
97-
[details-view address stored blur? theme]]]
98-
[rn/flat-list
99-
{:data accounts
100-
:render-fn account-list-card/view
101-
:separator [rn/view {:style {:height 8}}]
102-
:style {:padding-horizontal 8}}]]))))
110+
(fn [{:keys [accounts action] :as props}]
111+
[rn/pressable
112+
{:style (style/container (merge props {:selected? @selected?}))
113+
:on-press #(when (= action :selector) (reset! selected? (not @selected?)))}
114+
[rn/view {:style style/header-container}
115+
[avatar props]
116+
[rn/view
117+
{:style {:margin-left 8
118+
:flex 1}}
119+
[title-view (merge props {:selected? @selected?})]
120+
[details-view props]]]
121+
[rn/flat-list
122+
{:data accounts
123+
:render-fn account-list-card/view
124+
:separator [rn/view {:style {:height 8}}]
125+
:style {:padding-horizontal 8}}]])))
103126

104127
(def view (quo.theme/with-theme view-internal))
105-
106-
;; todo: mapize, fix dot

0 commit comments

Comments
 (0)