mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 00:10:52 +02:00
Bugfixes
This commit is contained in:
parent
b81a8a95ea
commit
8d0d9a159f
4 changed files with 80 additions and 61 deletions
|
@ -105,7 +105,7 @@ Item {
|
|||
ListElement {
|
||||
isExpanded: false;
|
||||
question: "What is a 'Security Pic'?"
|
||||
answer: qsTr("Your Security Pic is an encrypted image that you selected during Wallet Setup. <b>It acts as an extra layer of Wallet security.</b><br><br>When you see your Security Pic, you know that your actions and data are securely making use of your private keys.<br><br><b>If you don't see your Security Pic on a page that is asking you for your Wallet passphrase, someone untrustworthy may be trying to gain access to your Wallet.</b><br><br>The Pic is stored on your hard drive inside the same file as your private keys.");
|
||||
answer: qsTr("Your Security Pic is an encrypted image that you selected during Wallet Setup. <b>It acts as an extra layer of Wallet security.</b><br><br>When you see your Security Pic, you know that your actions and data are securely making use of your private keys.<br><br><b>If you don't see your Security Pic on a page that is asking you for your Wallet passphrase, someone untrustworthy may be trying to gain access to your Wallet.</b><br><br>The encrypted Pic is stored on your hard drive inside the same file as your private keys.");
|
||||
}
|
||||
ListElement {
|
||||
isExpanded: false;
|
||||
|
|
|
@ -338,6 +338,11 @@ Wallet::Wallet() {
|
|||
walletScriptingInterface->setWalletStatus(status);
|
||||
emit walletStatusResult(status);
|
||||
});
|
||||
|
||||
auto accountManager = DependencyManager::get<AccountManager>();
|
||||
connect(accountManager.data(), &AccountManager::usernameChanged, this, [&]() {
|
||||
getWalletStatus();
|
||||
});
|
||||
}
|
||||
|
||||
Wallet::~Wallet() {
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
var xmlHttpRequest = null;
|
||||
var isPreparing = false; // Explicitly track download request status.
|
||||
|
||||
var confirmAllPurchases = false; // Set this to "true" to cause Checkout.qml to popup for all items, even if free
|
||||
var commerceMode = false;
|
||||
var userIsLoggedIn = false;
|
||||
var walletNeedsSetup = false;
|
||||
|
||||
|
@ -99,7 +99,9 @@
|
|||
}
|
||||
|
||||
function maybeAddSetupWalletButton() {
|
||||
if (userIsLoggedIn && walletNeedsSetup) {
|
||||
if (!$('body').hasClass("walletsetup-injected") && userIsLoggedIn && walletNeedsSetup) {
|
||||
$('body').addClass("walletsetup-injected");
|
||||
|
||||
var resultsElement = document.getElementById('results');
|
||||
var setupWalletElement = document.createElement('div');
|
||||
setupWalletElement.classList.add("row");
|
||||
|
@ -135,7 +137,8 @@
|
|||
}
|
||||
|
||||
function maybeAddLogInButton() {
|
||||
if (!userIsLoggedIn) {
|
||||
if (!$('body').hasClass("login-injected") && !userIsLoggedIn) {
|
||||
$('body').addClass("login-injected");
|
||||
var resultsElement = document.getElementById('results');
|
||||
var logInElement = document.createElement('div');
|
||||
logInElement.classList.add("row");
|
||||
|
@ -300,12 +303,13 @@
|
|||
}
|
||||
|
||||
function injectHiFiCode() {
|
||||
if (!$('body').hasClass("code-injected") && confirmAllPurchases) {
|
||||
|
||||
$('body').addClass("code-injected");
|
||||
|
||||
if (commerceMode) {
|
||||
maybeAddLogInButton();
|
||||
maybeAddSetupWalletButton();
|
||||
|
||||
if (!$('body').hasClass("code-injected")) {
|
||||
|
||||
$('body').addClass("code-injected");
|
||||
changeDropdownMenu();
|
||||
|
||||
var target = document.getElementById('templated-items');
|
||||
|
@ -327,13 +331,15 @@
|
|||
maybeAddPurchasesButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function injectHiFiItemPageCode() {
|
||||
if (!$('body').hasClass("code-injected") && confirmAllPurchases) {
|
||||
if (commerceMode) {
|
||||
maybeAddLogInButton();
|
||||
|
||||
if (!$('body').hasClass("code-injected")) {
|
||||
|
||||
$('body').addClass("code-injected");
|
||||
|
||||
maybeAddLogInButton();
|
||||
changeDropdownMenu();
|
||||
|
||||
var purchaseButton = $('#side-info').find('.btn').first();
|
||||
|
@ -364,6 +370,7 @@
|
|||
maybeAddPurchasesButton();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateClaraCode() {
|
||||
// Have to repeatedly update Clara page because its content can change dynamically without location.href changing.
|
||||
|
@ -622,7 +629,7 @@
|
|||
|
||||
if (parsedJsonMessage.type === "marketplaces") {
|
||||
if (parsedJsonMessage.action === "commerceSetting") {
|
||||
confirmAllPurchases = !!parsedJsonMessage.data.commerceMode;
|
||||
commerceMode = !!parsedJsonMessage.data.commerceMode;
|
||||
userIsLoggedIn = !!parsedJsonMessage.data.userIsLoggedIn;
|
||||
walletNeedsSetup = !!parsedJsonMessage.data.walletNeedsSetup;
|
||||
injectCode();
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
// for toolbar-mode: go back to home screen, this will close the window.
|
||||
tablet.gotoHomeScreen();
|
||||
} else {
|
||||
Wallet.refreshWalletStatus();
|
||||
var entity = HMD.tabletID;
|
||||
Entities.editEntity(entity, { textures: JSON.stringify({ "tex.close": HOME_BUTTON_TEXTURE }) });
|
||||
showMarketplace();
|
||||
|
@ -157,11 +158,24 @@
|
|||
}
|
||||
}
|
||||
|
||||
function sendCommerceSettings() {
|
||||
tablet.emitScriptEvent(JSON.stringify({
|
||||
type: "marketplaces",
|
||||
action: "commerceSetting",
|
||||
data: {
|
||||
commerceMode: Settings.getValue("commerce", false),
|
||||
userIsLoggedIn: Account.loggedIn,
|
||||
walletNeedsSetup: Wallet.walletStatus === 1
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
marketplaceButton.clicked.connect(onClick);
|
||||
tablet.screenChanged.connect(onScreenChanged);
|
||||
Entities.canWriteAssetsChanged.connect(onCanWriteAssetsChanged);
|
||||
ContextOverlay.contextOverlayClicked.connect(setCertificateInfo);
|
||||
GlobalServices.myUsernameChanged.connect(onUsernameChanged);
|
||||
Wallet.walletStatusChanged.connect(sendCommerceSettings);
|
||||
Wallet.refreshWalletStatus();
|
||||
|
||||
function onMessage(message) {
|
||||
|
@ -203,15 +217,7 @@
|
|||
canRezCertifiedItems: Entities.canRezCertified || Entities.canRezTmpCertified
|
||||
});
|
||||
} else if (parsedJsonMessage.type === "REQUEST_SETTING") {
|
||||
tablet.emitScriptEvent(JSON.stringify({
|
||||
type: "marketplaces",
|
||||
action: "commerceSetting",
|
||||
data: {
|
||||
commerceMode: Settings.getValue("commerce", false),
|
||||
userIsLoggedIn: Account.loggedIn,
|
||||
walletNeedsSetup: Wallet.walletStatus === 1
|
||||
}
|
||||
}));
|
||||
sendCommerceSettings();
|
||||
} else if (parsedJsonMessage.type === "PURCHASES") {
|
||||
referrerURL = parsedJsonMessage.referrerURL;
|
||||
filterText = "";
|
||||
|
@ -244,6 +250,7 @@
|
|||
tablet.webEventReceived.disconnect(onMessage);
|
||||
Entities.canWriteAssetsChanged.disconnect(onCanWriteAssetsChanged);
|
||||
GlobalServices.myUsernameChanged.disconnect(onUsernameChanged);
|
||||
Wallet.walletStatusChanged.disconnect(sendCommerceSettings);
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue