Fix seven bugs

This commit is contained in:
Zach Fox 2018-11-05 13:03:34 -08:00
parent a4d36b3845
commit 515ff016a4
6 changed files with 42 additions and 24 deletions

View file

@ -240,11 +240,6 @@ Rectangle {
lightboxPopup.button1method = function() { lightboxPopup.button1method = function() {
lightboxPopup.visible = false; lightboxPopup.visible = false;
} }
lightboxPopup.button2text = "GO TO WALLET";
lightboxPopup.button2method = function() {
lightboxPopup.visible = false;
sendToScript({method: 'checkout_openWallet'});
};
lightboxPopup.visible = true; lightboxPopup.visible = true;
} else { } else {
sendToScript(msg); sendToScript(msg);
@ -903,7 +898,7 @@ Rectangle {
horizontalAlignment: Text.AlignLeft; horizontalAlignment: Text.AlignLeft;
verticalAlignment: Text.AlignVCenter; verticalAlignment: Text.AlignVCenter;
onLinkActivated: { onLinkActivated: {
sendToScript({method: 'checkout_openWallet'}); sendToScript({method: 'checkout_openRecentActivity'});
} }
} }

View file

@ -62,7 +62,7 @@ Item {
isExpanded: false; isExpanded: false;
question: "How can I get HFC?"; question: "How can I get HFC?";
answer: "High Fidelity commerce is in open beta right now. Want more HFC? \ answer: "High Fidelity commerce is in open beta right now. Want more HFC? \
Get it by going to <br><br><b><font color='#0093C5'><a href='#bank'>BankOfHighFidelity.</a></font></b> and meeting with the banker!"; Get it by going to <b><font color='#0093C5'><a href='#bank'>BankOfHighFidelity</a></font></b> and meeting with the banker!";
} }
ListElement { ListElement {
isExpanded: false; isExpanded: false;

View file

@ -29,6 +29,7 @@ Rectangle {
id: root; id: root;
property string activeView: "initialize"; property string activeView: "initialize";
property string initialActiveViewAfterStatus5: "walletInventory";
property bool keyboardRaised: false; property bool keyboardRaised: false;
property bool isPassword: false; property bool isPassword: false;
@ -66,7 +67,7 @@ Rectangle {
} }
} else if (walletStatus === 5) { } else if (walletStatus === 5) {
if (root.activeView !== "walletSetup") { if (root.activeView !== "walletSetup") {
root.activeView = "walletInventory"; root.activeView = root.initialActiveViewAfterStatus5;
Commerce.getAvailableUpdates(); Commerce.getAvailableUpdates();
Commerce.getSecurityImage(); Commerce.getSecurityImage();
} }
@ -526,7 +527,7 @@ Rectangle {
id: exchangeMoneyMessagesWaitingLight; id: exchangeMoneyMessagesWaitingLight;
visible: parent.messagesWaiting; visible: parent.messagesWaiting;
anchors.right: exchangeMoneyTabIcon.left; anchors.right: exchangeMoneyTabIcon.left;
anchors.rightMargin: -4; anchors.rightMargin: 9;
anchors.top: exchangeMoneyTabIcon.top; anchors.top: exchangeMoneyTabIcon.top;
anchors.topMargin: 16; anchors.topMargin: 16;
height: 10; height: 10;
@ -682,15 +683,12 @@ Rectangle {
function resetTabButtonColors() { function resetTabButtonColors() {
walletHomeButtonContainer.color = hifi.colors.black; walletHomeButtonContainer.color = hifi.colors.black;
sendMoneyButtonContainer.color = hifi.colors.black; sendMoneyButtonContainer.color = hifi.colors.black;
securityButtonContainer.color = hifi.colors.black;
helpButtonContainer.color = hifi.colors.black; helpButtonContainer.color = hifi.colors.black;
exchangeMoneyButtonContainer.color = hifi.colors.black; exchangeMoneyButtonContainer.color = hifi.colors.black;
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") {
sendMoneyButtonContainer.color = hifi.colors.blueAccent; sendMoneyButtonContainer.color = hifi.colors.blueAccent;
} else if (root.activeView === "security") {
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") { } else if (root.activeView == "walletInventory") {
@ -760,10 +758,12 @@ Rectangle {
break; break;
case 'updateConnections': case 'updateConnections':
sendMoney.updateConnections(message.connections); sendMoney.updateConnections(message.connections);
walletInventory.fromScript(message);
break; break;
case 'selectRecipient': case 'selectRecipient':
case 'updateSelectedRecipientUsername': case 'updateSelectedRecipientUsername':
sendMoney.fromScript(message); sendMoney.fromScript(message);
walletInventory.fromScript(message);
break; break;
case 'http.response': case 'http.response':
http.handleHttpResponse(message); http.handleHttpResponse(message);
@ -779,15 +779,19 @@ Rectangle {
break; break;
case 'updatePurchases': case 'updatePurchases':
case 'purchases_showMyItems': case 'purchases_showMyItems':
case 'updateConnections':
case 'selectRecipient':
case 'updateSelectedRecipientUsername':
case 'updateWearables': case 'updateWearables':
walletInventory.fromScript(message); walletInventory.fromScript(message);
break; break;
case 'updateRecentActivityMessageLight': case 'updateRecentActivityMessageLight':
walletHomeButtonContainer.messagesWaiting = message.messagesWaiting; walletHomeButtonContainer.messagesWaiting = message.messagesWaiting;
break; break;
case 'checkout_openRecentActivity':
if (root.activeView === "initialize") {
root.initialActiveViewAfterStatus5 = "walletHome";
} else {
root.activeView = "walletHome";
}
break;
default: default:
console.log('Unrecognized message from wallet.js:', JSON.stringify(message)); console.log('Unrecognized message from wallet.js:', JSON.stringify(message));
} }

View file

@ -328,7 +328,7 @@ Rectangle {
HifiStylesUit.RalewayRegular { HifiStylesUit.RalewayRegular {
text: "Your wallet is not set up.\n" + text: "Your wallet is not set up.\n" +
"Open the WALLET app to get started."; "Open the ASSETS app to get started.";
// Anchors // Anchors
anchors.fill: parent; anchors.fill: parent;
// Text size // Text size

View file

@ -18,7 +18,7 @@ Script.include("/~/system/libraries/accountUtils.js");
Script.include("/~/system/libraries/connectionUtils.js"); Script.include("/~/system/libraries/connectionUtils.js");
var AppUi = Script.require('appUi'); var AppUi = Script.require('appUi');
var MARKETPLACE_URL = Account.metaverseServerURL + "/marketplace";; var MARKETPLACE_URL = Account.metaverseServerURL + "/marketplace";
// BEGIN AVATAR SELECTOR LOGIC // BEGIN AVATAR SELECTOR LOGIC
var UNSELECTED_COLOR = { red: 0x1F, green: 0xC6, blue: 0xA6 }; var UNSELECTED_COLOR = { red: 0x1F, green: 0xC6, blue: 0xA6 };
@ -607,13 +607,13 @@ function notificationPollCallbackHistory(historyArray) {
if (notificationCount > 0) { if (notificationCount > 0) {
var message; var message;
if (!ui.notificationInitialCallbackMade[1]) { if (!ui.notificationInitialCallbackMade[1]) {
message = "You have " + notificationCount + " unread wallet " + message = "You have " + notificationCount + " unread recent " +
"transaction" + (notificationCount === 1 ? "" : "s") + ". Open WALLET to see all activity."; "transaction" + (notificationCount === 1 ? "" : "s") + ". Open ASSETS to see all activity.";
ui.notificationDisplayBanner(message); ui.notificationDisplayBanner(message);
} else { } else {
for (var i = 0; i < notificationCount; i++) { for (var i = 0; i < notificationCount; i++) {
message = '"' + (historyArray[i].message) + '" ' + message = '"' + (historyArray[i].message) + '" ' +
"Open WALLET to see all activity."; "Open ASSETS to see all activity.";
ui.notificationDisplayBanner(message); ui.notificationDisplayBanner(message);
} }
} }

View file

@ -527,7 +527,13 @@ var onQmlMessageReceived = function onQmlMessageReceived(message) {
Window.location = "hifi://BankOfHighFidelity"; Window.location = "hifi://BankOfHighFidelity";
} }
break; break;
case 'checkout_openWallet': case 'checkout_openRecentActivity':
ui.open(MARKETPLACE_WALLET_QML_PATH);
wireQmlEventBridge(true);
ui.tablet.sendToQml({
method: 'checkout_openRecentActivity'
});
break;
case 'checkout_setUpClicked': case 'checkout_setUpClicked':
openWallet(); openWallet();
break; break;
@ -589,9 +595,6 @@ var onQmlMessageReceived = function onQmlMessageReceived(message) {
break; break;
case 'updateItemClicked': case 'updateItemClicked':
openMarketplace(message.upgradeUrl + "?edition=" + message.itemEdition); openMarketplace(message.upgradeUrl + "?edition=" + message.itemEdition);
break;
case 'giftAsset':
break; break;
case 'passphrasePopup_cancelClicked': case 'passphrasePopup_cancelClicked':
case 'needsLogIn_cancelClicked': case 'needsLogIn_cancelClicked':
@ -635,6 +638,20 @@ var onQmlMessageReceived = function onQmlMessageReceived(message) {
case 'http.request': case 'http.request':
// Handled elsewhere, don't log. // Handled elsewhere, don't log.
break; break;
// All of these are handled by wallet.js
case 'purchases_updateWearables':
case 'enable_ChooseRecipientNearbyMode':
case 'disable_ChooseRecipientNearbyMode':
case 'sendAsset_sendPublicly':
case 'refreshConnections':
case 'transactionHistory_goToBank':
case 'purchases_walletNotSetUp':
case 'purchases_openGoTo':
case 'purchases_itemInfoClicked':
case 'purchases_itemCertificateClicked':
case 'clearShouldShowDotHistory':
case 'giftAsset':
break;
default: default:
print('Unrecognized message from Checkout.qml: ' + JSON.stringify(message)); print('Unrecognized message from Checkout.qml: ' + JSON.stringify(message));
} }
@ -705,6 +722,8 @@ var onTabletScreenChanged = function onTabletScreenChanged(type, url) {
referrerURL: referrerURL, referrerURL: referrerURL,
filterText: filterText filterText: filterText
}); });
referrerURL = "";
filterText = "";
} }
ui.isOpen = (onMarketplaceScreen || onCommerceScreen) && !onWalletScreen; ui.isOpen = (onMarketplaceScreen || onCommerceScreen) && !onWalletScreen;