From cf488f4406bd9e6f8726a180f56aff017408a706 Mon Sep 17 00:00:00 2001 From: stoffu Date: Fri, 22 Sep 2017 23:25:25 +0900 Subject: Allow password to be changed --- pages/Settings.qml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'pages') diff --git a/pages/Settings.qml b/pages/Settings.qml index a83b53ee..61844b4f 100644 --- a/pages/Settings.qml +++ b/pages/Settings.qml @@ -164,6 +164,32 @@ Rectangle { } } } + + StandardButton { + id: changePasswordButton + text: qsTr("Change password") + translationManager.emptyString + shadowReleasedColor: "#FF4304" + shadowPressedColor: "#B32D00" + releasedColor: "#FF6C3C" + pressedColor: "#FF4304" + onClicked: { + passwordDialog.onAcceptedCallback = function() { + if(appWindow.walletPassword === passwordDialog.password){ + newPasswordDialog.open() + } else { + informationPopup.title = qsTr("Error") + translationManager.emptyString; + informationPopup.text = qsTr("Wrong password"); + informationPopup.open() + informationPopup.onCloseCallback = function() { + changePasswordDialog.open() + } + passwordDialog.open() + } + } + passwordDialog.onRejectedCallback = null; + passwordDialog.open() + } + } } RowLayout { -- cgit v1.2.3