mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 09:37:29 +02:00
and lets fix the purchases flow too
This commit is contained in:
parent
c142215935
commit
99cdbbe306
1 changed files with 16 additions and 8 deletions
|
@ -35,12 +35,20 @@ Rectangle {
|
||||||
Hifi.QmlCommerce {
|
Hifi.QmlCommerce {
|
||||||
id: commerce;
|
id: commerce;
|
||||||
|
|
||||||
|
onAccountResult: {
|
||||||
|
if(result.status === "success") {
|
||||||
|
commerce.getKeyFilePathIfExists();
|
||||||
|
} else {
|
||||||
|
// unsure how to handle a failure here. We definitely cannot proceed.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onLoginStatusResult: {
|
onLoginStatusResult: {
|
||||||
if (!isLoggedIn && root.activeView !== "needsLogIn") {
|
if (!isLoggedIn && root.activeView !== "needsLogIn") {
|
||||||
root.activeView = "needsLogIn";
|
root.activeView = "needsLogIn";
|
||||||
} else if (isLoggedIn) {
|
} else if (isLoggedIn) {
|
||||||
root.activeView = "initialize";
|
root.activeView = "initialize";
|
||||||
commerce.getKeyFilePathIfExists();
|
commerce.account();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +182,7 @@ Rectangle {
|
||||||
commerce.getLoginStatus();
|
commerce.getLoginStatus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiWallet.NeedsLogIn {
|
HifiWallet.NeedsLogIn {
|
||||||
id: needsLogIn;
|
id: needsLogIn;
|
||||||
visible: root.activeView === "needsLogIn";
|
visible: root.activeView === "needsLogIn";
|
||||||
|
@ -210,7 +218,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// "WALLET NOT SET UP" START
|
// "WALLET NOT SET UP" START
|
||||||
//
|
//
|
||||||
|
@ -221,7 +229,7 @@ Rectangle {
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
|
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
id: notSetUpText;
|
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> " +
|
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.left: parent.left;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
anchors.bottomMargin: 24;
|
anchors.bottomMargin: 24;
|
||||||
|
|
||||||
// "Cancel" button
|
// "Cancel" button
|
||||||
HifiControlsUit.Button {
|
HifiControlsUit.Button {
|
||||||
id: cancelButton;
|
id: cancelButton;
|
||||||
|
@ -309,7 +317,7 @@ Rectangle {
|
||||||
anchors.topMargin: 8;
|
anchors.topMargin: 8;
|
||||||
anchors.bottom: actionButtonsContainer.top;
|
anchors.bottom: actionButtonsContainer.top;
|
||||||
anchors.bottomMargin: 8;
|
anchors.bottomMargin: 8;
|
||||||
|
|
||||||
//
|
//
|
||||||
// FILTER BAR START
|
// FILTER BAR START
|
||||||
//
|
//
|
||||||
|
@ -383,7 +391,7 @@ Rectangle {
|
||||||
itemHref: root_file_url;
|
itemHref: root_file_url;
|
||||||
anchors.topMargin: 12;
|
anchors.topMargin: 12;
|
||||||
anchors.bottomMargin: 12;
|
anchors.bottomMargin: 12;
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
onSendToPurchases: {
|
onSendToPurchases: {
|
||||||
if (msg.method === 'purchases_itemInfoClicked') {
|
if (msg.method === 'purchases_itemInfoClicked') {
|
||||||
|
@ -402,7 +410,7 @@ Rectangle {
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
|
|
||||||
// Explanitory text
|
// Explanitory text
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
id: haventPurchasedYet;
|
id: haventPurchasedYet;
|
||||||
|
|
Loading…
Reference in a new issue