Skip to content

Commit

Permalink
Update password & delete account WiP, refs #9
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreMiras committed Jun 27, 2017
1 parent fc57d43 commit 96c3d6e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/controller.kv
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,31 @@
# size_hint: None, None
text: root.current_account_string
on_release: root.open_account_list()
MDTextField:
hint_text: "Password"
helper_text: "Enter the for encrypting your new account"
helper_text_mode: "on_focus"
password: True
text: root.password1
on_text: root.password1 = args[1]
MDTextField:
# TODO: do validation as we type
hint_text: "Password (again)"
helper_text: "Retype your password"
helper_text_mode: "on_focus"
password: True
text: root.password2
on_text: root.password2 = args[1]
BoxLayout:
orientation: 'horizontal'
padding: dp(4), dp(4)
spacing: dp(40)
MDRaisedButton:
text: "Update password"
on_release: root.update_password()
MDRaisedButton:
text: "Delete account"
on_release: root.delete_account()
PushUp:


Expand Down
14 changes: 14 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ class ManageExisting(BoxLayout):

current_account = ObjectProperty(None, allownone=True)
current_account_string = StringProperty()
password1 = StringProperty()
password2 = StringProperty()

def __init__(self, **kwargs):
super(ManageExisting, self).__init__(**kwargs)
Expand All @@ -335,6 +337,18 @@ def setup(self):
self.controller = App.get_running_app().controller
self.current_account = self.controller.pywalib.get_main_account()

def delete_account(self):
"""
Not yet implemented.
"""
Controller.show_not_implemented_dialog()

def update_password(self):
"""
Not yet implemented.
"""
Controller.show_not_implemented_dialog()

def on_current_account(self, instance, account):
address = "0x" + account.address.encode("hex")
self.current_account_string = address
Expand Down

0 comments on commit 96c3d6e

Please sign in to comment.