mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 10:28:22 +02:00
Bugfixes
This commit is contained in:
parent
94da149ac8
commit
a07598c738
4 changed files with 32 additions and 5 deletions
|
@ -24,6 +24,14 @@ Item {
|
|||
HifiConstants { id: hifi; }
|
||||
|
||||
id: root;
|
||||
|
||||
// This object is always used in a popup.
|
||||
// This MouseArea is used to prevent a user from being
|
||||
// able to click on a button/mouseArea underneath the popup.
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
propagateComposedEvents: false;
|
||||
}
|
||||
|
||||
Hifi.QmlCommerce {
|
||||
id: commerce;
|
||||
|
|
|
@ -27,6 +27,12 @@ Rectangle {
|
|||
// Style
|
||||
color: hifi.colors.baseGray;
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
root.resetSubmitButton();
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: passphraseSelection;
|
||||
onSendMessageToLightbox: {
|
||||
|
@ -150,7 +156,10 @@ Rectangle {
|
|||
width: 100;
|
||||
text: "Submit";
|
||||
onClicked: {
|
||||
passphraseSelection.validateAndSubmitPassphrase()
|
||||
if (passphraseSelection.validateAndSubmitPassphrase()) {
|
||||
passphraseSubmitButton.text = "Submitting...";
|
||||
passphraseSubmitButton.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,6 +74,7 @@ Item {
|
|||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
propagateComposedEvents: false;
|
||||
onClicked: {
|
||||
securityImageGrid.currentIndex = index;
|
||||
}
|
||||
|
|
|
@ -28,20 +28,24 @@ Rectangle {
|
|||
// Style
|
||||
color: hifi.colors.baseGray;
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
root.resetSubmitButton();
|
||||
}
|
||||
}
|
||||
|
||||
Hifi.QmlCommerce {
|
||||
id: commerce;
|
||||
|
||||
onSecurityImageResult: {
|
||||
if (imageID !== 0) { // Success submitting new security image
|
||||
if (root.justSubmitted) {
|
||||
securityImageSubmitButton.enabled = true;
|
||||
securityImageSubmitButton.text = "Submit";
|
||||
root.resetSubmitButton();
|
||||
root.visible = false;
|
||||
}
|
||||
} else if (root.justSubmitted) {
|
||||
// Error submitting new security image.
|
||||
securityImageSubmitButton.enabled = true
|
||||
securityImageSubmitButton.text = "Submit";
|
||||
root.resetSubmitButton();
|
||||
root.justSubmitted = false;
|
||||
}
|
||||
}
|
||||
|
@ -186,4 +190,9 @@ Rectangle {
|
|||
//
|
||||
// SECURITY IMAGE SELECTION END
|
||||
//
|
||||
|
||||
function resetSubmitButton() {
|
||||
securityImageSubmitButton.enabled = true;
|
||||
securityImageSubmitButton.text = "Submit";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue