and lets fix the purchases flow too

This commit is contained in:
David Kelly 2017-09-08 14:00:09 -07:00
parent c142215935
commit 99cdbbe306

View file

@ -35,12 +35,20 @@ Rectangle {
Hifi.QmlCommerce {
id: commerce;
onAccountResult: {
if(result.status === "success") {
commerce.getKeyFilePathIfExists();
} else {
// unsure how to handle a failure here. We definitely cannot proceed.
}
}
onLoginStatusResult: {
if (!isLoggedIn && root.activeView !== "needsLogIn") {
root.activeView = "needsLogIn";
} else if (isLoggedIn) {
root.activeView = "initialize";
commerce.getKeyFilePathIfExists();
commerce.account();
}
}
@ -174,7 +182,7 @@ Rectangle {
commerce.getLoginStatus();
}
}
HifiWallet.NeedsLogIn {
id: needsLogIn;
visible: root.activeView === "needsLogIn";
@ -210,7 +218,7 @@ Rectangle {
}
}
}
//
// "WALLET NOT SET UP" START
//
@ -221,7 +229,7 @@ Rectangle {
anchors.bottom: parent.bottom;
anchors.left: parent.left;
anchors.right: parent.right;
RalewayRegular {
id: notSetUpText;
text: "<b>Your wallet isn't set up.</b><br><br>Set up your Wallet (no credit card necessary) to claim your <b>free HFC</b> " +
@ -252,7 +260,7 @@ Rectangle {
anchors.left: parent.left;
anchors.bottom: parent.bottom;
anchors.bottomMargin: 24;
// "Cancel" button
HifiControlsUit.Button {
id: cancelButton;
@ -309,7 +317,7 @@ Rectangle {
anchors.topMargin: 8;
anchors.bottom: actionButtonsContainer.top;
anchors.bottomMargin: 8;
//
// FILTER BAR START
//
@ -383,7 +391,7 @@ Rectangle {
itemHref: root_file_url;
anchors.topMargin: 12;
anchors.bottomMargin: 12;
Connections {
onSendToPurchases: {
if (msg.method === 'purchases_itemInfoClicked') {
@ -402,7 +410,7 @@ Rectangle {
anchors.left: parent.left;
anchors.bottom: parent.bottom;
width: parent.width;
// Explanitory text
RalewayRegular {
id: haventPurchasedYet;