mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:03:11 +02:00
initial limited commerce for oculus store prototype
This commit is contained in:
parent
bd480bab80
commit
95b86bf5b7
4 changed files with 53 additions and 24 deletions
|
@ -180,7 +180,8 @@ Rectangle {
|
||||||
HifiCommerceCommon.EmulatedMarketplaceHeader {
|
HifiCommerceCommon.EmulatedMarketplaceHeader {
|
||||||
id: titleBarContainer;
|
id: titleBarContainer;
|
||||||
z: 997;
|
z: 997;
|
||||||
visible: !needsLogIn.visible;
|
visible: false; //HRS FIXME !needsLogIn.visible;
|
||||||
|
height: 100; // HRS FIXME
|
||||||
// Size
|
// Size
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
@ -475,7 +476,7 @@ Rectangle {
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 16;
|
anchors.leftMargin: 16;
|
||||||
width: paintedWidth;
|
width: paintedWidth;
|
||||||
text: isShowingMyItems ? "My Items" : "My Purchases";
|
text: "Inventory"; // HRS FIXME isShowingMyItems ? "My Items" : "My Purchases";
|
||||||
color: hifi.colors.black;
|
color: hifi.colors.black;
|
||||||
size: 22;
|
size: 22;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import "../../../controls" as HifiControls
|
||||||
import "../common" as HifiCommerceCommon
|
import "../common" as HifiCommerceCommon
|
||||||
import "../common/sendAsset"
|
import "../common/sendAsset"
|
||||||
import "../.." as HifiCommon
|
import "../.." as HifiCommon
|
||||||
|
import "../purchases" as HifiPurchases
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
HifiConstants { id: hifi; }
|
HifiConstants { id: hifi; }
|
||||||
|
@ -64,7 +65,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
} else if (walletStatus === 5) {
|
} else if (walletStatus === 5) {
|
||||||
if (root.activeView !== "walletSetup") {
|
if (root.activeView !== "walletSetup") {
|
||||||
root.activeView = "walletHome";
|
root.activeView = "walletInventory"; // HRS FIXME "walletHome";
|
||||||
Commerce.getSecurityImage();
|
Commerce.getSecurityImage();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -124,7 +125,7 @@ Rectangle {
|
||||||
// Title Bar text
|
// Title Bar text
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: titleBarText;
|
id: titleBarText;
|
||||||
text: "WALLET";
|
text: "ASSETS"; //"WALLET";
|
||||||
// Text size
|
// Text size
|
||||||
size: hifi.fontSizes.overlayTitle;
|
size: hifi.fontSizes.overlayTitle;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
@ -342,6 +343,17 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HifiPurchases.Purchases {
|
||||||
|
id: walletInventory;
|
||||||
|
visible: root.activeView === "walletInventory";
|
||||||
|
anchors.top: titleBarContainer.bottom;
|
||||||
|
anchors.bottom: tabButtonsContainer.top;
|
||||||
|
anchors.left: parent.left;
|
||||||
|
anchors.right: parent.right;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiCommon.RootHttpRequest {
|
HifiCommon.RootHttpRequest {
|
||||||
|
@ -354,7 +366,6 @@ Rectangle {
|
||||||
listModelName: "Send Money Connections";
|
listModelName: "Send Money Connections";
|
||||||
z: 997;
|
z: 997;
|
||||||
visible: root.activeView === "sendMoney";
|
visible: root.activeView === "sendMoney";
|
||||||
keyboardContainer: root;
|
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
parentAppTitleBarHeight: titleBarContainer.height;
|
parentAppTitleBarHeight: titleBarContainer.height;
|
||||||
parentAppNavBarHeight: tabButtonsContainer.height;
|
parentAppNavBarHeight: tabButtonsContainer.height;
|
||||||
|
@ -449,13 +460,13 @@ Rectangle {
|
||||||
visible: !walletSetup.visible;
|
visible: !walletSetup.visible;
|
||||||
color: root.activeView === "walletHome" ? hifi.colors.blueAccent : hifi.colors.black;
|
color: root.activeView === "walletHome" ? hifi.colors.blueAccent : hifi.colors.black;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.left: parent.left;
|
anchors.left: exchangeMoneyButtonContainer.right; // HRS FIXME parent.left;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
width: parent.width / tabButtonsContainer.numTabs;
|
width: parent.width / tabButtonsContainer.numTabs;
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
id: homeTabIcon;
|
id: homeTabIcon;
|
||||||
text: hifi.glyphs.home2;
|
text: hifi.glyphs.leftRightArrows; // HRS FIXME hifi.glyphs.home2;
|
||||||
// Size
|
// Size
|
||||||
size: 50;
|
size: 50;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
@ -463,11 +474,11 @@ Rectangle {
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: -2;
|
anchors.topMargin: -2;
|
||||||
// Style
|
// Style
|
||||||
color: root.activeView === "walletHome" || walletHomeTabMouseArea.containsMouse ? hifi.colors.white : hifi.colors.blueHighlight;
|
color: hifi.colors.lightGray50; // HRS FIXME root.activeView === "walletHome" || walletHomeTabMouseArea.containsMouse ? hifi.colors.white : hifi.colors.blueHighlight;
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
text: "WALLET HOME";
|
text: "RECENT ACTIVITY"; //"WALLET HOME";
|
||||||
// Text size
|
// Text size
|
||||||
size: 16;
|
size: 16;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
@ -478,13 +489,13 @@ Rectangle {
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 4;
|
anchors.rightMargin: 4;
|
||||||
// Style
|
// Style
|
||||||
color: root.activeView === "walletHome" || walletHomeTabMouseArea.containsMouse ? hifi.colors.white : hifi.colors.blueHighlight;
|
color: hifi.colors.lightGray50; // HRS FIXME root.activeView === "walletHome" || walletHomeTabMouseArea.containsMouse ? hifi.colors.white : hifi.colors.blueHighlight;
|
||||||
wrapMode: Text.WordWrap;
|
wrapMode: Text.WordWrap;
|
||||||
// Alignment
|
// Alignment
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
horizontalAlignment: Text.AlignHCenter;
|
||||||
verticalAlignment: Text.AlignTop;
|
verticalAlignment: Text.AlignTop;
|
||||||
}
|
}
|
||||||
MouseArea {
|
/* HRS FIXME MouseArea {
|
||||||
id: walletHomeTabMouseArea;
|
id: walletHomeTabMouseArea;
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
hoverEnabled: enabled;
|
hoverEnabled: enabled;
|
||||||
|
@ -494,22 +505,22 @@ Rectangle {
|
||||||
}
|
}
|
||||||
onEntered: parent.color = hifi.colors.blueHighlight;
|
onEntered: parent.color = hifi.colors.blueHighlight;
|
||||||
onExited: parent.color = root.activeView === "walletHome" ? hifi.colors.blueAccent : hifi.colors.black;
|
onExited: parent.color = root.activeView === "walletHome" ? hifi.colors.blueAccent : hifi.colors.black;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// "EXCHANGE MONEY" tab button
|
// "EXCHANGE MONEY" tab button
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: exchangeMoneyButtonContainer;
|
id: exchangeMoneyButtonContainer;
|
||||||
visible: !walletSetup.visible;
|
visible: !walletSetup.visible;
|
||||||
color: hifi.colors.black;
|
color: root.activeView === "walletInventory" ? hifi.colors.blueAccent : hifi.colors.black; // HRS FIXME hifi.colors.black;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.left: walletHomeButtonContainer.right;
|
anchors.left: parent.left; // FIXME walletHomeButtonContainer.right;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
width: parent.width / tabButtonsContainer.numTabs;
|
width: parent.width / tabButtonsContainer.numTabs;
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
id: exchangeMoneyTabIcon;
|
id: exchangeMoneyTabIcon;
|
||||||
text: hifi.glyphs.leftRightArrows;
|
text: hifi.glyphs.home2; // HRS FIXME hifi.glyphs.leftRightArrows;
|
||||||
// Size
|
// Size
|
||||||
size: 50;
|
size: 50;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
@ -517,11 +528,11 @@ Rectangle {
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: -2;
|
anchors.topMargin: -2;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.lightGray50;
|
color: root.activeView === "walletInventory" || walletHomeTabMouseArea.containsMouse ? hifi.colors.white : hifi.colors.blueHighlight; // HRS FIXMEhifi.colors.lightGray50;
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
text: "EXCHANGE MONEY";
|
text: "INVENTORY"; // HRS FIXME "EXCHANGE MONEY";
|
||||||
// Text size
|
// Text size
|
||||||
size: 16;
|
size: 16;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
@ -532,12 +543,24 @@ Rectangle {
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 4;
|
anchors.rightMargin: 4;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.lightGray50;
|
color: root.activeView === "walletInventory" || walletHomeTabMouseArea.containsMouse ? hifi.colors.white : hifi.colors.blueHighlight; // HRS FIXME hifi.colors.lightGray50;
|
||||||
wrapMode: Text.WordWrap;
|
wrapMode: Text.WordWrap;
|
||||||
// Alignment
|
// Alignment
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
horizontalAlignment: Text.AlignHCenter;
|
||||||
verticalAlignment: Text.AlignTop;
|
verticalAlignment: Text.AlignTop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: inventoryTabMouseArea;
|
||||||
|
anchors.fill: parent;
|
||||||
|
hoverEnabled: enabled;
|
||||||
|
onClicked: {
|
||||||
|
root.activeView = "walletInventory";
|
||||||
|
tabButtonsContainer.resetTabButtonColors();
|
||||||
|
}
|
||||||
|
onEntered: parent.color = hifi.colors.blueHighlight;
|
||||||
|
onExited: parent.color = root.activeView === "walletInventory" ? hifi.colors.blueAccent : hifi.colors.black;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -547,7 +570,7 @@ Rectangle {
|
||||||
visible: !walletSetup.visible;
|
visible: !walletSetup.visible;
|
||||||
color: root.activeView === "sendMoney" ? hifi.colors.blueAccent : hifi.colors.black;
|
color: root.activeView === "sendMoney" ? hifi.colors.blueAccent : hifi.colors.black;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.left: exchangeMoneyButtonContainer.right;
|
anchors.left: walletHomeButtonContainer.right; // HRS FIXME exchangeMoneyButtonContainer.right;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
width: parent.width / tabButtonsContainer.numTabs;
|
width: parent.width / tabButtonsContainer.numTabs;
|
||||||
|
|
||||||
|
@ -561,7 +584,7 @@ Rectangle {
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: -2;
|
anchors.topMargin: -2;
|
||||||
// Style
|
// Style
|
||||||
color: root.activeView === "sendMoney" || sendMoneyTabMouseArea.containsMouse ? hifi.colors.white : hifi.colors.blueHighlight;
|
color: hifi.colors.lightGray50; // HRS FIXME root.activeView === "sendMoney" || sendMoneyTabMouseArea.containsMouse ? hifi.colors.white : hifi.colors.blueHighlight;
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
|
@ -576,14 +599,14 @@ Rectangle {
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 4;
|
anchors.rightMargin: 4;
|
||||||
// Style
|
// Style
|
||||||
color: root.activeView === "sendMoney" || sendMoneyTabMouseArea.containsMouse ? hifi.colors.white : hifi.colors.blueHighlight;
|
color: hifi.colors.lightGray50; // HRS FIXME root.activeView === "sendMoney" || sendMoneyTabMouseArea.containsMouse ? hifi.colors.white : hifi.colors.blueHighlight;
|
||||||
wrapMode: Text.WordWrap;
|
wrapMode: Text.WordWrap;
|
||||||
// Alignment
|
// Alignment
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
horizontalAlignment: Text.AlignHCenter;
|
||||||
verticalAlignment: Text.AlignTop;
|
verticalAlignment: Text.AlignTop;
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
/* HRS FIXME MouseArea {
|
||||||
id: sendMoneyTabMouseArea;
|
id: sendMoneyTabMouseArea;
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
hoverEnabled: enabled;
|
hoverEnabled: enabled;
|
||||||
|
@ -593,7 +616,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
onEntered: parent.color = hifi.colors.blueHighlight;
|
onEntered: parent.color = hifi.colors.blueHighlight;
|
||||||
onExited: parent.color = root.activeView === "sendMoney" ? hifi.colors.blueAccent : hifi.colors.black;
|
onExited: parent.color = root.activeView === "sendMoney" ? hifi.colors.blueAccent : hifi.colors.black;
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
// "SECURITY" tab button
|
// "SECURITY" tab button
|
||||||
|
@ -710,6 +733,7 @@ Rectangle {
|
||||||
sendMoneyButtonContainer.color = hifi.colors.black;
|
sendMoneyButtonContainer.color = hifi.colors.black;
|
||||||
securityButtonContainer.color = hifi.colors.black;
|
securityButtonContainer.color = hifi.colors.black;
|
||||||
helpButtonContainer.color = hifi.colors.black;
|
helpButtonContainer.color = hifi.colors.black;
|
||||||
|
exchangeMoneyButtonContainer.color = hifi.colors.black; // HRS FIXME
|
||||||
if (root.activeView === "walletHome") {
|
if (root.activeView === "walletHome") {
|
||||||
walletHomeButtonContainer.color = hifi.colors.blueAccent;
|
walletHomeButtonContainer.color = hifi.colors.blueAccent;
|
||||||
} else if (root.activeView === "sendMoney") {
|
} else if (root.activeView === "sendMoney") {
|
||||||
|
@ -718,6 +742,8 @@ Rectangle {
|
||||||
securityButtonContainer.color = hifi.colors.blueAccent;
|
securityButtonContainer.color = hifi.colors.blueAccent;
|
||||||
} else if (root.activeView === "help") {
|
} else if (root.activeView === "help") {
|
||||||
helpButtonContainer.color = hifi.colors.blueAccent;
|
helpButtonContainer.color = hifi.colors.blueAccent;
|
||||||
|
} else if (root.activeView == "walletInventory") { // HRS FIXME
|
||||||
|
exchangeMoneyButtonContainer.color = hifi.colors.blueAccent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -559,12 +559,13 @@ function uninstallMarketplaceItemTester() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var BUTTON_NAME = "WALLET";
|
var BUTTON_NAME = "ASSETS"; //HRS FIXME "WALLET";
|
||||||
var WALLET_QML_SOURCE = "hifi/commerce/wallet/Wallet.qml";
|
var WALLET_QML_SOURCE = "hifi/commerce/wallet/Wallet.qml";
|
||||||
var ui;
|
var ui;
|
||||||
function startup() {
|
function startup() {
|
||||||
ui = new AppUi({
|
ui = new AppUi({
|
||||||
buttonName: BUTTON_NAME,
|
buttonName: BUTTON_NAME,
|
||||||
|
buttonPrefix: "wallet-",
|
||||||
sortOrder: 10,
|
sortOrder: 10,
|
||||||
home: WALLET_QML_SOURCE,
|
home: WALLET_QML_SOURCE,
|
||||||
onOpened: walletOpened,
|
onOpened: walletOpened,
|
||||||
|
|
|
@ -219,6 +219,7 @@
|
||||||
purchasesElement.style = "height:100%;margin-top:18px;font-weight:bold;float:right;margin-right:" + (dropDownElement.offsetWidth + 30) +
|
purchasesElement.style = "height:100%;margin-top:18px;font-weight:bold;float:right;margin-right:" + (dropDownElement.offsetWidth + 30) +
|
||||||
"px;position:relative;z-index:999;";
|
"px;position:relative;z-index:999;";
|
||||||
navbarBrandElement.parentNode.insertAdjacentElement('beforeend', purchasesElement);
|
navbarBrandElement.parentNode.insertAdjacentElement('beforeend', purchasesElement);
|
||||||
|
$('#purchasesButton').css('display', 'none'); // HRS FIXME
|
||||||
$('#purchasesButton').on('click', function () {
|
$('#purchasesButton').on('click', function () {
|
||||||
EventBridge.emitWebEvent(JSON.stringify({
|
EventBridge.emitWebEvent(JSON.stringify({
|
||||||
type: "PURCHASES",
|
type: "PURCHASES",
|
||||||
|
|
Loading…
Reference in a new issue