mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:02:58 +02:00
First round
This commit is contained in:
parent
895f79fd80
commit
acdd1e32e4
3 changed files with 12 additions and 8 deletions
|
@ -79,6 +79,8 @@ Rectangle {
|
||||||
failureErrorText.text = result.message;
|
failureErrorText.text = result.message;
|
||||||
root.activeView = "checkoutFailure";
|
root.activeView = "checkoutFailure";
|
||||||
} else {
|
} else {
|
||||||
|
root.itemHref = result.data.download_url;
|
||||||
|
console.log("ZRF TEST " + root.itemHref);
|
||||||
root.activeView = "checkoutSuccess";
|
root.activeView = "checkoutSuccess";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +127,7 @@ Rectangle {
|
||||||
id: notSetUpTimer;
|
id: notSetUpTimer;
|
||||||
interval: 200;
|
interval: 200;
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
sendToScript({method: 'checkout_walletNotSetUp'});
|
sendToScript({method: 'checkout_walletNotSetUp', itemId: itemId});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,10 @@ Rectangle {
|
||||||
onInventoryResult: {
|
onInventoryResult: {
|
||||||
purchasesReceived = true;
|
purchasesReceived = true;
|
||||||
|
|
||||||
|
if (root.pendingInventoryReply) {
|
||||||
|
inventoryTimer.start();
|
||||||
|
}
|
||||||
|
|
||||||
if (result.status !== 'success') {
|
if (result.status !== 'success') {
|
||||||
console.log("Failed to get purchases", result.message);
|
console.log("Failed to get purchases", result.message);
|
||||||
} else {
|
} else {
|
||||||
|
@ -98,10 +102,6 @@ Rectangle {
|
||||||
previousPurchasesModel.append(inventoryResult);
|
previousPurchasesModel.append(inventoryResult);
|
||||||
|
|
||||||
buildFilteredPurchasesModel();
|
buildFilteredPurchasesModel();
|
||||||
|
|
||||||
if (root.pendingInventoryReply) {
|
|
||||||
inventoryTimer.start();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
root.pendingInventoryReply = false;
|
root.pendingInventoryReply = false;
|
||||||
|
@ -112,7 +112,7 @@ Rectangle {
|
||||||
id: notSetUpTimer;
|
id: notSetUpTimer;
|
||||||
interval: 200;
|
interval: 200;
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
sendToScript({method: 'checkout_walletNotSetUp'});
|
sendToScript({method: 'purchases_walletNotSetUp'});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,7 +426,7 @@ Rectangle {
|
||||||
itemName: title;
|
itemName: title;
|
||||||
itemId: id;
|
itemId: id;
|
||||||
itemPreviewImageUrl: preview;
|
itemPreviewImageUrl: preview;
|
||||||
itemHref: root_file_url;
|
itemHref: download_url;
|
||||||
purchaseStatus: status;
|
purchaseStatus: status;
|
||||||
purchaseStatusChanged: statusChanged;
|
purchaseStatusChanged: statusChanged;
|
||||||
itemEdition: model.edition_number;
|
itemEdition: model.edition_number;
|
||||||
|
|
|
@ -176,6 +176,8 @@ Rectangle {
|
||||||
commerce.getWalletStatus();
|
commerce.getWalletStatus();
|
||||||
} else if (msg.referrer === 'purchases') {
|
} else if (msg.referrer === 'purchases') {
|
||||||
sendToScript({method: 'goToPurchases'});
|
sendToScript({method: 'goToPurchases'});
|
||||||
|
} else {
|
||||||
|
sendToScript({method: 'goToMarketplaceItemPage', itemId: msg.referrer});
|
||||||
}
|
}
|
||||||
} else if (msg.method === 'walletSetup_raiseKeyboard') {
|
} else if (msg.method === 'walletSetup_raiseKeyboard') {
|
||||||
root.keyboardRaised = true;
|
root.keyboardRaised = true;
|
||||||
|
@ -283,7 +285,7 @@ Rectangle {
|
||||||
Connections {
|
Connections {
|
||||||
onSendSignalToParent: {
|
onSendSignalToParent: {
|
||||||
if (msg.method === "authSuccess") {
|
if (msg.method === "authSuccess") {
|
||||||
root.activeView = "walletHome";
|
commerce.getWalletStatus();
|
||||||
} else {
|
} else {
|
||||||
sendToScript(msg);
|
sendToScript(msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue