mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
New notification flow for item updates
This commit is contained in:
parent
2d57c444b6
commit
eb2f8aa169
3 changed files with 61 additions and 18 deletions
|
@ -655,7 +655,7 @@ Item {
|
|||
anchors.bottom: parent.bottom;
|
||||
anchors.left: parent.left;
|
||||
anchors.right: parent.right;
|
||||
color: "#E7F8FB";
|
||||
color: "#B5EAFF";
|
||||
|
||||
RalewayRegular {
|
||||
id: updateAvailableText;
|
||||
|
|
|
@ -38,6 +38,7 @@ Rectangle {
|
|||
property int pendingItemCount: 0;
|
||||
property string installedApps;
|
||||
property bool keyboardRaised: false;
|
||||
property int numUpdatesAvailable: 0;
|
||||
// Style
|
||||
color: hifi.colors.white;
|
||||
Connections {
|
||||
|
@ -127,6 +128,7 @@ Rectangle {
|
|||
console.log("Failed to get Available Updates", result.data.message);
|
||||
} else {
|
||||
sendToScript({method: 'purchases_availableUpdatesReceived', numUpdates: result.data.updates.length });
|
||||
root.numUpdatesAvailable = result.data.updates.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -527,6 +529,64 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: updatesAvailableBanner;
|
||||
visible: true;
|
||||
anchors.bottom: parent.bottom;
|
||||
anchors.left: parent.left;
|
||||
anchors.right: parent.right;
|
||||
height: 75;
|
||||
color: "#B5EAFF";
|
||||
|
||||
Rectangle {
|
||||
id: updatesAvailableGlyph;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: 16;
|
||||
// Size
|
||||
width: 10;
|
||||
height: width;
|
||||
radius: width/2;
|
||||
// Style
|
||||
color: "red";
|
||||
}
|
||||
|
||||
RalewaySemiBold {
|
||||
text: "You have " + root.numUpdatesAvailable + " item updates available.";
|
||||
// Text size
|
||||
size: 18;
|
||||
// Anchors
|
||||
anchors.left: updatesAvailableGlyph.right;
|
||||
anchors.leftMargin: 12;
|
||||
height: parent.height;
|
||||
width: paintedWidth;
|
||||
// Style
|
||||
color: hifi.colors.black;
|
||||
// Alignment
|
||||
verticalAlignment: Text.AlignVCenter;
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
hoverEnabled: true;
|
||||
propagateComposedEvents: false;
|
||||
}
|
||||
|
||||
HifiControlsUit.Button {
|
||||
color: hifi.buttons.white;
|
||||
colorScheme: hifi.colorSchemes.dark;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
anchors.right: parent.right;
|
||||
anchors.rightMargin: 12;
|
||||
width: 100;
|
||||
height: 40;
|
||||
text: "SHOW ME";
|
||||
onClicked: {
|
||||
filterBar.changeFilterByDisplayName("Updatable");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: noItemsAlertContainer;
|
||||
visible: !purchasesContentsList.visible &&
|
||||
|
@ -830,10 +890,6 @@ Rectangle {
|
|||
case 'purchases_showMyItems':
|
||||
root.isShowingMyItems = true;
|
||||
break;
|
||||
case 'showUpdates':
|
||||
// Uncomment and/or change this once we figure out what the correct behavior is.
|
||||
//filterBar.changeFilterByDisplayName("Updatable");
|
||||
break;
|
||||
default:
|
||||
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
||||
}
|
||||
|
|
|
@ -445,12 +445,6 @@ var selectionDisplay = null; // for gridTool.js to ignore
|
|||
} else if (parsedJsonMessage.type === "PURCHASES") {
|
||||
referrerURL = parsedJsonMessage.referrerURL;
|
||||
filterText = "";
|
||||
if (parsedJsonMessage.hasUpdates) {
|
||||
wireEventBridge(true);
|
||||
tablet.sendToQml({
|
||||
method: 'showUpdates'
|
||||
});
|
||||
}
|
||||
tablet.pushOntoStack(MARKETPLACE_PURCHASES_QML_PATH);
|
||||
} else if (parsedJsonMessage.type === "LOGIN") {
|
||||
openLoginWindow();
|
||||
|
@ -553,13 +547,6 @@ 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;
|
||||
|
|
Loading…
Reference in a new issue