mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 00:17:25 +02:00
Improvements
This commit is contained in:
parent
c15b1669b1
commit
260aee42a8
2 changed files with 58 additions and 13 deletions
|
@ -114,7 +114,8 @@ Item {
|
||||||
width: 110;
|
width: 110;
|
||||||
text: "CHOOSE";
|
text: "CHOOSE";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
var msg = { method: 'chooseConnection', userName: root.userName };
|
||||||
|
sendToSendMoney(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -415,7 +415,12 @@ Item {
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
onSendToSendMoney: {
|
onSendToSendMoney: {
|
||||||
// TODO
|
sendMoneyStep.referrer = "connections";
|
||||||
|
sendMoneyStep.selectedRecipientNodeID = '';
|
||||||
|
sendMoneyStep.selectedRecipientDisplayName = msg.userName;
|
||||||
|
sendMoneyStep.selectedRecipientUserName = 'connection';
|
||||||
|
|
||||||
|
root.nextActiveView = "sendMoneyStep";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -721,7 +726,12 @@ Item {
|
||||||
width: 120;
|
width: 120;
|
||||||
text: "CHANGE";
|
text: "CHANGE";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.nextActiveView = "chooseRecipientNearby";
|
if (sendMoneyStep.referrer === "connections") {
|
||||||
|
root.nextActiveView = "chooseRecipientConnection";
|
||||||
|
} else if (sendMoneyStep.referrer === "nearby") {
|
||||||
|
root.nextActiveView = "chooseRecipientNearby";
|
||||||
|
}
|
||||||
|
resetSendMoneyData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -765,10 +775,28 @@ Item {
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true;
|
||||||
activeFocusOnTab: true;
|
activeFocusOnTab: true;
|
||||||
|
|
||||||
|
validator: IntValidator { bottom: 0; }
|
||||||
|
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
optionalMessage.focus = true;
|
optionalMessage.focus = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RalewaySemiBold {
|
||||||
|
id: amountTextFieldError;
|
||||||
|
// Anchors
|
||||||
|
anchors.top: amountTextField.bottom;
|
||||||
|
anchors.topMargin: 2;
|
||||||
|
anchors.left: amountTextField.left;
|
||||||
|
anchors.right: amountTextField.right;
|
||||||
|
height: 40;
|
||||||
|
// Text size
|
||||||
|
size: 16;
|
||||||
|
// Style
|
||||||
|
color: hifi.colors.baseGray;
|
||||||
|
verticalAlignment: Text.AlignTop;
|
||||||
|
horizontalAlignment: Text.AlignRight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -868,11 +896,19 @@ Item {
|
||||||
width: 100;
|
width: 100;
|
||||||
text: "SEND";
|
text: "SEND";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.isCurrentlySendingMoney = true;
|
if (parseInt(amountTextField.text) > parseInt(balanceText.text)) {
|
||||||
amountTextField.focus = false;
|
amountTextField.focus = true;
|
||||||
optionalMessage.focus = false;
|
amountTextField.error = true;
|
||||||
tempTimer.interval = 250;
|
amountTextFieldError.text = "<i>amount exceeds available funds</i>";
|
||||||
tempTimer.start();
|
} else {
|
||||||
|
amountTextFieldError.text = "";
|
||||||
|
amountTextField.error = false;
|
||||||
|
root.isCurrentlySendingMoney = true;
|
||||||
|
amountTextField.focus = false;
|
||||||
|
optionalMessage.focus = false;
|
||||||
|
tempTimer.interval = 250;
|
||||||
|
tempTimer.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1203,12 +1239,13 @@ Item {
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.baseGray;
|
||||||
verticalAlignment: Text.AlignVCenter;
|
verticalAlignment: Text.AlignVCenter;
|
||||||
|
wrapMode: Text.Wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: sendToContainer_paymentFailure;
|
id: sendToContainer_paymentFailure;
|
||||||
anchors.top: paymentFailureDetailText.bottom;
|
anchors.top: paymentFailureDetailText.bottom;
|
||||||
anchors.topMargin: 20;
|
anchors.topMargin: 8;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 20;
|
anchors.leftMargin: 20;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
|
@ -1216,7 +1253,7 @@ Item {
|
||||||
height: 80;
|
height: 80;
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: paymentFailureText_paymentFailure;
|
id: sentToText_paymentFailure;
|
||||||
text: "Sent To:";
|
text: "Sent To:";
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
|
@ -1235,7 +1272,7 @@ Item {
|
||||||
text: sendMoneyStep.selectedRecipientDisplayName;
|
text: sendMoneyStep.selectedRecipientDisplayName;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.left: sendToText_paymentFailure.right;
|
anchors.left: sentToText_paymentFailure.right;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
height: parent.height/2;
|
height: parent.height/2;
|
||||||
// Text size
|
// Text size
|
||||||
|
@ -1339,7 +1376,7 @@ Item {
|
||||||
// "Close" button
|
// "Close" button
|
||||||
HifiControlsUit.Button {
|
HifiControlsUit.Button {
|
||||||
id: closeButton_paymentFailure;
|
id: closeButton_paymentFailure;
|
||||||
color: hifi.buttons.blue;
|
color: hifi.buttons.noneBorderless;
|
||||||
colorScheme: hifi.colorSchemes.dark;
|
colorScheme: hifi.colorSchemes.dark;
|
||||||
anchors.horizontalCenter: parent.horizontalCenter;
|
anchors.horizontalCenter: parent.horizontalCenter;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
|
@ -1359,13 +1396,16 @@ Item {
|
||||||
color: hifi.buttons.blue;
|
color: hifi.buttons.blue;
|
||||||
colorScheme: hifi.colorSchemes.dark;
|
colorScheme: hifi.colorSchemes.dark;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
|
anchors.rightMargin: 12;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
anchors.bottomMargin: 80;
|
anchors.bottomMargin: 80;
|
||||||
height: 50;
|
height: 50;
|
||||||
width: 120;
|
width: 120;
|
||||||
text: "Retry";
|
text: "Retry";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
root.isCurrentlySendingMoney = true;
|
||||||
|
tempTimer.interval = 250;
|
||||||
|
tempTimer.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1394,6 +1434,10 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetSendMoneyData() {
|
function resetSendMoneyData() {
|
||||||
|
amountTextField.focus = false;
|
||||||
|
optionalMessage.focus = false;
|
||||||
|
amountTextFieldError.text = "";
|
||||||
|
amountTextField.error = false;
|
||||||
chooseRecipientNearby.selectedRecipient = "";
|
chooseRecipientNearby.selectedRecipient = "";
|
||||||
sendMoneyStep.selectedRecipientNodeID = "";
|
sendMoneyStep.selectedRecipientNodeID = "";
|
||||||
sendMoneyStep.selectedRecipientDisplayName = "";
|
sendMoneyStep.selectedRecipientDisplayName = "";
|
||||||
|
|
Loading…
Reference in a new issue