Merge pull request #11629 from zfox23/wearItButton

REZ IT -> WEAR IT
This commit is contained in:
Howard Stearns 2017-10-20 09:36:09 -07:00 committed by GitHub
commit 352243c01b
4 changed files with 13 additions and 11 deletions

View file

@ -39,7 +39,8 @@ Rectangle {
property bool itemIsJson: true; property bool itemIsJson: true;
property bool shouldBuyWithControlledFailure: false; property bool shouldBuyWithControlledFailure: false;
property bool debugCheckoutSuccess: false; property bool debugCheckoutSuccess: false;
property bool canRezCertifiedItems: Entities.canRezCertified || Entities.canRezTmpCertified; property bool canRezCertifiedItems: Entities.canRezCertified() || Entities.canRezTmpCertified();
property bool isWearable;
// Style // Style
color: hifi.colors.white; color: hifi.colors.white;
Hifi.QmlCommerce { Hifi.QmlCommerce {
@ -80,6 +81,7 @@ Rectangle {
root.activeView = "checkoutFailure"; root.activeView = "checkoutFailure";
} else { } else {
root.itemHref = result.data.download_url; root.itemHref = result.data.download_url;
root.isWearable = result.data.categories.indexOf("Wearables") > -1;
root.activeView = "checkoutSuccess"; root.activeView = "checkoutSuccess";
} }
} }
@ -573,7 +575,7 @@ Rectangle {
height: 50; height: 50;
anchors.left: parent.left; anchors.left: parent.left;
anchors.right: parent.right; anchors.right: parent.right;
text: "Rez It" text: root.isWearable ? "Wear It" : "Rez It"
onClicked: { onClicked: {
if (urlHandler.canHandleUrl(root.itemHref)) { if (urlHandler.canHandleUrl(root.itemHref)) {
urlHandler.handleUrl(root.itemHref); urlHandler.handleUrl(root.itemHref);
@ -584,7 +586,7 @@ Rectangle {
} }
RalewaySemiBold { RalewaySemiBold {
id: noPermissionText; id: noPermissionText;
visible: !root.canRezCertifiedItems; visible: !root.canRezCertifiedItems && !root.isWearable;
text: '<font color="' + hifi.colors.redAccent + '"><a href="#">You do not have Certified Rez permissions in this domain.</a></font>' text: '<font color="' + hifi.colors.redAccent + '"><a href="#">You do not have Certified Rez permissions in this domain.</a></font>'
// Text size // Text size
size: 16; size: 16;

View file

@ -39,6 +39,7 @@ Item {
property int itemEdition; property int itemEdition;
property int numberSold; property int numberSold;
property int limitedRun; property int limitedRun;
property bool isWearable;
property string originalStatusText; property string originalStatusText;
property string originalStatusColor; property string originalStatusColor;
@ -342,7 +343,7 @@ Item {
anchors.bottom: parent.bottom; anchors.bottom: parent.bottom;
anchors.right: parent.right; anchors.right: parent.right;
width: height; width: height;
enabled: root.canRezCertifiedItems && root.purchaseStatus !== "invalidated"; enabled: (root.canRezCertifiedItems || root.isWearable) && root.purchaseStatus !== "invalidated";
onClicked: { onClicked: {
if (urlHandler.canHandleUrl(root.itemHref)) { if (urlHandler.canHandleUrl(root.itemHref)) {
@ -415,7 +416,7 @@ Item {
size: 16; size: 16;
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: "Rez It" text: root.isWearable ? "Wear It" : "Rez It"
} }
} }
} }

View file

@ -32,7 +32,7 @@ Rectangle {
property bool securityImageResultReceived: false; property bool securityImageResultReceived: false;
property bool purchasesReceived: false; property bool purchasesReceived: false;
property bool punctuationMode: false; property bool punctuationMode: false;
property bool canRezCertifiedItems: Entities.canRezCertified || Entities.canRezTmpCertified; property bool canRezCertifiedItems: Entities.canRezCertified() || Entities.canRezTmpCertified();
property bool pendingInventoryReply: true; property bool pendingInventoryReply: true;
property bool isShowingMyItems: false; property bool isShowingMyItems: false;
property bool isDebuggingFirstUseTutorial: false; property bool isDebuggingFirstUseTutorial: false;
@ -434,6 +434,7 @@ Rectangle {
numberSold: model.number_sold; numberSold: model.number_sold;
limitedRun: model.limited_run; limitedRun: model.limited_run;
displayedItemCount: model.displayedItemCount; displayedItemCount: model.displayedItemCount;
isWearable: model.categories.indexOf("Wearables") > -1;
anchors.topMargin: 12; anchors.topMargin: 12;
anchors.bottomMargin: 12; anchors.bottomMargin: 12;

View file

@ -74,8 +74,8 @@
itemName: 'Test Flaregun', itemName: 'Test Flaregun',
itemPrice: (debugError ? 10 : 17), itemPrice: (debugError ? 10 : 17),
itemHref: 'http://mpassets.highfidelity.com/0d90d21c-ce7a-4990-ad18-e9d2cf991027-v1/flaregun.json', itemHref: 'http://mpassets.highfidelity.com/0d90d21c-ce7a-4990-ad18-e9d2cf991027-v1/flaregun.json',
}, categories: ["Wearables", "Miscellaneous"]
canRezCertifiedItems: Entities.canRezCertified || Entities.canRezTmpCertified }
}); });
} }
} }
@ -115,7 +115,6 @@
if (url === MARKETPLACE_PURCHASES_QML_PATH) { if (url === MARKETPLACE_PURCHASES_QML_PATH) {
tablet.sendToQml({ tablet.sendToQml({
method: 'updatePurchases', method: 'updatePurchases',
canRezCertifiedItems: Entities.canRezCertified || Entities.canRezTmpCertified,
referrerURL: referrerURL, referrerURL: referrerURL,
filterText: filterText filterText: filterText
}); });
@ -203,8 +202,7 @@
tablet.pushOntoStack(MARKETPLACE_CHECKOUT_QML_PATH); tablet.pushOntoStack(MARKETPLACE_CHECKOUT_QML_PATH);
tablet.sendToQml({ tablet.sendToQml({
method: 'updateCheckoutQML', method: 'updateCheckoutQML',
params: parsedJsonMessage, params: parsedJsonMessage
canRezCertifiedItems: Entities.canRezCertified || Entities.canRezTmpCertified
}); });
} else if (parsedJsonMessage.type === "REQUEST_SETTING") { } else if (parsedJsonMessage.type === "REQUEST_SETTING") {
sendCommerceSettings(); sendCommerceSettings();