mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Fixup Checkout for apps
This commit is contained in:
parent
33f73fef0d
commit
f14673bc50
3 changed files with 14 additions and 8 deletions
|
@ -48,6 +48,7 @@ Rectangle {
|
|||
property bool debugCheckoutSuccess: false;
|
||||
property bool canRezCertifiedItems: Entities.canRezCertified() || Entities.canRezTmpCertified();
|
||||
property string referrer;
|
||||
property bool isInstalled;
|
||||
// Style
|
||||
color: hifi.colors.white;
|
||||
Connections {
|
||||
|
@ -122,6 +123,12 @@ Rectangle {
|
|||
root.refreshBuyUI();
|
||||
}
|
||||
}
|
||||
|
||||
onAppInstalled: {
|
||||
if (appHref === root.itemHref) {
|
||||
root.isInstalled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onItemIdChanged: {
|
||||
|
@ -689,7 +696,7 @@ Rectangle {
|
|||
height: 50;
|
||||
anchors.left: parent.left;
|
||||
anchors.right: parent.right;
|
||||
text: (root.buttonTextNormal)[itemTypesArray.indexOf(root.itemType)];
|
||||
text: root.itemType === "app" && root.isInstalled ? "OPEN APP" : (root.buttonTextNormal)[itemTypesArray.indexOf(root.itemType)];
|
||||
onClicked: {
|
||||
if (root.itemType === "contentSet") {
|
||||
lightboxPopup.titleText = "Replace Content";
|
||||
|
@ -714,8 +721,11 @@ Rectangle {
|
|||
lightboxPopup.button2method = "MyAvatar.useFullAvatarURL('" + root.itemHref + "'); root.visible = false;";
|
||||
lightboxPopup.visible = true;
|
||||
} else if (root.itemType === "app") {
|
||||
// "Run" button is separate.
|
||||
Commerce.installApp(root.itemHref);
|
||||
if (root.isInstalled) {
|
||||
Commerce.openApp(root.itemHref);
|
||||
} else {
|
||||
Commerce.installApp(root.itemHref);
|
||||
}
|
||||
} else {
|
||||
sendToScript({method: 'checkout_rezClicked', itemHref: root.itemHref, itemType: root.itemType});
|
||||
rezzedNotifContainer.visible = true;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
// for toolbar-mode: go back to home screen, this will close the window.
|
||||
tablet.gotoHomeScreen();
|
||||
} else {
|
||||
tablet.loadQMLSource(MARKETPLACE_PURCHASES_QML_PATH);
|
||||
tablet.loadQMLSource(WALLET_QML_SOURCE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -552,10 +552,6 @@ var selectionDisplay = null; // for gridTool.js to ignore
|
|||
case 'checkout_rezClicked':
|
||||
case 'purchases_rezClicked':
|
||||
rezEntity(message.itemHref, message.itemType);
|
||||
break;
|
||||
case 'checkout_installClicked':
|
||||
case 'purchases_installClicked':
|
||||
|
||||
break;
|
||||
case 'header_marketplaceImageClicked':
|
||||
case 'purchases_backClicked':
|
||||
|
|
Loading…
Reference in a new issue