diff --git a/interface/resources/icons/tablet-icons/market-a-msg.svg b/interface/resources/icons/tablet-icons/market-a-msg.svg new file mode 100644 index 0000000000..0ab93f3cc8 --- /dev/null +++ b/interface/resources/icons/tablet-icons/market-a-msg.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/interface/resources/icons/tablet-icons/market-a.svg b/interface/resources/icons/tablet-icons/market-a.svg index f8ba17301e..db2d948d7b 100644 --- a/interface/resources/icons/tablet-icons/market-a.svg +++ b/interface/resources/icons/tablet-icons/market-a.svg @@ -1,64 +1,15 @@ - - - -image/svg+xml \ No newline at end of file + + + + + + + + + diff --git a/interface/resources/icons/tablet-icons/market-i-msg.svg b/interface/resources/icons/tablet-icons/market-i-msg.svg new file mode 100644 index 0000000000..488c507c6e --- /dev/null +++ b/interface/resources/icons/tablet-icons/market-i-msg.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + diff --git a/interface/resources/icons/tablet-icons/market-i.svg b/interface/resources/icons/tablet-icons/market-i.svg index bf9aa9335f..7d11507cdb 100644 --- a/interface/resources/icons/tablet-icons/market-i.svg +++ b/interface/resources/icons/tablet-icons/market-i.svg @@ -1,23 +1,19 @@ - - + - - - - - - - - + + + + diff --git a/interface/resources/icons/tablet-icons/market-msg-a.svg b/interface/resources/icons/tablet-icons/market-msg-a.svg deleted file mode 100644 index bf9aa9335f..0000000000 --- a/interface/resources/icons/tablet-icons/market-msg-a.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - diff --git a/interface/resources/icons/tablet-icons/market-msg-i.svg b/interface/resources/icons/tablet-icons/market-msg-i.svg deleted file mode 100644 index bf9aa9335f..0000000000 --- a/interface/resources/icons/tablet-icons/market-msg-i.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - diff --git a/interface/resources/qml/controls-uit/FilterBar.qml b/interface/resources/qml/controls-uit/FilterBar.qml index 333ccc0e59..ecae790b22 100644 --- a/interface/resources/qml/controls-uit/FilterBar.qml +++ b/interface/resources/qml/controls-uit/FilterBar.qml @@ -156,7 +156,7 @@ Item { HiFiGlyphs { id: searchIcon; text: hifi.glyphs.search - color: textColor + color: textField.color size: 40; anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter @@ -166,7 +166,7 @@ Item { // Carat HiFiGlyphs { text: hifi.glyphs.caratDn; - color: textColor; + color: textField.color; size: 40; anchors.left: parent.left; anchors.leftMargin: 15; @@ -216,7 +216,7 @@ Item { // "Clear" button HiFiGlyphs { text: hifi.glyphs.error - color: textColor + color: textField.color size: 40 anchors.right: parent.right anchors.rightMargin: hifi.dimensions.textPadding - 2 @@ -235,7 +235,6 @@ Item { } } - //placeholderTextColor: isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray selectedTextColor: hifi.colors.black selectionColor: hifi.colors.primaryHighlight leftPadding: 44 + (root.primaryFilter_index === -1 ? 0 : primaryFilterTextMetrics.tightBoundingRect.width + 20); @@ -308,4 +307,15 @@ Item { source: dropdownContainer; visible: dropdownContainer.visible; } + + function changeFilterByDisplayName(name) { + for (var i = 0; i < filterBarModel.count; i++) { + if (filterBarModel.get(i).displayName === name) { + root.primaryFilter_index = i; + return; + } + } + + console.log("Passed displayName not found in filterBarModel! primaryFilter unchanged."); + } } diff --git a/interface/resources/qml/hifi/commerce/common/EmulatedMarketplaceHeader.qml b/interface/resources/qml/hifi/commerce/common/EmulatedMarketplaceHeader.qml index f6fb28b08a..54698c1b86 100644 --- a/interface/resources/qml/hifi/commerce/common/EmulatedMarketplaceHeader.qml +++ b/interface/resources/qml/hifi/commerce/common/EmulatedMarketplaceHeader.qml @@ -123,11 +123,11 @@ Item { id: messagesWaitingLight; visible: root.messagesWaiting; anchors.right: myPurchasesLink.left; - anchors.rightMargin: 4; anchors.verticalCenter: parent.verticalCenter; height: 10; width: height; radius: height/2; + color: "red"; } Rectangle { @@ -155,7 +155,7 @@ Item { anchors.fill: parent; hoverEnabled: enabled; onClicked: { - sendToParent({method: 'header_goToPurchases'}); + sendToParent({ method: 'header_goToPurchases', hasUpdates: root.messagesWaiting }); } onEntered: myPurchasesText.color = hifi.colors.blueHighlight; onExited: myPurchasesText.color = hifi.colors.blueAccent; diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml index f67ebead44..463cc3873b 100644 --- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml +++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml @@ -529,7 +529,11 @@ Rectangle { Item { id: noItemsAlertContainer; - visible: !purchasesContentsList.visible && root.purchasesReceived && root.isShowingMyItems && filterBar.text === ""; + visible: !purchasesContentsList.visible && + root.purchasesReceived && + root.isShowingMyItems && + filterBar.text === "" && + filterBar.primaryFilter_displayName === ""; anchors.top: filterBarContainer.bottom; anchors.topMargin: 12; anchors.left: parent.left; @@ -575,7 +579,11 @@ Rectangle { Item { id: noPurchasesAlertContainer; - visible: !purchasesContentsList.visible && root.purchasesReceived && !root.isShowingMyItems && filterBar.text === ""; + visible: !purchasesContentsList.visible && + root.purchasesReceived && + !root.isShowingMyItems && + filterBar.text === "" && + filterBar.primaryFilter_displayName === ""; anchors.top: filterBarContainer.bottom; anchors.topMargin: 12; anchors.left: parent.left; @@ -734,8 +742,8 @@ Rectangle { } if (filterBar.primaryFilter_displayName !== "" && - (filterBar.primaryFilter_displayName.toLowerCase() !== currentItemType.toLowerCase())) { //|| UNCOMMENT WHEN UPGRADES ARE IN - //(filterBar.primaryFilter_displayName === "Updatable" && tempPurchasesModel.get(i).upgradeUrl !== "")) { + ((filterBar.primaryFilter_displayName === "Updatable" && tempPurchasesModel.get(i).upgradeUrl === "") || + (filterBar.primaryFilter_displayName !== "Updatable" && filterBar.primaryFilter_displayName.toLowerCase() !== currentItemType.toLowerCase()))) { tempPurchasesModel.remove(i); i--; } else { @@ -824,7 +832,7 @@ Rectangle { root.isShowingMyItems = true; break; case 'showUpdates': - //primaryFilter; + filterBar.changeFilterByDisplayName("Updatable"); break; default: console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message)); diff --git a/scripts/system/commerce/wallet.js b/scripts/system/commerce/wallet.js index 26ffb08796..d2e7d3ffc8 100644 --- a/scripts/system/commerce/wallet.js +++ b/scripts/system/commerce/wallet.js @@ -698,6 +698,9 @@ Window.location = "hifi://BankOfHighFidelity"; } break; + case 'wallet_availableUpdatesReceived': + // NOP + break; default: print('Unrecognized message from QML:', JSON.stringify(message)); } diff --git a/scripts/system/marketplaces/marketplaces.js b/scripts/system/marketplaces/marketplaces.js index 356707a7e5..4e235b00bf 100644 --- a/scripts/system/marketplaces/marketplaces.js +++ b/scripts/system/marketplaces/marketplaces.js @@ -88,8 +88,8 @@ var selectionDisplay = null; // for gridTool.js to ignore var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var NORMAL_ICON = "icons/tablet-icons/market-i.svg"; var NORMAL_ACTIVE = "icons/tablet-icons/market-a.svg"; - var WAITING_ICON = "icons/tablet-icons/market-msg-i.svg"; - var WAITING_ACTIVE = "icons/tablet-icons/market-msg-a.svg"; + var WAITING_ICON = "icons/tablet-icons/market-i-msg.svg"; + var WAITING_ACTIVE = "icons/tablet-icons/market-a-msg.svg"; var marketplaceButton = tablet.addButton({ icon: NORMAL_ICON, activeIcon: NORMAL_ACTIVE, @@ -98,7 +98,7 @@ var selectionDisplay = null; // for gridTool.js to ignore }); function messagesWaiting(isWaiting) { - button.editProperties({ + marketplaceButton.editProperties({ icon: (isWaiting ? WAITING_ICON : NORMAL_ICON), activeIcon: (isWaiting ? WAITING_ACTIVE : NORMAL_ACTIVE) }); @@ -553,6 +553,13 @@ var selectionDisplay = null; // for gridTool.js to ignore //tablet.popFromStack(); break; case 'header_goToPurchases': + if (message.hasUpdates) { + wireEventBridge(true); + tablet.sendToQml({ + method: 'showUpdates' + }); + } + // Fall through. case 'checkout_goToPurchases': referrerURL = MARKETPLACE_URL_INITIAL; filterText = message.filterText;