From 4807b5af7b49b722807a730e83714c21dd985484 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 18 Sep 2018 09:57:26 -0700 Subject: [PATCH 1/5] fixing display of user/pw incorrect --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 57293cb5e3..a6f962a677 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -43,7 +43,7 @@ Item { function resize() { var targetWidth = Math.max(titleWidth, form.contentWidth); - var targetHeight = hifi.dimensions.contentSpacing.y + mainTextContainer.height + + var targetHeight = hifi.dimensions.contentSpacing.y + flavorText.height + mainTextContainer.height + 4 * hifi.dimensions.contentSpacing.y + form.height; if (additionalInformation.visible) { @@ -106,14 +106,15 @@ Item { ShortcutText { id: mainTextContainer anchors { - top: parent.top + top: flavorText.bottom left: parent.left margins: 0 - topMargin: hifi.dimensions.contentSpacing.y + topMargin: 1.5 * hifi.dimensions.contentSpacing.y } visible: false text: qsTr("Username or password incorrect.") + height: flavorText.height - 20 wrapMode: Text.WordWrap color: hifi.colors.redAccent lineHeight: 1 @@ -128,7 +129,7 @@ Item { anchors { top: mainTextContainer.bottom - topMargin: 2 * hifi.dimensions.contentSpacing.y + topMargin: 1.5 * hifi.dimensions.contentSpacing.y } spacing: 2 * hifi.dimensions.contentSpacing.y From 43fe98a5111c4acc6a538221430d692de405e161 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Tue, 18 Sep 2018 15:29:28 -0700 Subject: [PATCH 2/5] reversion --- libraries/networking/src/DomainHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/networking/src/DomainHandler.cpp b/libraries/networking/src/DomainHandler.cpp index 8af88f2c40..f34a93de96 100644 --- a/libraries/networking/src/DomainHandler.cpp +++ b/libraries/networking/src/DomainHandler.cpp @@ -343,6 +343,7 @@ void DomainHandler::loadedErrorDomain(std::map namedPaths) { void DomainHandler::setRedirectErrorState(QUrl errorUrl, int reasonCode) { _errorDomainURL = errorUrl; _lastDomainConnectionError = reasonCode; + _isInErrorState = true; emit redirectToErrorDomainURL(_errorDomainURL); } From 8770c363dfe659f74e95a9c6ab944e2406629939 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Wed, 19 Sep 2018 17:02:05 -0700 Subject: [PATCH 3/5] change button text to have a space --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index a6f962a677..0f1c879182 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -285,7 +285,7 @@ Item { anchors.verticalCenter: parent.verticalCenter width: 200 - text: qsTr(loginDialog.isSteamRunning() ? "Link Account" : "Login") + text: qsTr(loginDialog.isSteamRunning() ? "Link Account" : "Log in") color: hifi.buttons.blue onClicked: linkAccountBody.login() From 3907eaf68f42c90ed733cf31ec284ac65eeb4caf Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 20 Sep 2018 14:40:19 -0700 Subject: [PATCH 4/5] changing `show password` image --- .../qml/LoginDialog/LinkAccountBody.qml | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 0f1c879182..dfd6cd2107 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -173,7 +173,7 @@ Item { width: parent.width placeholderText: "Password" activeFocusOnPress: true - echoMode: TextInput.Password + echoMode: passwordFieldMouseArea.showPassword ? TextInput.Normal : TextInput.Password onHeightChanged: d.resize(); onWidthChanged: d.resize(); ShortcutText { @@ -213,29 +213,28 @@ Item { Image { id: showPasswordImage - y: (passwordField.height - (passwordField.height * 16 / 23)) / 2 - width: passwordField.width - (passwordField.width - (((passwordField.height) * 31/23))) + width: passwordField.height * 16 / 23 height: passwordField.height * 16 / 23 anchors { right: parent.right - rightMargin: 3 + rightMargin: 8 + top: parent.top + topMargin: passwordFieldMouseArea.showPassword ? 6 : 8 + bottom: parent.bottom + bottomMargin: passwordFieldMouseArea.showPassword ? 5 : 8 + } + source: passwordFieldMouseArea.showPassword ? "../../images/eyeClosed.svg" : "../../images/eyeOpen.svg" + MouseArea { + id: passwordFieldMouseArea + anchors.fill: parent + acceptedButtons: Qt.LeftButton + property bool showPassword: false + onClicked: { + showPassword = !showPassword; + } } - source: "../../images/eyeOpen.svg" } - MouseArea { - id: passwordFieldMouseArea - anchors.fill: parent - acceptedButtons: Qt.LeftButton - property bool showPassword: false - onClicked: { - showPassword = !showPassword; - passwordField.echoMode = showPassword ? TextInput.Normal : TextInput.Password; - showPasswordImage.source = showPassword ? "../../images/eyeClosed.svg" : "../../images/eyeOpen.svg"; - showPasswordImage.height = showPassword ? passwordField.height : passwordField.height * 16 / 23; - showPasswordImage.y = showPassword ? 0 : (passwordField.height - showPasswordImage.height) / 2; - } - } } Keys.onReturnPressed: linkAccountBody.login() From 3f9c8a266de81896b24bf5b5dec19d8d9d05db87 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 21 Sep 2018 14:36:13 -0700 Subject: [PATCH 5/5] reszing unameField/showing flavorText --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index dfd6cd2107..48cf124127 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -23,6 +23,7 @@ Item { property bool failAfterSignUp: false function login() { + flavorText.visible = false mainTextContainer.visible = false toggleLoading(true) loginDialog.login(usernameField.text, passwordField.text) @@ -140,6 +141,7 @@ Item { focus: true placeholderText: "Username or Email" activeFocusOnPress: true + onHeightChanged: d.resize(); onWidthChanged: d.resize(); ShortcutText { z: 10 @@ -336,6 +338,7 @@ Item { if (failAfterSignUp) { mainTextContainer.text = "Account created successfully." + flavorText.visible = true mainTextContainer.visible = true } @@ -374,6 +377,7 @@ Item { UserActivityLogger.logAction("encourageLoginDialog", data); Settings.setValue("loginDialogPoppedUp", false); } + flavorText.visible = true mainTextContainer.visible = true toggleLoading(false) }