2018-08-04 10:30:12 +02:00
#:import la kivy.adapters.listadapter
#:import factory kivy.factory
#:import mpybit bitmessagekivy.mpybit
2018-08-21 14:48:16 +02:00
#:import C kivy.utils.get_color_from_hex
2018-08-04 10:30:12 +02:00
2018-07-18 14:49:39 +02:00
<Navigator>:
id: nav_drawer
NavigationDrawerIconButton:
2018-08-04 10:30:12 +02:00
Spinner:
pos_hint:{"x":0,"y":.3}
2018-07-18 14:49:39 +02:00
id: btn
2018-08-04 10:30:12 +02:00
background_color: app.theme_cls.primary_dark
2018-08-07 08:14:14 +02:00
text: app.showmeaddresses(name='text')
values: app.showmeaddresses(name='values')
2018-08-09 12:20:20 +02:00
on_text:app.getCurrentAccountData(self.text)
2018-07-18 14:49:39 +02:00
NavigationDrawerIconButton:
2018-08-04 10:30:12 +02:00
icon: 'email-open'
2018-07-18 14:49:39 +02:00
text: "inbox"
on_release: app.root.ids.scr_mngr.current = 'inbox'
NavigationDrawerIconButton:
2018-08-04 10:30:12 +02:00
icon: 'mail-send'
2018-07-18 14:49:39 +02:00
text: "sent"
on_release: app.root.ids.scr_mngr.current = 'sent'
NavigationDrawerIconButton:
2018-08-04 10:30:12 +02:00
icon: 'dropbox'
2018-07-18 14:49:39 +02:00
text: "trash"
on_release: app.root.ids.scr_mngr.current = 'trash'
NavigationDrawerIconButton:
icon: 'email'
2018-08-04 10:30:12 +02:00
text: "drafts"
2018-07-18 14:49:39 +02:00
on_release: app.root.ids.scr_mngr.current = 'dialog'
NavigationDrawerIconButton:
2018-08-04 10:30:12 +02:00
icon: 'markunread-mailbox'
2018-07-18 14:49:39 +02:00
text: "test"
on_release: app.root.ids.scr_mngr.current = 'test'
2018-07-24 12:05:39 +02:00
NavigationDrawerIconButton:
text: "new identity"
2018-08-04 10:30:12 +02:00
icon:'accounts-add'
2018-07-24 12:05:39 +02:00
on_release: app.root.ids.scr_mngr.current = 'newidentity'
2018-07-18 14:49:39 +02:00
BoxLayout:
orientation: 'vertical'
Toolbar:
id: toolbar
2018-08-31 13:19:57 +02:00
title: app.getCurrentAccount()
2018-07-18 14:49:39 +02:00
background_color: app.theme_cls.primary_dark
left_action_items: [['menu', lambda x: app.nav_drawer.toggle()]]
2018-07-07 14:11:58 +02:00
Button:
2018-07-18 14:49:39 +02:00
text:"EXIT"
2018-07-07 14:11:58 +02:00
color: 0,0,0,1
background_color: (0,0,0,0)
2018-08-04 10:30:12 +02:00
size_hint_y: 0.4
2018-08-31 13:19:57 +02:00
size_hint_x: 0.1
2018-07-18 14:49:39 +02:00
pos_hint: {'x': 0.8, 'y':0.4}
on_press: app.say_exit()
ScreenManager:
id: scr_mngr
Inbox:
id:sc1
Sent:
id:sc2
Trash:
id:sc3
Dialog:
id:sc4
Test:
id:sc5
Create:
id:sc6
2018-07-24 12:05:39 +02:00
NewIdentity:
id:sc7
2018-08-04 10:30:12 +02:00
Page:
id:sc8
AddressSuccessful:
id:sc9
2018-07-18 14:49:39 +02:00
Button:
2018-08-21 14:48:16 +02:00
id:create
2018-07-18 14:49:39 +02:00
height:100
2018-08-21 14:48:16 +02:00
size_hint_y: 0.13
2018-07-18 14:49:39 +02:00
size_hint_x: 0.1
pos_hint: {'x': 0.85, 'y': 0.5}
background_color: (0,0,0,0)
on_press: scr_mngr.current = 'create'
Image:
source: 'images/plus.png'
2018-08-21 14:48:16 +02:00
y: self.parent.y - 7.5
2018-07-18 14:49:39 +02:00
x: self.parent.x + self.parent.width - 50
size: 70, 70
2018-08-04 10:30:12 +02:00
2018-08-21 14:48:16 +02:00
<SwipeButton@Carousel>:
text: ''
size_hint_y: None
height: 48
ignore_perpendicular_swipes: True
data_index: 0
min_move: 20 / self.width
on__offset: app.update_index(root.data_index, self.index)
canvas.before:
Color:
rgba: C('FFFFFF33')
Rectangle:
pos: self.pos
size: self.size
Line:
rectangle: self.pos + self.size
Button:
text: 'delete ({}:{})'.format(root.text, root.data_index)
on_press: app.delete(root.data_index)
Button:
text: root.text
on_press: app.getInboxMessageDetail(self.text)
Button:
text: 'archive'
on_press: app.archive(root.data_index)
2018-08-04 10:30:12 +02:00
2018-07-18 14:49:39 +02:00
<Inbox>:
name: 'inbox'
2018-08-21 14:48:16 +02:00
RecycleView:
data: root.data
viewclass: 'SwipeButton'
do_scroll_x: False
scroll_timeout: 100
RecycleBoxLayout:
id:rc
orientation: 'vertical'
2018-08-04 10:30:12 +02:00
size_hint_y: None
height: self.minimum_height
2018-08-21 14:48:16 +02:00
default_size_hint: 1, None
canvas.before:
2018-08-04 10:30:12 +02:00
Color:
2018-08-21 14:48:16 +02:00
rgba: 0,0,0, 1
2018-08-04 10:30:12 +02:00
Rectangle:
pos: self.pos
size: self.size
2018-07-18 14:49:39 +02:00
<Sent>:
name: 'sent'
2018-08-21 14:48:16 +02:00
RecycleView:
data: root.data
viewclass: 'SwipeButton'
do_scroll_x: False
scroll_timeout: 100
RecycleBoxLayout:
id:rc
orientation: 'vertical'
2018-08-09 12:20:20 +02:00
size_hint_y: None
height: self.minimum_height
2018-08-21 14:48:16 +02:00
default_size_hint: 1, None
canvas.before:
2018-08-09 12:20:20 +02:00
Color:
2018-08-21 14:48:16 +02:00
rgba: 0,0,0, 1
2018-08-09 12:20:20 +02:00
Rectangle:
pos: self.pos
size: self.size
2018-07-18 14:49:39 +02:00
<Trash>:
name: 'trash'
2018-08-21 14:48:16 +02:00
RecycleView:
data: root.data
viewclass: 'SwipeButton'
do_scroll_x: False
scroll_timeout: 100
RecycleBoxLayout:
id:rc
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height
default_size_hint: 1, None
canvas.before:
Color:
rgba: 0,0,0, 1
Rectangle:
pos: self.pos
size: self.size
2018-07-19 13:47:37 +02:00
2018-07-18 14:49:39 +02:00
<Dialog>:
name: 'dialog'
2018-07-07 14:11:58 +02:00
Label:
2018-07-18 14:49:39 +02:00
text:"I have a good dialox box"
color: 0,0,0,1
<Test>:
name: 'test'
2018-07-07 14:11:58 +02:00
Label:
2018-07-19 13:47:37 +02:00
text:"I am in test"
2018-07-18 14:49:39 +02:00
color: 0,0,0,1
<Create>:
name: 'create'
GridLayout:
rows: 5
cols: 1
2018-07-24 12:05:39 +02:00
padding: 60,60,60,60
2018-07-18 14:49:39 +02:00
spacing: 50
BoxLayout:
size_hint_y: None
height: '32dp'
2018-07-07 14:11:58 +02:00
Label:
2018-07-18 14:49:39 +02:00
text: 'FROM'
2018-07-07 14:11:58 +02:00
color: 0,0,0,1
2018-07-24 12:05:39 +02:00
Spinner:
size_hint: 1,1
pos_hint: {"x":0,"top":1.}
pos: 10,10
id: spinner_id
2018-08-07 08:14:14 +02:00
text: app.showmeaddresses(name='text')
values: app.showmeaddresses(name='values')
2018-07-07 14:11:58 +02:00
2018-07-18 14:49:39 +02:00
BoxLayout:
size_hint_y: None
height: '32dp'
2018-07-07 14:11:58 +02:00
Label:
2018-07-18 14:49:39 +02:00
text: 'TO'
2018-07-07 14:11:58 +02:00
color: 0,0,0,1
TextInput:
2018-07-24 12:05:39 +02:00
id: recipent
hint_text: 'To'
2018-07-07 14:11:58 +02:00
2018-07-18 14:49:39 +02:00
BoxLayout:
size_hint_y: None
height: '32dp'
2018-07-07 14:11:58 +02:00
Label:
2018-07-18 14:49:39 +02:00
text: 'SUBJECT'
2018-07-07 14:11:58 +02:00
color: 0,0,0,1
2018-07-18 14:49:39 +02:00
TextInput:
2018-07-24 12:05:39 +02:00
id: subject
hint_text: 'SUBJECT'
2018-07-07 14:11:58 +02:00
2018-07-18 14:49:39 +02:00
BoxLayout:
size_hint_y: None
height: '32dp'
Label:
text: 'BODY'
color: 0,0,0,1
2018-07-07 14:11:58 +02:00
TextInput:
2018-07-24 12:05:39 +02:00
id: message
2018-07-07 14:11:58 +02:00
multiline:True
size_hint: 1,2
2018-07-03 11:08:02 +02:00
2018-07-18 14:49:39 +02:00
Button:
2018-07-24 14:42:53 +02:00
text: 'send'
2018-07-18 14:49:39 +02:00
size_hint_y: 0.1
2018-07-24 14:42:53 +02:00
size_hint_x: 0.2
2018-07-18 14:49:39 +02:00
height: '32dp'
2018-07-24 12:05:39 +02:00
pos_hint: {'x': .5, 'y': 0.1}
on_press: root.send()
2018-07-24 14:42:53 +02:00
Button:
text: 'cancel'
size_hint_y: 0.1
size_hint_x: 0.2
height: '32dp'
pos_hint: {'x': .72, 'y': 0.1}
on_press: root.cancel()
2018-07-24 12:05:39 +02:00
<NewIdentity>:
name: 'newidentity'
GridLayout:
padding: '120dp'
cols: 1
Label:
text:"""Here you may generate as many addresses as you like. Indeed, creating and abandoning addresses is encouraged."""
line_height:1.5
text_size:(700,None)
color: 0,0,0,1
BoxLayout:
CheckBox:
canvas.before:
Color:
rgb: 1,0,0
Ellipse:
pos:self.center_x-8, self.center_y-8
size:[16,16]
group: "money"
2018-08-04 10:30:12 +02:00
id:chk
text:"use a random number generator to make an address"
on_active:
root.checked = self.text
active:root.is_active
2018-07-24 12:05:39 +02:00
Label:
text: "use a random number generator to make an address"
color: 0,0,0,1
BoxLayout:
CheckBox:
canvas.before:
Color:
rgb: 1,0,0
Ellipse:
pos:self.center_x-8, self.center_y-8
size:[16,16]
group: "money"
2018-08-04 10:30:12 +02:00
id:chk
text:"use a pseudo number generator to make an address"
on_active:
root.checked = self.text
active:not root.is_active
2018-07-24 12:05:39 +02:00
Label:
2018-08-04 10:30:12 +02:00
text: "use a pseudo number generator to make an address"
2018-07-24 12:05:39 +02:00
color: 0,0,0,1
Label:
color: 0,0,0,1
size_hint_x: .35
markup: True
text: "[b]{}[/b]".format("Randomly generated addresses")
BoxLayout:
size_hint_y: None
height: '32dp'
Label:
text: "Label (not shown to anyone except you)"
color: 0,0,0,1
BoxLayout:
size_hint_y: None
height: '32dp'
TextInput:
id: label
Button:
text: 'Cancel'
size_hint_y: 0.1
size_hint_x: 0.3
height: '32dp'
pos_hint: {'x': .1, 'y': 0.1}
Button:
text: 'Ok'
size_hint_y: 0.1
size_hint_x: 0.3
height: '32dp'
2018-08-04 10:30:12 +02:00
pos_hint: {'x': .5, 'y': 0.1}
on_press: root.generateaddress()
<Page>:
name: 'page'
2018-09-05 13:33:01 +02:00
ActionBar:
background_color:0,0,0,0
pos_hint: {'top':0.98}
size_hint_y: 0.05
size_hint_x: 0.07
ActionView:
ActionPrevious:
with_previous: False
app_icon: 'images/back-button.png'
markup:True
font_size:"16dp"
on_release: app.set_previous_screen()
Label:
text:"Message sent on 5 september 2018 05:44"
color: 0,0,0,1
size: self.texture_size
size_hint: (None, None)
2018-08-04 10:30:12 +02:00
Label:
2018-09-05 13:33:01 +02:00
text: 'I am on description of my email yooooo I am on description of my email yooooo description description\nI am on description of my email yooooo am on description of my email yooooo description description \nI am on description of my email yooooo I am on description of my email yooooo description description \nI am on description of my email yooooo am on description of my email yooooo description description \nI am on description of my email yooooo I am on description of my email yooooo description description \nI am on description of my email yooooo am on description of my email yooooo description description \nI am on description of my email yooooo I am on description of my email yooooo description description \nI am on description of my email yooooo am on description of my email yooooo description description \nI am on description of my email yooooo I am on description of my email yooooo description description \nI am on description of my email yooooo am on description of my email yooooo description description \nI am on description of my email yooooo I am on description of my email yooooo description description \nI am on description of my email yooooo am on description of my email yooooo description description \nI am on description of my email yooooo I am on description of my email yooooo description description\nI am on description of my email yooooo I am on description of my email yooooo description description\nI am on description of my email yooooo I am on description of my email yooooo description description\nI am on description of my email yooooo I am on description of my email yooooo description description\nI am on description of my email yooooo I am on description of my email yooooo description description\n'
2018-08-04 10:30:12 +02:00
color: 0,0,0,1
<AddressSuccessful>:
name: 'add_sucess'
Label:
text: 'Successfully created a new bit address'
color: 0,0,0,1