diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
index 5060b65e0b..7486e41a24 100644
--- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
+++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
@@ -258,7 +258,9 @@ Rectangle {
height: 40;
// Anchors
anchors.left: parent.left;
+ anchors.leftMargin: 8;
anchors.right: parent.right;
+ anchors.rightMargin: 8;
anchors.top: parent.top;
anchors.topMargin: 4;
@@ -304,6 +306,7 @@ Rectangle {
ListView {
id: purchasesContentsList;
+ visible: purchasesModel.count !== 0;
clip: true;
model: filteredPurchasesModel;
// Anchors
@@ -329,6 +332,52 @@ Rectangle {
}
}
}
+
+ Item {
+ id: noPurchasesAlertContainer;
+ visible: !purchasesContentsList.visible;
+ anchors.top: filterBarContainer.bottom;
+ anchors.topMargin: 12;
+ anchors.left: parent.left;
+ anchors.bottom: parent.bottom;
+ width: parent.width;
+
+ // Explanitory text
+ RalewayRegular {
+ id: haventPurchasedYet;
+ text: "You haven't purchased anything yet!
Get an item from Marketplace to add it to your Purchases.";
+ // Text size
+ size: 22;
+ // Anchors
+ anchors.top: parent.top;
+ anchors.topMargin: 150;
+ anchors.left: parent.left;
+ anchors.leftMargin: 24;
+ anchors.right: parent.right;
+ anchors.rightMargin: 24;
+ height: paintedHeight;
+ // Style
+ color: hifi.colors.faintGray;
+ wrapMode: Text.WordWrap;
+ // Alignment
+ horizontalAlignment: Text.AlignHCenter;
+ }
+
+ // "Set Up" button
+ HifiControlsUit.Button {
+ color: hifi.buttons.blue;
+ colorScheme: hifi.colorSchemes.dark;
+ anchors.top: haventPurchasedYet.bottom;
+ anchors.topMargin: 20;
+ anchors.horizontalCenter: parent.horizontalCenter;
+ width: parent.width * 2 / 3;
+ height: 50;
+ text: "Visit Marketplace";
+ onClicked: {
+ sendToScript({method: 'purchases_goToMarketplaceClicked'});
+ }
+ }
+ }
}
//
// PURCHASES CONTENTS END
diff --git a/scripts/system/marketplaces/marketplaces.js b/scripts/system/marketplaces/marketplaces.js
index 7b479cdcad..3b97a4c142 100644
--- a/scripts/system/marketplaces/marketplaces.js
+++ b/scripts/system/marketplaces/marketplaces.js
@@ -228,6 +228,9 @@
case 'purchases_backClicked':
tablet.gotoWebScreen(message.referrerURL, MARKETPLACES_INJECT_SCRIPT_URL);
break;
+ case 'purchases_goToMarketplaceClicked':
+ tablet.gotoWebScreen(MARKETPLACE_URL_INITIAL, MARKETPLACES_INJECT_SCRIPT_URL);
+ break;
default:
print('Unrecognized message from Checkout.qml or Purchases.qml: ' + JSON.stringify(message));
}