mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:24:00 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into light
This commit is contained in:
commit
987246afb8
6 changed files with 26 additions and 16 deletions
|
@ -12,9 +12,9 @@
|
|||
var MAX_WARNINGS = 3;
|
||||
var numWarnings = 0;
|
||||
var isWindowFocused = true;
|
||||
var isKeyboardRaised = false;
|
||||
var isNumericKeyboard = false;
|
||||
var isPasswordField = false;
|
||||
window.isKeyboardRaised = false;
|
||||
window.isNumericKeyboard = false;
|
||||
window.isPasswordField = false;
|
||||
|
||||
function shouldSetPasswordField() {
|
||||
var nodeType = document.activeElement.type;
|
||||
|
@ -62,7 +62,7 @@
|
|||
var passwordField = shouldSetPasswordField();
|
||||
|
||||
if (isWindowFocused &&
|
||||
(keyboardRaised !== isKeyboardRaised || numericKeyboard !== isNumericKeyboard || passwordField !== isPasswordField)) {
|
||||
(keyboardRaised !== window.isKeyboardRaised || numericKeyboard !== window.isNumericKeyboard || passwordField !== window.isPasswordField)) {
|
||||
|
||||
if (typeof EventBridge !== "undefined" && EventBridge !== null) {
|
||||
EventBridge.emitWebEvent(
|
||||
|
@ -75,20 +75,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (!isKeyboardRaised) {
|
||||
if (!window.isKeyboardRaised) {
|
||||
scheduleBringToView(250); // Allow time for keyboard to be raised in QML.
|
||||
// 2DO: should it be rather done from 'client area height changed' event?
|
||||
}
|
||||
|
||||
isKeyboardRaised = keyboardRaised;
|
||||
isNumericKeyboard = numericKeyboard;
|
||||
isPasswordField = passwordField;
|
||||
window.isKeyboardRaised = keyboardRaised;
|
||||
window.isNumericKeyboard = numericKeyboard;
|
||||
window.isPasswordField = passwordField;
|
||||
}
|
||||
}, POLL_FREQUENCY);
|
||||
|
||||
window.addEventListener("click", function () {
|
||||
var keyboardRaised = shouldRaiseKeyboard();
|
||||
if(keyboardRaised && isKeyboardRaised) {
|
||||
if (keyboardRaised && window.isKeyboardRaised) {
|
||||
scheduleBringToView(150);
|
||||
}
|
||||
});
|
||||
|
@ -99,7 +99,7 @@
|
|||
|
||||
window.addEventListener("blur", function () {
|
||||
isWindowFocused = false;
|
||||
isKeyboardRaised = false;
|
||||
isNumericKeyboard = false;
|
||||
window.isKeyboardRaised = false;
|
||||
window.isNumericKeyboard = false;
|
||||
});
|
||||
})();
|
||||
|
|
|
@ -47,6 +47,7 @@ Rectangle {
|
|||
} else if (walletStatus === 1) {
|
||||
if (root.activeView !== "walletSetup") {
|
||||
root.activeView = "walletSetup";
|
||||
commerce.resetLocalWalletOnly();
|
||||
}
|
||||
} else if (walletStatus === 2) {
|
||||
if (root.activeView !== "passphraseModal") {
|
||||
|
|
|
@ -371,7 +371,7 @@ Item {
|
|||
|
||||
Item {
|
||||
id: securityImageTip;
|
||||
visible: false;
|
||||
visible: !root.hasShownSecurityImageTip && root.activeView === "step_3";
|
||||
z: 999;
|
||||
anchors.fill: root;
|
||||
|
||||
|
@ -421,7 +421,6 @@ Item {
|
|||
text: "Got It";
|
||||
onClicked: {
|
||||
root.hasShownSecurityImageTip = true;
|
||||
securityImageTip.visible = false;
|
||||
passphraseSelection.focusFirstTextField();
|
||||
}
|
||||
}
|
||||
|
@ -439,9 +438,6 @@ Item {
|
|||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
commerce.getWalletAuthenticatedStatus();
|
||||
if (!root.hasShownSecurityImageTip) {
|
||||
securityImageTip.visible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -732,6 +728,7 @@ Item {
|
|||
text: "Finish";
|
||||
onClicked: {
|
||||
root.visible = false;
|
||||
root.hasShownSecurityImageTip = false;
|
||||
sendSignalToWallet({method: 'walletSetup_finished', referrer: root.referrer ? root.referrer : ""});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,6 +128,11 @@ void QmlCommerce::reset() {
|
|||
wallet->reset();
|
||||
}
|
||||
|
||||
void QmlCommerce::resetLocalWalletOnly() {
|
||||
auto wallet = DependencyManager::get<Wallet>();
|
||||
wallet->reset();
|
||||
}
|
||||
|
||||
void QmlCommerce::account() {
|
||||
auto ledger = DependencyManager::get<Ledger>();
|
||||
ledger->account();
|
||||
|
|
|
@ -65,6 +65,7 @@ protected:
|
|||
Q_INVOKABLE void history();
|
||||
Q_INVOKABLE void generateKeyPair();
|
||||
Q_INVOKABLE void reset();
|
||||
Q_INVOKABLE void resetLocalWalletOnly();
|
||||
Q_INVOKABLE void account();
|
||||
|
||||
Q_INVOKABLE void certificateInfo(const QString& certificateId);
|
||||
|
|
|
@ -15,6 +15,9 @@ function setUpKeyboardControl() {
|
|||
var KEYBOARD_HEIGHT = 200;
|
||||
|
||||
function raiseKeyboard() {
|
||||
window.isKeyboardRaised = true;
|
||||
window.isNumericKeyboard = this.type === "number";
|
||||
|
||||
if (lowerTimer !== null) {
|
||||
clearTimeout(lowerTimer);
|
||||
lowerTimer = null;
|
||||
|
@ -35,6 +38,9 @@ function setUpKeyboardControl() {
|
|||
}
|
||||
|
||||
function doLowerKeyboard() {
|
||||
window.isKeyboardRaised = false;
|
||||
window.isNumericKeyboard = false;
|
||||
|
||||
EventBridge.emitWebEvent("_LOWER_KEYBOARD");
|
||||
lowerTimer = null;
|
||||
isRaised = false;
|
||||
|
|
Loading…
Reference in a new issue