mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:28:09 +02:00
Remove fixmes
This commit is contained in:
parent
9120e678f1
commit
c38837c200
2 changed files with 6 additions and 14 deletions
|
@ -35,11 +35,13 @@ Rectangle {
|
||||||
id: commerce;
|
id: commerce;
|
||||||
onBuyResult: {
|
onBuyResult: {
|
||||||
if (failureMessage.length) {
|
if (failureMessage.length) {
|
||||||
sendToScript({method: 'checkout_cancelClicked', params: itemId});
|
buyButton.text = "Buy Failed";
|
||||||
|
buyButton.enabled = false;
|
||||||
} else {
|
} else {
|
||||||
if (urlHandler.canHandleUrl(itemHref)) {
|
if (urlHandler.canHandleUrl(itemHref)) {
|
||||||
urlHandler.handleUrl(itemHref);
|
urlHandler.handleUrl(itemHref);
|
||||||
}
|
}
|
||||||
|
sendToScript({method: 'checkout_buySuccess', params: itemId});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onBalanceResult: {
|
onBalanceResult: {
|
||||||
|
@ -369,13 +371,12 @@ Rectangle {
|
||||||
width: parent.width/2 - anchors.leftMargin*2;
|
width: parent.width/2 - anchors.leftMargin*2;
|
||||||
text: "Cancel"
|
text: "Cancel"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
sendToScript({method: 'checkout_cancelClicked', params: itemId}); //fixme
|
sendToScript({method: 'checkout_cancelClicked', params: itemId});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// "Buy" button
|
// "Buy" button
|
||||||
HifiControlsUit.Button {
|
HifiControlsUit.Button {
|
||||||
property bool buyFailed: false; // fixme
|
|
||||||
id: buyButton;
|
id: buyButton;
|
||||||
enabled: balanceAfterPurchase >= 0 && !alreadyOwned;
|
enabled: balanceAfterPurchase >= 0 && !alreadyOwned;
|
||||||
color: hifi.buttons.black;
|
color: hifi.buttons.black;
|
||||||
|
@ -421,14 +422,9 @@ Rectangle {
|
||||||
itemAuthorText.text = message.params.itemAuthor;
|
itemAuthorText.text = message.params.itemAuthor;
|
||||||
itemPriceText.text = message.params.itemPrice;
|
itemPriceText.text = message.params.itemPrice;
|
||||||
itemHref = message.params.itemHref;
|
itemHref = message.params.itemHref;
|
||||||
buyButton.buyFailed = false;
|
|
||||||
commerce.balance();
|
commerce.balance();
|
||||||
commerce.inventory();
|
commerce.inventory();
|
||||||
break;
|
break;
|
||||||
case 'buyFailed':
|
|
||||||
buyButton.text = "Buy Failed";
|
|
||||||
buyButton.buyFailed = true;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,12 +204,8 @@
|
||||||
// I don't think this is trivial to do since we also want to inject some JS into the DOM.
|
// I don't think this is trivial to do since we also want to inject some JS into the DOM.
|
||||||
//tablet.popFromStack();
|
//tablet.popFromStack();
|
||||||
break;
|
break;
|
||||||
case 'checkout_buyClicked':
|
case 'checkout_buySuccess':
|
||||||
if (message.success === true) {
|
tablet.gotoWebScreen(MARKETPLACE_URL + '/items/' + message.itemId, MARKETPLACES_INJECT_SCRIPT_URL);
|
||||||
tablet.gotoWebScreen(MARKETPLACE_URL + '/items/' + message.itemId, MARKETPLACES_INJECT_SCRIPT_URL);
|
|
||||||
} else {
|
|
||||||
tablet.sendToQml({ method: 'buyFailed' });
|
|
||||||
}
|
|
||||||
//tablet.popFromStack();
|
//tablet.popFromStack();
|
||||||
break;
|
break;
|
||||||
case 'inventory_itemClicked':
|
case 'inventory_itemClicked':
|
||||||
|
|
Loading…
Reference in a new issue