diff --git a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml index 1a1579443c..4d019685fd 100644 --- a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml +++ b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml @@ -227,7 +227,6 @@ Rectangle { HifiWallet.PassphraseModal { id: passphraseModal; - z: 998; visible: false; anchors.top: titleBarContainer.bottom; anchors.bottom: parent.bottom; diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml index a3a09f6452..71e182e023 100644 --- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml +++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml @@ -198,7 +198,6 @@ Rectangle { HifiWallet.PassphraseModal { id: passphraseModal; - z: 998; visible: false; anchors.top: titleBarContainer.bottom; anchors.bottom: parent.bottom; diff --git a/interface/resources/qml/hifi/commerce/wallet/PassphraseModal.qml b/interface/resources/qml/hifi/commerce/wallet/PassphraseModal.qml index f9b2c88a5b..ae4ad63047 100644 --- a/interface/resources/qml/hifi/commerce/wallet/PassphraseModal.qml +++ b/interface/resources/qml/hifi/commerce/wallet/PassphraseModal.qml @@ -24,6 +24,9 @@ Item { HifiConstants { id: hifi; } id: root; + z: 998; + property bool keyboardRaised: false; + Hifi.QmlCommerce { id: commerce; @@ -35,8 +38,7 @@ Item { onWalletAuthenticatedStatusResult: { submitPassphraseInputButton.enabled = true; if (!isAuthenticated) { - // Auth failed, show error text - + errorText.text = "Authentication failed - please try again."; } else { root.visible = false; sendSignalToParent({method: 'passphraseModal_authSuccess'}); @@ -76,7 +78,7 @@ Item { anchors.top: parent.top; anchors.left: parent.left; anchors.right: parent.right; - height: 220; + height: 250; color: hifi.colors.baseGray; RalewaySemiBold { @@ -106,23 +108,21 @@ Item { placeholderText: "passphrase"; onFocusChanged: { - if (focus) { - keyboard.raised = true; - } else if (!passphraseFieldAgain.focus) { - keyboard.raised = false; - } + root.keyboardRaised = focus; } MouseArea { anchors.fill: parent; + onClicked: { parent.focus = true; - keyboard.raised = true; + root.keyboardRaised = true; } } onAccepted: { - //commerce.submitWalletPassphrase(passphraseField.text); + submitPassphraseInputButton.enabled = false; + commerce.setPassphrase(passphraseField.text); } } @@ -139,7 +139,7 @@ Item { onClicked: { passphraseField.echoMode = checked ? TextInput.Normal : TextInput.Password; } - } + } // Security Image Item { @@ -191,6 +191,27 @@ Item { verticalAlignment: Text.AlignVCenter; } } + + // Error text above buttons + RalewaySemiBold { + id: errorText; + text: ""; + // Text size + size: 16; + // Anchors + anchors.bottom: passphrasePopupActionButtonsContainer.top; + anchors.bottomMargin: 4; + anchors.left: parent.left; + anchors.leftMargin: 16; + anchors.right: parent.right; + anchors.rightMargin: 16; + height: 30; + // Style + color: hifi.colors.redHighlight; + // Alignment + horizontalAlignment: Text.AlignHCenter; + verticalAlignment: Text.AlignVCenter; + } // // ACTION BUTTONS START diff --git a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml index f672530d1f..ad8f6531bc 100644 --- a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml +++ b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml @@ -224,7 +224,6 @@ Rectangle { PassphraseModal { id: passphraseModal; - z: 998; visible: false; anchors.top: titleBarContainer.bottom; anchors.bottom: parent.bottom;