This repository was archived by the owner on Jul 22, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 993
Expand file tree
/
Copy pathview.cljs
More file actions
80 lines (71 loc) · 2.46 KB
/
Copy pathview.cljs
File metadata and controls
80 lines (71 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
(ns status-im.contexts.settings.wallet.wallet-options.view
(:require [quo.core :as quo]
[react-native.safe-area :as safe-area]
[status-im.contexts.settings.wallet.wallet-options.style :as style]
[status-im.feature-flags :as ff]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
(defn open-saved-addresses-settings-modal
[]
(rf/dispatch [:navigate-to-within-stack [:screen/settings.saved-addresses :screen/settings]]))
(defn open-keypairs-and-accounts-settings-modal
[]
(rf/dispatch [:navigate-to-within-stack [:screen/settings.keypairs-and-accounts :screen/settings]]))
(defn basic-settings-options
[]
[(when (ff/enabled? ::ff/settings.keypairs-and-accounts)
{:title (i18n/label :t/keypairs-and-accounts)
:blur? true
:on-press open-keypairs-and-accounts-settings-modal
:action :arrow})
(when (ff/enabled? ::ff/settings.saved-addresses)
{:title (i18n/label :t/saved-addresses)
:blur? true
:on-press open-saved-addresses-settings-modal
:action :arrow})])
(defn basic-settings
[]
[quo/category
{:key :basic-wallet-settings
:label (i18n/label :t/keypairs-accounts-and-addresses)
:data (basic-settings-options)
:blur? true
:list-type :settings}])
(defn open-network-settings-modal
[]
(rf/dispatch [:navigate-to-within-stack [:screen/settings.network-settings :screen/settings]]))
(defn advanced-settings-options
[]
[{:title (i18n/label :t/network-settings)
:blur? true
:on-press open-network-settings-modal
:action :arrow}])
(defn advanced-settings
[]
[quo/category
{:key :advanced-wallet-settings
:label (i18n/label :t/advanced)
:data (advanced-settings-options)
:blur? true
:list-type :settings}])
(defn navigate-back
[]
(rf/dispatch [:navigate-back]))
(defn view
[]
(let [inset-top (safe-area/get-top)]
[quo/overlay
{:type :shell
:container-style (style/page-wrapper inset-top)}
[quo/page-nav
{:key :header
:background :blur
:icon-name :i/arrow-left
:on-press navigate-back}]
[quo/page-top
{:title (i18n/label :t/wallet)
:title-accessibility-label :wallet-settings-header}]
(when (or (ff/enabled? ::ff/settings.keypairs-and-accounts)
(ff/enabled? ::ff/settings.saved-addresses))
[basic-settings])
[advanced-settings]]))