From 055deb4115d5b7790705bf7439db85d00624e34a Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Fri, 23 Sep 2022 20:05:28 +0200 Subject: [PATCH] Add back button to SSO login --- imports/NeoChat/Component/Login/Sso.qml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/imports/NeoChat/Component/Login/Sso.qml b/imports/NeoChat/Component/Login/Sso.qml index 82dfe293d..46a0128b2 100644 --- a/imports/NeoChat/Component/Login/Sso.qml +++ b/imports/NeoChat/Component/Login/Sso.qml @@ -26,15 +26,23 @@ LoginStep { processed("qrc:/imports/NeoChat/Component/Login/Loading.qml") } } + RowLayout { + QQC2.Button { + text: i18nc("@action:button", "Back") - QQC2.Button { - text: i18n("Login") - onClicked: { - LoginHelper.loginWithSso() - root.showMessage(i18n("Complete the authentication steps in your browser")) + onClicked: { + module.source = "qrc:/imports/NeoChat/Component/Login/Login.qml" + } + } + QQC2.Button { + text: i18n("Login") + onClicked: { + LoginHelper.loginWithSso() + root.showMessage(i18n("Complete the authentication steps in your browser")) + } + Component.onCompleted: forceActiveFocus() + Keys.onReturnPressed: clicked() } - Component.onCompleted: forceActiveFocus() - Keys.onReturnPressed: clicked() } } }