From 4f0e23ed69aecaa4fc32c504cf09c94ab97caaa1 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Thu, 6 Dec 2018 11:26:33 -0800 Subject: [PATCH] changing link steam flow/height of error message --- interface/resources/qml/LoginDialog/CompleteProfileBody.qml | 4 ++-- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 2 +- interface/resources/qml/LoginDialog/LoggingInBody.qml | 5 ++++- .../resources/qml/LoginDialog/UsernameCollisionBody.qml | 3 +-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/interface/resources/qml/LoginDialog/CompleteProfileBody.qml b/interface/resources/qml/LoginDialog/CompleteProfileBody.qml index fd68aa41ce..ad54edaa3f 100644 --- a/interface/resources/qml/LoginDialog/CompleteProfileBody.qml +++ b/interface/resources/qml/LoginDialog/CompleteProfileBody.qml @@ -92,7 +92,7 @@ Item { loginErrorMessage.wrapMode = Text.WordWrap; loginErrorMessage.verticalAlignment = Text.AlignLeft; loginErrorMessage.horizontalAlignment = Text.AlignLeft; - errorContainer.height = 2 * loginErrorMessageTextMetrics.height; + errorContainer.height = 3 * loginErrorMessageTextMetrics.height; } } } @@ -169,7 +169,7 @@ Item { onLinkActivated: { loginDialog.isLogIn = true; - bodyLoader.setSource("LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "errorString": "", "linkSteam": true }); + bodyLoader.setSource("LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "errorString": "", "withSteam": true, "linkSteam": true }); } } diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 58ad807897..f97954335b 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -64,7 +64,7 @@ Item { function login() { loginDialog.login(emailField.text, passwordField.text); - bodyLoader.setSource("LoggingInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": false, "withOculus": false, "linkSteam": linkAccountBody.linkSteam }); + bodyLoader.setSource("LoggingInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": linkAccountBody.withSteam, "withOculus": linkAccountBody.withOculus, "linkSteam": linkAccountBody.linkSteam }); } function init() { diff --git a/interface/resources/qml/LoginDialog/LoggingInBody.qml b/interface/resources/qml/LoginDialog/LoggingInBody.qml index 71a06a3141..9841e0eccd 100644 --- a/interface/resources/qml/LoginDialog/LoggingInBody.qml +++ b/interface/resources/qml/LoginDialog/LoggingInBody.qml @@ -241,7 +241,10 @@ Item { console.log("Login Failed") loggingInSpinner.visible = false; var errorString = ""; - if (loggingInBody.withSteam) { + if (loggingInBody.linkSteam && loggingInBody.withSteam) { + errorString = "Username or password is incorrect."; + bodyLoader.setSource("LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": loggingInBody.withSteam, "linkSteam": loggingInBody.linkSteam, "errorString": errorString }); + } else if (loggingInBody.withSteam) { loggingInGlyph.visible = false; errorString = "Your Steam authentication has failed. Please make sure you are logged into Steam and try again."; bodyLoader.setSource("CompleteProfileBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": loggingInBody.withSteam, "errorString": errorString }); diff --git a/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml b/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml index 7552e94862..34d82d4249 100644 --- a/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml +++ b/interface/resources/qml/LoginDialog/UsernameCollisionBody.qml @@ -55,8 +55,7 @@ Item { hifi.dimensions.contentSpacing.y + buttons.height; parent.width = root.width = Math.max(d.minWidth, Math.min(d.maxWidth, targetWidth)) - parent.height = root.height = Math.max(Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight)), mainContainer.height + - (keyboardEnabled && keyboardRaised ? (200 + 2 * hifi.dimensions.contentSpacing.y) : hifi.dimensions.contentSpacing.y)); + parent.height = root.height = Math.max(Math.max(d.minHeight, Math.min(d.maxHeight, targetHeight)), mainContainer.height + hifi.dimensions.contentSpacing.y)); } }