mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-02-21 17:20:37 +02:00
SettingsLayout: add checkbox 'ask for password before sending a transaction'
This commit is contained in:
parent
a75a0fb8c5
commit
ffceda9159
14
main.qml
14
main.qml
@ -1367,6 +1367,7 @@ ApplicationWindow {
|
||||
property int segregationHeight: 0
|
||||
property int kdfRounds: 1
|
||||
property bool hideBalance: false
|
||||
property bool askPasswordBeforeSending: true
|
||||
property bool lockOnUserInActivity: true
|
||||
property int walletMode: 2
|
||||
property int lockOnUserInActivityInterval: 10 // minutes
|
||||
@ -1402,23 +1403,30 @@ ApplicationWindow {
|
||||
z: parent.z + 1
|
||||
id: transactionConfirmationPopup
|
||||
onAccepted: {
|
||||
close();
|
||||
passwordDialog.onAcceptedCallback = function() {
|
||||
if(walletPassword === passwordDialog.password){
|
||||
var handleAccepted = function() {
|
||||
// Save transaction to file if view only wallet
|
||||
if (viewOnly) {
|
||||
saveTxDialog.open();
|
||||
} else {
|
||||
handleTransactionConfirmed()
|
||||
}
|
||||
}
|
||||
close();
|
||||
passwordDialog.onAcceptedCallback = function() {
|
||||
if(walletPassword === passwordDialog.password){
|
||||
handleAccepted()
|
||||
} else {
|
||||
passwordDialog.showError(qsTr("Wrong password") + translationManager.emptyString);
|
||||
}
|
||||
}
|
||||
passwordDialog.onRejectedCallback = null;
|
||||
if(!persistentSettings.askPasswordBeforeSending) {
|
||||
handleAccepted()
|
||||
} else {
|
||||
passwordDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StandardDialog {
|
||||
z: parent.z + 1
|
||||
|
@ -79,6 +79,13 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.CheckBox {
|
||||
id: askPasswordBeforeSendingCheckbox
|
||||
checked: persistentSettings.askPasswordBeforeSending
|
||||
onClicked: persistentSettings.askPasswordBeforeSending = !persistentSettings.askPasswordBeforeSending
|
||||
text: qsTr("Ask for password before sending a transaction") + translationManager.emptyString
|
||||
}
|
||||
|
||||
MoneroComponents.CheckBox {
|
||||
id: userInActivityCheckbox
|
||||
checked: persistentSettings.lockOnUserInActivity
|
||||
|
Loading…
Reference in New Issue
Block a user