This repository has been archived by the owner on Sep 21, 2022. It is now read-only.
forked from metamarcdw/nowallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nowallet.kv
332 lines (318 loc) · 13.6 KB
/
nowallet.kv
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
#:kivy 1.10.0
#:import SlideTransition kivy.uix.screenmanager.SlideTransition
#:import RecycleView kivy.uix.recycleview
#:import QRCodeWidget kivy.garden.qrcode
# import ZbarQrcodeDetector android-zbar-qrcode.main
#:import MDLabel kivymd.label.MDLabel
#:import Toolbar kivymd.toolbar.Toolbar
#:import MDTabbedPanel kivymd.tabs.MDTabbedPanel
#:import MDTab kivymd.tabs.MDTab
#:import MDDropdownMenu kivymd.menu.MDDropdownMenu
#:import MDMenuItem kivymd.menu.MDMenuItem
#:import MDCard kivymd.card.MDCard
#:import MDSpinner kivymd.spinner.MDSpinner
#:import MDTextField kivymd.textfields.MDTextField
#:import MDCheckbox kivymd.selectioncontrols.MDCheckbox
BoxLayout:
orientation: "vertical"
Toolbar:
id: toolbar
title: "NOWALLET"
md_bg_color: app.theme_cls.primary_color
background_palette: "Primary"
background_hue: "500"
left_action_items: [["currency-btc", lambda x: None]]
right_action_items: [["menu", lambda x: app.menu_button_handler(self)]]
ScreenManager:
id: sm
transition: SlideTransition(direction="up")
LoginScreen:
name: "login"
AnchorLayout:
BoxLayout:
size_hint: 0.8, 0.55
spacing: 3
orientation: "vertical"
MDTextField:
id: email_field
hint_text: "Email/Salt"
color_mode: "accent"
write_tab: False
required: True
MDTextField:
id: pass_field
hint_text: "Passphrase"
color_mode: "accent"
write_tab: False
password: True
required: True
MDTextField:
id: confirm_field
hint_text: "Confirm Passphrase"
color_mode: "accent"
write_tab: False
password: True
required: True
BoxLayout:
MDCheckbox:
id: bech32_checkbox
size_hint: None, None
size: dp(33), dp(33)
active: True
MDLabel:
text: "Create bech32 wallet"
theme_text_color: "Primary"
font_style:"Caption"
size_hint_y: None
height: dp(33)
MDRaisedButton:
size_hint_x: 1
text: "Create Wallet"
id: login_button
MainScreen:
name: "main"
MDTabbedPanel:
tab_display_mode: "icons"
MDTab:
name: "balance"
text: "Balance"
icon: "bank"
BoxLayout:
orientation: "vertical"
BalanceLabel:
id: balance_label
font_style: "Display1"
theme_text_color: "Primary"
halign: "center"
size_hint_y: None
height: self.texture_size[1] + dp(45)
RecycleView:
id: recycleView
viewclass: "ListItem"
RecycleBoxLayout:
default_size: None, dp(56)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
orientation: "vertical"
MDTab:
name: "send"
text: "Sending"
icon: "debug-step-out"
AnchorLayout:
BoxLayout:
size_hint: 0.9, 0.75
orientation: "vertical"
spacing: 9
BoxLayout:
size_hint: 1, 0.2
spacing: 5
FloatInput:
id: spend_amount_input
text: app.current_coin
hint_text: app.units
color_mode: "accent"
write_tab: False
on_text: app.update_amounts(self.text, "coin")
on_text: app.set_amount_error(self.text)
on_text_validate: app.set_amount_error(self.text)
on_focus: app.set_amount_error(self.text)
FloatInput:
text: app.current_fiat
hint_text: app.currency
color_mode: "accent"
write_tab: False
on_text: app.update_amounts(self.text, "fiat")
MDLabel:
id: send_balance
size_hint: 1, 0.2
theme_text_color: "Primary"
font_style:"Title"
BoxLayout:
size_hint: 1, 0.6
spacing: 5
FloatInput:
id: fee_input
helper_text: "Miner Fee: sat/byte"
helper_text_mode: "persistent"
color_mode: "accent"
write_tab: False
disabled: True
on_text: app.fee_input_handler()
MDRaisedButton:
id: fee_button
size_hint: 0.5, 1
text: "Normal Fee"
BoxLayout:
size_hint: 1, 0.6
spacing: 5
MDTextField:
id: address_input
helper_text: "Enter Address"
helper_text_mode: "persistent"
color_mode: "accent"
write_tab: False
on_text: app.set_address_error(self.text)
on_text_validate: app.set_address_error(self.text)
on_focus: app.set_address_error(self.text)
MDRaisedButton:
id: send_button
size_hint: 0.5, 1
text: "Send TX"
Label:
MDFloatingActionButton:
icon: "camera"
opposite_colors: True
elevation_normal: 8
pos_hint: {"center_x": 0.5, "center_y": 0.2}
id: camera_button
MDTab:
name: "recieve"
text: "Recieving"
icon: "debug-step-into"
AnchorLayout:
BoxLayout:
size_hint: 0.9, 0.8
spacing: 3
orientation: "vertical"
BoxLayout:
size_hint: 1, 0.2
spacing: 5
FloatInput:
text: app.current_coin
hint_text: app.units
color_mode: "accent"
write_tab: False
on_text: app.update_amounts(self.text, "coin")
FloatInput:
text: app.current_fiat
hint_text: app.currency
color_mode: "accent"
write_tab: False
on_text: app.update_amounts(self.text, "fiat")
MDCard:
size_hint: None, None
size: dp(300), dp(320)
pos_hint: {"center_x": 0.5}
BoxLayout:
orientation:"vertical"
padding: dp(10)
spacing: 5
MDLabel:
id: addr_label
theme_text_color: "Primary"
font_style:"Body2"
size_hint_y: None
height: dp(40)
QRCodeWidget:
id: addr_qrcode
show_border: False
# ZbarScreen:
# name: "zbar"
# ZbarQrcodeDetector:
# id: detector
# on_symbols: app.qrcode_handler(self.symbols)
WaitScreen:
name: "wait"
AnchorLayout:
MDSpinner:
size_hint: None, None
size: dp(46), dp(46)
pos_hint: {"center_x": 0.5, "center_y": 0.5}
MDLabel:
id: wait_text
text: "Loading.."
theme_text_color: "Primary"
font_style:"Title"
size_hint: 0.5, None
halign: "center"
pos_hint: {"center_x": 0.5, "center_y": 0.66}
UTXOScreen:
name: "utxo"
RecycleView:
id: utxoRecycleView
viewclass: "UTXOListItem"
RecycleBoxLayout:
default_size: None, dp(56)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
orientation: "vertical"
MDRaisedButton:
size_hint: 0.5, 0.07
pos_hint: {"center_x": 0.5, "center_y": 0.13}
text: "Go Back"
id: utxo_back_button
YPUBScreen:
name: "ypub"
MDCard:
size_hint: None, None
size: dp(320), dp(360)
pos_hint: {"center_x": 0.5, "center_y": 0.55}
BoxLayout:
orientation:"vertical"
padding: dp(10)
spacing: 5
MDLabel:
id: ypub_label
theme_text_color: "Primary"
font_style:"Body2"
size_hint_y: None
height: dp(70)
QRCodeWidget:
id: ypub_qrcode
show_border: False
MDRaisedButton:
size_hint: 0.5, 0.07
pos_hint: {"center_x": 0.5, "center_y": 0.13}
text: "Go Back"
id: ypub_back_button
PINScreen:
name: "pin"
AnchorLayout:
size_hint: 0.8, 0.8
pos_hint: {"center_x": 0.5, "center_y": 0.5}
BoxLayout:
spacing: 5
orientation: "vertical"
FloatInput:
id: pin_input
helper_text: "Enter a PIN"
helper_text_mode: "persistent"
password: True
GridLayout:
cols: 3
spacing: 5
PINButton:
text: "1"
PINButton:
text: "2"
PINButton:
text: "3"
PINButton:
text: "4"
PINButton:
text: "5"
PINButton:
text: "6"
PINButton:
text: "7"
PINButton:
text: "8"
PINButton:
text: "9"
PINButton:
text: "clear"
PINButton:
text: "0"
PINButton:
id: lock_button
text: "lock"
MDRaisedButton:
id: pin_back_button
size_hint: 0.5, 0.07
pos_hint: {"center_x": 0.5, "center_y": 0.13}
text: "Go Back"
<ListItem>:
IconLeftSampleWidget:
icon: self.parent.parent.icon