diff --git a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml
index 5329099df5..cdd692dd17 100644
--- a/interface/resources/qml/hifi/commerce/checkout/Checkout.qml
+++ b/interface/resources/qml/hifi/commerce/checkout/Checkout.qml
@@ -147,6 +147,16 @@ Rectangle {
cache: false;
source: "image://security/securityImage";
}
+ Image {
+ id: securityImageOverlay;
+ source: "../wallet/images/lockOverlay.png";
+ width: securityImage.width * 0.45;
+ height: securityImage.height * 0.45;
+ anchors.bottom: securityImage.bottom;
+ anchors.right: securityImage.right;
+ mipmap: true;
+ opacity: 0.9;
+ }
// Separator
HifiControlsUit.Separator {
@@ -877,7 +887,7 @@ Rectangle {
if (root.purchasesReceived && root.balanceReceived) {
if (root.balanceAfterPurchase < 0) {
if (root.alreadyOwned) {
- buyText.text = "You do not have enough HFC to purchase this item again. Go to your Purchases to view the copy you own.";
+ buyText.text = "You do not have enough HFC to purchase this item again. Go to your Purchases to view the copy you own.";
} else {
buyText.text = "You do not have enough HFC to purchase this item.";
}
diff --git a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
index 5060b65e0b..a88633344f 100644
--- a/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
+++ b/interface/resources/qml/hifi/commerce/purchases/Purchases.qml
@@ -29,6 +29,7 @@ Rectangle {
property string referrerURL: "";
property bool securityImageResultReceived: false;
property bool keyFilePathIfExistsResultReceived: false;
+ property bool inventoryReceived: false;
property bool punctuationMode: false;
// Style
color: hifi.colors.baseGray;
@@ -58,6 +59,7 @@ Rectangle {
}
onInventoryResult: {
+ inventoryReceived = true;
if (result.status !== 'success') {
console.log("Failed to get purchases", result.message);
} else {
@@ -116,6 +118,16 @@ Rectangle {
cache: false;
source: "image://security/securityImage";
}
+ Image {
+ id: securityImageOverlay;
+ source: "../wallet/images/lockOverlay.png";
+ width: securityImage.width * 0.45;
+ height: securityImage.height * 0.45;
+ anchors.bottom: securityImage.bottom;
+ anchors.right: securityImage.right;
+ mipmap: true;
+ opacity: 0.9;
+ }
// Separator
HifiControlsUit.Separator {
@@ -258,7 +270,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 +318,7 @@ Rectangle {
ListView {
id: purchasesContentsList;
+ visible: purchasesModel.count !== 0;
clip: true;
model: filteredPurchasesModel;
// Anchors
@@ -329,6 +344,52 @@ Rectangle {
}
}
}
+
+ Item {
+ id: noPurchasesAlertContainer;
+ visible: !purchasesContentsList.visible && root.inventoryReceived;
+ 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/interface/resources/qml/hifi/commerce/wallet/NotSetUp.qml b/interface/resources/qml/hifi/commerce/wallet/NotSetUp.qml
index 3efb592ba1..42b8526a8a 100644
--- a/interface/resources/qml/hifi/commerce/wallet/NotSetUp.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/NotSetUp.qml
@@ -80,7 +80,7 @@ Item {
// "Set Up" button
HifiControlsUit.Button {
- color: hifi.buttons.black;
+ color: hifi.buttons.blue;
colorScheme: hifi.colorSchemes.dark;
anchors.bottom: parent.bottom;
anchors.bottomMargin: 150;
diff --git a/interface/resources/qml/hifi/commerce/wallet/PassphraseSelection.qml b/interface/resources/qml/hifi/commerce/wallet/PassphraseSelection.qml
index 89ef851b06..84c9393b06 100644
--- a/interface/resources/qml/hifi/commerce/wallet/PassphraseSelection.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/PassphraseSelection.qml
@@ -48,6 +48,9 @@ Item {
onVisibleChanged: {
if (visible) {
passphraseField.focus = true;
+ sendMessageToLightbox({method: 'disableHmdPreview'});
+ } else {
+ sendMessageToLightbox({method: 'maybeEnableHmdPreview'});
}
}
@@ -71,6 +74,26 @@ Item {
text = "";
}
}
+
+ onFocusChanged: {
+ if (focus) {
+ sendMessageToLightbox({method: 'walletSetup_raiseKeyboard'});
+ } else if (!passphraseFieldAgain.focus) {
+ sendMessageToLightbox({method: 'walletSetup_lowerKeyboard'});
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent;
+ onClicked: {
+ parent.focus = true;
+ sendMessageToLightbox({method: 'walletSetup_raiseKeyboard'});
+ }
+ }
+
+ onAccepted: {
+ passphraseFieldAgain.focus = true;
+ }
}
HifiControlsUit.TextField {
id: passphraseFieldAgain;
@@ -87,6 +110,26 @@ Item {
text = "";
}
}
+
+ onFocusChanged: {
+ if (focus) {
+ sendMessageToLightbox({method: 'walletSetup_raiseKeyboard'});
+ } else if (!passphraseField.focus) {
+ sendMessageToLightbox({method: 'walletSetup_lowerKeyboard'});
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent;
+ onClicked: {
+ parent.focus = true;
+ sendMessageToLightbox({method: 'walletSetup_raiseKeyboard'});
+ }
+ }
+
+ onAccepted: {
+ focus = false;
+ }
}
// Security Image
@@ -111,9 +154,19 @@ Item {
commerce.getSecurityImage();
}
}
- // "Security picture" text below pic
+ Image {
+ id: topSecurityImageOverlay;
+ source: "images/lockOverlay.png";
+ width: passphrasePageSecurityImage.width * 0.45;
+ height: passphrasePageSecurityImage.height * 0.45;
+ anchors.bottom: passphrasePageSecurityImage.bottom;
+ anchors.right: passphrasePageSecurityImage.right;
+ mipmap: true;
+ opacity: 0.9;
+ }
+ // "Security image" text below pic
RalewayRegular {
- text: "security picture";
+ text: "security image";
// Text size
size: 12;
// Anchors
diff --git a/interface/resources/qml/hifi/commerce/wallet/PassphraseSelectionLightbox.qml b/interface/resources/qml/hifi/commerce/wallet/PassphraseSelectionLightbox.qml
index 862d1894db..a26bc01533 100644
--- a/interface/resources/qml/hifi/commerce/wallet/PassphraseSelectionLightbox.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/PassphraseSelectionLightbox.qml
@@ -33,23 +33,6 @@ Rectangle {
}
}
- Connections {
- target: passphraseSelection;
- onSendMessageToLightbox: {
- if (msg.method === 'statusResult') {
- if (msg.status) {
- // Success submitting new passphrase
- root.resetSubmitButton();
- root.visible = false;
- } else {
- // Error submitting new passphrase
- root.resetSubmitButton();
- passphraseSelection.setErrorText("Backend error");
- }
- }
- }
- }
-
//
// SECURE PASSPHRASE SELECTION START
//
@@ -113,6 +96,24 @@ Rectangle {
anchors.left: parent.left;
anchors.right: parent.right;
anchors.bottom: passphraseNavBar.top;
+
+ Connections {
+ onSendMessageToLightbox: {
+ if (msg.method === 'statusResult') {
+ if (msg.status) {
+ // Success submitting new passphrase
+ root.resetSubmitButton();
+ root.visible = false;
+ } else {
+ // Error submitting new passphrase
+ root.resetSubmitButton();
+ passphraseSelection.setErrorText("Backend error");
+ }
+ } else {
+ sendSignalToWallet(msg);
+ }
+ }
+ }
}
// Navigation Bar
@@ -168,6 +169,8 @@ Rectangle {
// SECURE PASSPHRASE SELECTION END
//
+ signal sendSignalToWallet(var msg);
+
function resetSubmitButton() {
passphraseSubmitButton.enabled = true;
passphraseSubmitButton.text = "Submit";
diff --git a/interface/resources/qml/hifi/commerce/wallet/Security.qml b/interface/resources/qml/hifi/commerce/wallet/Security.qml
index d0a96db3f2..b5d52d57e2 100644
--- a/interface/resources/qml/hifi/commerce/wallet/Security.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/Security.qml
@@ -13,6 +13,7 @@
import Hifi 1.0 as Hifi
import QtQuick 2.5
+import QtGraphicalEffects 1.0
import QtQuick.Controls 1.4
import "../../../styles-uit"
import "../../../controls-uit" as HifiControlsUit
@@ -35,8 +36,6 @@ Item {
topSecurityImage.source = path;
changeSecurityImageImage.source = "";
changeSecurityImageImage.source = path;
- changePassphraseImage.source = "";
- changePassphraseImage.source = path;
}
}
@@ -92,9 +91,19 @@ Item {
source: "image://security/securityImage";
cache: false;
}
- // "Security picture" text below pic
+ Image {
+ id: topSecurityImageMask;
+ source: "images/lockOverlay.png";
+ width: topSecurityImage.width * 0.45;
+ height: topSecurityImage.height * 0.45;
+ anchors.bottom: topSecurityImage.bottom;
+ anchors.right: topSecurityImage.right;
+ mipmap: true;
+ opacity: 0.9;
+ }
+ // "Security image" text below pic
RalewayRegular {
- text: "security picture";
+ text: "security image";
// Text size
size: 12;
// Anchors
@@ -148,10 +157,16 @@ Item {
anchors.left: parent.left;
height: parent.height;
width: height;
- source: "image://security/securityImage";
+ source: "images/lockOverlay.png";
fillMode: Image.PreserveAspectFit;
mipmap: true;
cache: false;
+ visible: false;
+ }
+ ColorOverlay {
+ anchors.fill: changePassphraseImage;
+ source: changePassphraseImage;
+ color: "white"
}
// "Change Passphrase" button
HifiControlsUit.Button {
diff --git a/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelection.qml b/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelection.qml
index 7ab52b7551..2bf99ba615 100644
--- a/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelection.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelection.qml
@@ -27,13 +27,14 @@ Item {
Hifi.QmlCommerce {
id: commerce;
- onSecurityImageResult: {
- }
}
onVisibleChanged: {
if (visible) {
commerce.getSecurityImage();
+ sendSignalToWallet({method: 'disableHmdPreview'});
+ } else {
+ sendSignalToWallet({method: 'maybeEnableHmdPreview'});
}
}
@@ -83,7 +84,7 @@ Item {
//
// FUNCTION DEFINITIONS START
//
- signal sendToScript(var message);
+ signal sendSignalToWallet(var msg);
function getImagePathFromImageID(imageID) {
return (imageID ? gridModel.getImagePathFromImageID(imageID) : "");
diff --git a/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelectionLightbox.qml b/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelectionLightbox.qml
index d4b0b82ed3..397c5c7788 100644
--- a/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelectionLightbox.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/SecurityImageSelectionLightbox.qml
@@ -116,6 +116,12 @@ Rectangle {
anchors.right: parent.right;
anchors.rightMargin: 16;
height: 280;
+
+ Connections {
+ onSendSignalToWallet: {
+ sendSignalToWallet(msg);
+ }
+ }
}
// Text below security images
@@ -193,6 +199,8 @@ Rectangle {
// SECURITY IMAGE SELECTION END
//
+ signal sendSignalToWallet(var msg);
+
function resetSubmitButton() {
securityImageSubmitButton.enabled = true;
securityImageSubmitButton.text = "Submit";
diff --git a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml
index ae2606c0f6..3a46082988 100644
--- a/interface/resources/qml/hifi/commerce/wallet/Wallet.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/Wallet.qml
@@ -28,6 +28,7 @@ Rectangle {
property string activeView: "initialize";
property bool securityImageResultReceived: false;
property bool keyFilePathIfExistsResultReceived: false;
+ property bool keyboardRaised: false;
// Style
color: hifi.colors.baseGray;
@@ -57,27 +58,6 @@ Rectangle {
id: securityImageModel;
}
- Connections {
- target: walletSetupLightbox;
- onSendSignalToWallet: {
- if (msg.method === 'walletSetup_cancelClicked') {
- walletSetupLightbox.visible = false;
- } else if (msg.method === 'walletSetup_finished') {
- root.activeView = "walletHome";
- } else {
- sendToScript(msg);
- }
- }
- }
- Connections {
- target: notSetUp;
- onSendSignalToWallet: {
- if (msg.method === 'setUpClicked') {
- walletSetupLightbox.visible = true;
- }
- }
- }
-
Rectangle {
id: walletSetupLightboxContainer;
visible: walletSetupLightbox.visible || passphraseSelectionLightbox.visible || securityImageSelectionLightbox.visible;
@@ -89,26 +69,60 @@ Rectangle {
WalletSetupLightbox {
id: walletSetupLightbox;
visible: false;
- z: 999;
+ z: 998;
anchors.centerIn: walletSetupLightboxContainer;
width: walletSetupLightboxContainer.width - 50;
height: walletSetupLightboxContainer.height - 50;
+
+ Connections {
+ onSendSignalToWallet: {
+ if (msg.method === 'walletSetup_cancelClicked') {
+ walletSetupLightbox.visible = false;
+ } else if (msg.method === 'walletSetup_finished') {
+ root.activeView = "walletHome";
+ } else if (msg.method === 'walletSetup_raiseKeyboard') {
+ root.keyboardRaised = true;
+ } else if (msg.method === 'walletSetup_lowerKeyboard') {
+ root.keyboardRaised = false;
+ } else {
+ sendToScript(msg);
+ }
+ }
+ }
}
PassphraseSelectionLightbox {
id: passphraseSelectionLightbox;
visible: false;
- z: 999;
+ z: 998;
anchors.centerIn: walletSetupLightboxContainer;
width: walletSetupLightboxContainer.width - 50;
height: walletSetupLightboxContainer.height - 50;
+
+ Connections {
+ onSendSignalToWallet: {
+ if (msg.method === 'walletSetup_raiseKeyboard') {
+ root.keyboardRaised = true;
+ } else if (msg.method === 'walletSetup_lowerKeyboard') {
+ root.keyboardRaised = false;
+ } else {
+ sendToScript(msg);
+ }
+ }
+ }
}
SecurityImageSelectionLightbox {
id: securityImageSelectionLightbox;
visible: false;
- z: 999;
+ z: 998;
anchors.centerIn: walletSetupLightboxContainer;
width: walletSetupLightboxContainer.width - 50;
height: walletSetupLightboxContainer.height - 50;
+
+ Connections {
+ onSendSignalToWallet: {
+ sendToScript(msg);
+ }
+ }
}
@@ -180,6 +194,14 @@ Rectangle {
anchors.bottom: tabButtonsContainer.top;
anchors.left: parent.left;
anchors.right: parent.right;
+
+ Connections {
+ onSendSignalToWallet: {
+ if (msg.method === 'setUpClicked') {
+ walletSetupLightbox.visible = true;
+ }
+ }
+ }
}
WalletHome {
@@ -219,14 +241,14 @@ Rectangle {
anchors.leftMargin: 16;
anchors.right: parent.right;
anchors.rightMargin: 16;
- }
- Connections {
- target: security;
- onSendSignalToWallet: {
- if (msg.method === 'walletSecurity_changePassphrase') {
- passphraseSelectionLightbox.visible = true;
- } else if (msg.method === 'walletSecurity_changeSecurityImage') {
- securityImageSelectionLightbox.visible = true;
+
+ Connections {
+ onSendSignalToWallet: {
+ if (msg.method === 'walletSecurity_changePassphrase') {
+ passphraseSelectionLightbox.visible = true;
+ } else if (msg.method === 'walletSecurity_changeSecurityImage') {
+ securityImageSelectionLightbox.visible = true;
+ }
}
}
}
@@ -455,7 +477,47 @@ Rectangle {
}
//
// TAB BUTTONS END
- //
+ //
+
+ Item {
+ id: keyboardContainer;
+ z: 999;
+ visible: keyboard.raised;
+ anchors {
+ bottom: parent.bottom;
+ left: parent.left;
+ right: parent.right;
+ }
+
+ Image {
+ id: lowerKeyboardButton;
+ source: "images/lowerKeyboard.png";
+ anchors.horizontalCenter: parent.horizontalCenter;
+ anchors.bottom: keyboard.top;
+ height: 30;
+ width: 120;
+
+ MouseArea {
+ anchors.fill: parent;
+
+ onClicked: {
+ root.keyboardRaised = false;
+ }
+ }
+ }
+
+ HifiControlsUit.Keyboard {
+ id: keyboard;
+ property bool punctuationMode: false;
+ raised: HMD.mounted && root.keyboardRaised;
+ numeric: keyboard.punctuationMode;
+ anchors {
+ bottom: parent.bottom;
+ left: parent.left;
+ right: parent.right;
+ }
+ }
+ }
//
// FUNCTION DEFINITIONS START
diff --git a/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml b/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml
index 33faacd0ab..c69610d494 100644
--- a/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/WalletHome.qml
@@ -182,9 +182,19 @@ Item {
cache: false;
source: "image://security/securityImage";
}
- // "Security picture" text below pic
+ Image {
+ id: securityImageOverlay;
+ source: "images/lockOverlay.png";
+ width: securityImage.width * 0.45;
+ height: securityImage.height * 0.45;
+ anchors.bottom: securityImage.bottom;
+ anchors.right: securityImage.right;
+ mipmap: true;
+ opacity: 0.9;
+ }
+ // "Security image" text below pic
RalewayRegular {
- text: "security picture";
+ text: "security image";
// Text size
size: 12;
// Anchors
@@ -208,8 +218,7 @@ Item {
anchors.topMargin: 8;
anchors.left: parent.left;
anchors.right: parent.right;
- anchors.bottom: homeMessage.visible ? homeMessage.top : root.bottom;
- anchors.bottomMargin: 10;
+ anchors.bottom: parent.bottom;
RalewayRegular {
id: recentActivityText;
@@ -229,8 +238,7 @@ Item {
id: transactionHistory;
anchors.top: recentActivityText.bottom;
anchors.topMargin: 4;
- anchors.bottom: toggleFullHistoryButton.top;
- anchors.bottomMargin: 8;
+ anchors.bottom: parent.bottom;
anchors.left: parent.left;
anchors.right: parent.right;
@@ -245,92 +253,6 @@ Item {
verticalAlignment: Text.AlignTop;
}
}
-
- HifiControlsUit.Button {
- id: toggleFullHistoryButton;
- color: hifi.buttons.black;
- colorScheme: hifi.colorSchemes.dark;
- anchors.bottom: parent.bottom;
- anchors.right: parent.right;
- width: 250;
- height: 40;
- text: homeMessage.visible ? "See Full Transaction History" : "Collapse Transaction History";
- onClicked: {
- if (homeMessage.visible) {
- homeMessage.visible = false;
- } else {
- homeMessage.visible = true;
- }
- }
- }
- }
-
- // Item for "messages" - like "Welcome"
- Item {
- id: homeMessage;
- anchors.bottom: parent.bottom;
- anchors.left: parent.left;
- anchors.leftMargin: 20;
- anchors.right: parent.right;
- anchors.rightMargin: 20;
- height: childrenRect.height;
-
- RalewayRegular {
- id: messageText;
- text: "Welcome! Let's get you some spending money.
" +
- "Now that your account is all set up, click the button below to request your starter money. " +
- "A robot will promptly review your request and put money into your account.";
- // Text size
- size: 16;
- // Anchors
- anchors.top: parent.top;
- anchors.left: parent.left;
- anchors.right: parent.right;
- height: 130;
- // Style
- color: hifi.colors.faintGray;
- wrapMode: Text.WordWrap;
- // Alignment
- horizontalAlignment: Text.AlignHLeft;
- verticalAlignment: Text.AlignVCenter;
- }
-
- Item {
- id: homeMessageButtons;
- anchors.top: messageText.bottom;
- anchors.topMargin: 4;
- anchors.left: parent.left;
- anchors.right: parent.right;
- height: 40;
- HifiControlsUit.Button {
- id: noThanksButton;
- color: hifi.buttons.black;
- colorScheme: hifi.colorSchemes.dark;
- anchors.top: parent.top;
- anchors.bottom: parent.bottom;
- anchors.left: parent.left;
- width: 100;
- text: "No Thanks"
- onClicked: {
- messageText.text = "Okay...weird. Who doesn't like free money? If you change your mind, too bad. Sorry."
- homeMessageButtons.visible = false;
- }
- }
- HifiControlsUit.Button {
- id: freeMoneyButton;
- color: hifi.buttons.black;
- colorScheme: hifi.colorSchemes.dark;
- anchors.top: parent.top;
- anchors.bottom: parent.bottom;
- anchors.right: parent.right;
- width: 210;
- text: "Free Money Please"
- onClicked: {
- messageText.text = "Go, MoneyRobots, Go!"
- homeMessageButtons.visible = false;
- }
- }
- }
}
//
diff --git a/interface/resources/qml/hifi/commerce/wallet/WalletSetupLightbox.qml b/interface/resources/qml/hifi/commerce/wallet/WalletSetupLightbox.qml
index bbeb77f6fa..d2ddb204fb 100644
--- a/interface/resources/qml/hifi/commerce/wallet/WalletSetupLightbox.qml
+++ b/interface/resources/qml/hifi/commerce/wallet/WalletSetupLightbox.qml
@@ -262,6 +262,12 @@ Rectangle {
anchors.right: parent.right;
anchors.rightMargin: 16;
height: 280;
+
+ Connections {
+ onSendSignalToWallet: {
+ sendSignalToWallet(msg);
+ }
+ }
}
// Text below security images
@@ -407,6 +413,15 @@ Rectangle {
anchors.left: parent.left;
anchors.right: parent.right;
anchors.bottom: passphraseNavBar.top;
+
+ Connections {
+ onSendMessageToLightbox: {
+ if (msg.method === 'statusResult') {
+ } else {
+ sendSignalToWallet(msg);
+ }
+ }
+ }
}
// Navigation Bar
diff --git a/interface/resources/qml/hifi/commerce/wallet/images/lockOverlay.png b/interface/resources/qml/hifi/commerce/wallet/images/lockOverlay.png
new file mode 100644
index 0000000000..09b2011e58
Binary files /dev/null and b/interface/resources/qml/hifi/commerce/wallet/images/lockOverlay.png differ
diff --git a/interface/resources/qml/hifi/commerce/wallet/images/lowerKeyboard.png b/interface/resources/qml/hifi/commerce/wallet/images/lowerKeyboard.png
new file mode 100644
index 0000000000..9fc88262db
Binary files /dev/null and b/interface/resources/qml/hifi/commerce/wallet/images/lowerKeyboard.png differ
diff --git a/interface/src/ui/overlays/ContextOverlayInterface.cpp b/interface/src/ui/overlays/ContextOverlayInterface.cpp
index 46fb2df007..6704e81706 100644
--- a/interface/src/ui/overlays/ContextOverlayInterface.cpp
+++ b/interface/src/ui/overlays/ContextOverlayInterface.cpp
@@ -13,6 +13,7 @@
#include "Application.h"
#include
+#include
static const float CONTEXT_OVERLAY_TABLET_OFFSET = 30.0f; // Degrees
static const float CONTEXT_OVERLAY_TABLET_ORIENTATION = 210.0f; // Degrees
@@ -242,7 +243,7 @@ void ContextOverlayInterface::contextOverlays_hoverLeaveEntity(const EntityItemI
}
}
-static const QString MARKETPLACE_BASE_URL = "https://metaverse.highfidelity.com/marketplace/items/";
+static const QString MARKETPLACE_BASE_URL = NetworkingConstants::METAVERSE_SERVER_URL.toString() + "/marketplace/items/";
void ContextOverlayInterface::openMarketplace() {
// lets open the tablet and go to the current item in
diff --git a/scripts/system/commerce/wallet.js b/scripts/system/commerce/wallet.js
index 7f24e7f634..2068768de9 100644
--- a/scripts/system/commerce/wallet.js
+++ b/scripts/system/commerce/wallet.js
@@ -53,6 +53,7 @@
// Description:
// -Called when a message is received from SpectatorCamera.qml. The "message" argument is what is sent from the QML
// in the format "{method, params}", like json-rpc. See also sendToQml().
+ var isHmdPreviewDisabled = true;
function fromQml(message) {
switch (message.method) {
case 'walletSetup_cancelClicked':
@@ -61,6 +62,13 @@
case 'walletSetup_loginClicked':
openLoginWindow();
break;
+ case 'disableHmdPreview':
+ isHmdPreviewDisabled = Menu.isOptionChecked("Disable Preview");
+ Menu.setIsOptionChecked("Disable Preview", true);
+ break;
+ case 'maybeEnableHmdPreview':
+ Menu.setIsOptionChecked("Disable Preview", isHmdPreviewDisabled);
+ break;
default:
print('Unrecognized message from QML:', JSON.stringify(message));
}
diff --git a/scripts/system/html/js/marketplacesInject.js b/scripts/system/html/js/marketplacesInject.js
index 62a4dcf369..2675bb97b6 100644
--- a/scripts/system/html/js/marketplacesInject.js
+++ b/scripts/system/html/js/marketplacesInject.js
@@ -127,9 +127,15 @@
$(this).attr('data-href', $(this).attr('href'));
$(this).attr('href', '#');
cost = $(this).closest('.col-xs-3').find('.item-cost').text();
+
+ $(this).closest('.col-xs-3').prev().attr("class", 'col-xs-6');
+ $(this).closest('.col-xs-3').attr("class", 'col-xs-6');
if (parseInt(cost) > 0) {
- $(this).find('.price').text("BUY");
+ var priceElement = $(this).find('.price')
+ priceElement.css({ "width": "auto", "padding": "3px 5px", "height": "26px" });
+ priceElement.text(parseFloat(cost / 100).toFixed(2) + ' HFC');
+ priceElement.css({ "min-width": priceElement.width() + 10 });
}
});
@@ -160,7 +166,7 @@
// Try this here in case it works (it will if the user just pressed the "back" button,
// since that doesn't trigger another AJAX request.
- injectBuyButtonOnMainPage;
+ injectBuyButtonOnMainPage();
addPurchasesButton();
}
}
@@ -172,8 +178,8 @@
var cost = $('.item-cost').text();
- if (parseInt(cost) > 0) {
- $('#side-info').find('.btn').html('Buy Item ');
+ if (parseInt(cost) > 0 && $('#side-info').find('#buyItemButton').size() === 0) {
+ $('#side-info').find('.btn').html('Own Item: ' + (parseFloat(cost / 100).toFixed(2)) + ' HFC');
}
$('#side-info').find('.btn').on('click', function () {
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));
}