mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 12:54:30 +00:00
main: hide/show popups before/after inactivity screen lock
This commit is contained in:
parent
937cb98256
commit
8411ec0787
1 changed files with 10 additions and 1 deletions
11
main.qml
11
main.qml
|
@ -2212,6 +2212,8 @@ ApplicationWindow {
|
||||||
if(!persistentSettings.lockOnUserInActivity) return;
|
if(!persistentSettings.lockOnUserInActivity) return;
|
||||||
if(passwordDialog.visible) return;
|
if(passwordDialog.visible) return;
|
||||||
var inputDialogVisible = inputDialog && inputDialog.visible
|
var inputDialogVisible = inputDialog && inputDialog.visible
|
||||||
|
var successfulTxPopupVisible = successfulTxPopup && successfulTxPopup.visible
|
||||||
|
var informationPopupVisible = informationPopup && informationPopup.visible
|
||||||
|
|
||||||
// prompt password after X seconds of inactivity
|
// prompt password after X seconds of inactivity
|
||||||
var epoch = Math.floor((new Date).getTime() / 1000);
|
var epoch = Math.floor((new Date).getTime() / 1000);
|
||||||
|
@ -2221,15 +2223,22 @@ ApplicationWindow {
|
||||||
passwordDialog.onAcceptedCallback = function() {
|
passwordDialog.onAcceptedCallback = function() {
|
||||||
if(walletPassword === passwordDialog.password){
|
if(walletPassword === passwordDialog.password){
|
||||||
passwordDialog.close();
|
passwordDialog.close();
|
||||||
|
if (inputDialogVisible) inputDialog.open(inputDialog.inputText)
|
||||||
|
if (successfulTxPopupVisible) successfulTxPopup.open(successfulTxPopup.transactionID)
|
||||||
|
if (informationPopupVisible) informationPopup.open()
|
||||||
} else {
|
} else {
|
||||||
passwordDialog.showError(qsTr("Wrong password"));
|
passwordDialog.showError(qsTr("Wrong password"));
|
||||||
}
|
}
|
||||||
if (inputDialogVisible) inputDialog.open(inputDialog.inputText)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
|
passwordDialog.onRejectedCallback = function() { appWindow.showWizard(); }
|
||||||
if (inputDialogVisible) inputDialog.close()
|
if (inputDialogVisible) inputDialog.close()
|
||||||
remoteNodeDialog.close();
|
remoteNodeDialog.close();
|
||||||
|
informationPopup.close()
|
||||||
|
txConfirmationPopup.close()
|
||||||
|
txConfirmationPopup.clearFields()
|
||||||
|
txConfirmationPopup.rejected()
|
||||||
|
successfulTxPopup.close();
|
||||||
passwordDialog.open();
|
passwordDialog.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue