From 00e10ad684f5823e571c16e9e5e4f536877341ff Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Thu, 6 Sep 2018 14:05:51 -0700 Subject: [PATCH 01/10] Updating sign up text, moving forgotten info links --- .../resources/qml/LoginDialog/LinkAccountBody.qml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 423f6cc73b..783027761a 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -128,9 +128,8 @@ Item { ShortcutText { z: 10 anchors { - left: usernameField.right - top: usernameField.bottom - leftMargin: usernameField.textFieldLabel.contentWidth + 10 + right: usernameField.right + top: usernameField.top topMargin: -19 } @@ -157,9 +156,8 @@ Item { ShortcutText { z: 10 anchors { - left: passwordField.right - top: passwordField.bottom - leftMargin: passwordField.textFieldLabel.contentWidth + 10 + right: passwordField.right + top: passwordField.top topMargin: -19 } @@ -232,7 +230,7 @@ Item { RalewaySemiBold { size: hifi.fontSizes.inputLabel anchors.verticalCenter: parent.verticalCenter - text: qsTr("Don't have an account?") + text: qsTr("New to High Fidelity?") } Button { From aabfda6eb5a90072e7c2f84c8e032ed4f4322f9c Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Thu, 6 Sep 2018 14:16:42 -0700 Subject: [PATCH 02/10] Adding descriptive text --- .../qml/LoginDialog/LinkAccountBody.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 783027761a..60c7a26e89 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -87,6 +87,22 @@ Item { height: 48 } + ShortcutText { + id: flavorText + anchors { + top: parent.top + left: parent.left + margins: 0 + topMargin: hifi.dimensions.contentSpacing.y + } + + text: qsTr("Sign in to High Fidelity to make friends, get HFC, and buy interesting things on the Marketplace!") + wrapMode: Text.WordWrap + lineHeight: 1 + lineHeightMode: Text.ProportionalHeight + horizontalAlignment: Text.AlignHCenter + } + ShortcutText { id: mainTextContainer anchors { From 8e5f5cc7965a8a59eab894451ec2a54d5174a568 Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Thu, 6 Sep 2018 16:16:43 -0700 Subject: [PATCH 03/10] Moving forgotten links --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 60c7a26e89..d2a97874b1 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -145,7 +145,7 @@ Item { z: 10 anchors { right: usernameField.right - top: usernameField.top + top: usernameField.bottom topMargin: -19 } @@ -173,7 +173,7 @@ Item { z: 10 anchors { right: passwordField.right - top: passwordField.top + top: passwordField.bottom topMargin: -19 } From 2443723a2bfc324d69e5270e062e699a299c4177 Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Thu, 6 Sep 2018 21:14:04 -0700 Subject: [PATCH 04/10] Removing margins, adding width attribute --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index d2a97874b1..707c173382 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -97,6 +97,7 @@ Item { } text: qsTr("Sign in to High Fidelity to make friends, get HFC, and buy interesting things on the Marketplace!") + width: parent.width wrapMode: Text.WordWrap lineHeight: 1 lineHeightMode: Text.ProportionalHeight @@ -146,7 +147,6 @@ Item { anchors { right: usernameField.right top: usernameField.bottom - topMargin: -19 } text: "Forgot Username?" @@ -174,7 +174,6 @@ Item { anchors { right: passwordField.right top: passwordField.bottom - topMargin: -19 } text: "Forgot Password?" From 92f218ae29a24edb8ef7a56a62e83a7201998474 Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Thu, 6 Sep 2018 22:59:19 -0700 Subject: [PATCH 05/10] Adding margins to forgotten link text --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 707c173382..90437c008e 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -147,6 +147,7 @@ Item { anchors { right: usernameField.right top: usernameField.bottom + topMargin: 2 } text: "Forgot Username?" @@ -174,6 +175,7 @@ Item { anchors { right: passwordField.right top: passwordField.bottom + topMargin: 2 } text: "Forgot Password?" From 190a335c7118be684db1e86369759207e16cc29a Mon Sep 17 00:00:00 2001 From: Alexia Mandeville Date: Fri, 7 Sep 2018 00:01:00 -0700 Subject: [PATCH 06/10] Adding more margin to forgotten links --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 90437c008e..28523617b6 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -147,7 +147,7 @@ Item { anchors { right: usernameField.right top: usernameField.bottom - topMargin: 2 + topMargin: 4 } text: "Forgot Username?" @@ -175,7 +175,7 @@ Item { anchors { right: passwordField.right top: passwordField.bottom - topMargin: 2 + topMargin: 4 } text: "Forgot Password?" From d9495275cc8ff0dc701486349ecfe1c82cd75b11 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 7 Sep 2018 11:22:31 -0700 Subject: [PATCH 07/10] adding cancel button and signed in checkbox --- interface/resources/qml/LoginDialog.qml | 1 + .../qml/LoginDialog/LinkAccountBody.qml | 23 ++++++++++++++----- .../resources/qml/windows/ModalFrame.qml | 18 +++++++++++++++ .../resources/qml/windows/ModalWindow.qml | 1 + 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/interface/resources/qml/LoginDialog.qml b/interface/resources/qml/LoginDialog.qml index e21e8b7354..336858502d 100644 --- a/interface/resources/qml/LoginDialog.qml +++ b/interface/resources/qml/LoginDialog.qml @@ -23,6 +23,7 @@ ModalWindow { objectName: "LoginDialog" implicitWidth: 520 implicitHeight: 320 + closeButtonVisible: true destroyOnCloseButton: true destroyOnHidden: true visible: true diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 2274d88e04..4c9fe6ae94 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -234,6 +234,23 @@ Item { onHeightChanged: d.resize(); onWidthChanged: d.resize(); anchors.horizontalCenter: parent.horizontalCenter + CheckBox { + id: autoLogoutCheckbox; + checked: Settings.getValue("wallet/autoLogout", true); + text: "Keep me signed in" + boxSize: 20; + labelFontSize: 15; + color: hifi.colors.black; + onCheckedChanged: { + Settings.setValue("wallet/autoLogout", !checked); + if (checked) { + Settings.setValue("wallet/savedUsername", ""); + } else { + Settings.setValue("wallet/savedUsername", Account.username); + } + } + } + Button { id: linkAccountButton anchors.verticalCenter: parent.verticalCenter @@ -244,12 +261,6 @@ Item { onClicked: linkAccountBody.login() } - - Button { - anchors.verticalCenter: parent.verticalCenter - text: qsTr("Cancel") - onClicked: root.tryDestroy() - } } Row { diff --git a/interface/resources/qml/windows/ModalFrame.qml b/interface/resources/qml/windows/ModalFrame.qml index 211353b5f3..640069a0b3 100644 --- a/interface/resources/qml/windows/ModalFrame.qml +++ b/interface/resources/qml/windows/ModalFrame.qml @@ -94,5 +94,23 @@ Frame { color: hifi.colors.lightGray } } + + + GlyphButton { + id: closeButton + visible: window.closeButtonVisible + width: 30 + y: -hifi.dimensions.modalDialogTitleHeight + anchors { + top: parent.top + right: parent.right + topMargin: 10 + rightMargin: 10 + } + glyph: hifi.glyphs.close + onClicked: { + window.destroy(); + } + } } } diff --git a/interface/resources/qml/windows/ModalWindow.qml b/interface/resources/qml/windows/ModalWindow.qml index 2d56099051..75f5c2d646 100644 --- a/interface/resources/qml/windows/ModalWindow.qml +++ b/interface/resources/qml/windows/ModalWindow.qml @@ -19,6 +19,7 @@ ScrollingWindow { destroyOnHidden: true frame: ModalFrame { } + property bool closeButtonVisible: false property int colorScheme: hifi.colorSchemes.light property bool draggable: false From db96603cdabc35034aa393ed750952c854f618ce Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 7 Sep 2018 11:23:58 -0700 Subject: [PATCH 08/10] removing some unused properties --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 4c9fe6ae94..9bb40fd538 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -21,8 +21,6 @@ Item { height: root.pane.height width: root.pane.width property bool failAfterSignUp: false - property var locale: Qt.locale() - property string dateTimeString function login() { mainTextContainer.visible = false From 44d36ec622dd0fee044ebecac11d6c387d4721a6 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 7 Sep 2018 11:31:29 -0700 Subject: [PATCH 09/10] wallet should save username when checked --- interface/resources/qml/LoginDialog/LinkAccountBody.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index 9bb40fd538..ca81a6b870 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -242,9 +242,9 @@ Item { onCheckedChanged: { Settings.setValue("wallet/autoLogout", !checked); if (checked) { - Settings.setValue("wallet/savedUsername", ""); - } else { Settings.setValue("wallet/savedUsername", Account.username); + } else { + Settings.setValue("wallet/savedUsername", ""); } } } From 39041f294281f249386a63096faaff4195659924 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 7 Sep 2018 11:36:21 -0700 Subject: [PATCH 10/10] fixing username field --- .../resources/qml/LoginDialog/LinkAccountBody.qml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/interface/resources/qml/LoginDialog/LinkAccountBody.qml b/interface/resources/qml/LoginDialog/LinkAccountBody.qml index ca81a6b870..bc0b8fb2e0 100644 --- a/interface/resources/qml/LoginDialog/LinkAccountBody.qml +++ b/interface/resources/qml/LoginDialog/LinkAccountBody.qml @@ -242,9 +242,9 @@ Item { onCheckedChanged: { Settings.setValue("wallet/autoLogout", !checked); if (checked) { - Settings.setValue("wallet/savedUsername", Account.username); - } else { Settings.setValue("wallet/savedUsername", ""); + } else { + Settings.setValue("wallet/savedUsername", Account.username); } } } @@ -310,14 +310,6 @@ Item { } usernameField.forceActiveFocus(); - - var data = { - "date": new Date().toLocaleString(), - }; - print(new Date().toLocaleString()); - print(model.sessionId); - - //UserActivityLogger.logAction("login_screen_shown", ) } Connections {