fix #LINQT-1493 do not display authentication popup in login page

This commit is contained in:
Gaelle Braud 2024-12-27 10:43:32 +01:00
parent 55f1d9c17e
commit 79aedce881

View file

@ -78,6 +78,9 @@ AbstractWindow {
function reauthenticateAccount(identity, domain, callback){ function reauthenticateAccount(identity, domain, callback){
if (authenticationPopupOpened) return if (authenticationPopupOpened) return
if (mainWindowStackView.currentItem.objectName === "loginPage"
|| mainWindowStackView.currentItem.objectName === "sipLoginPage")
return
console.log("Showing authentication dialog") console.log("Showing authentication dialog")
var popup = authenticationPopupComp.createObject(mainWindow, {"identity": identity, "domain": domain, "callback":callback}) // Callback ownership is not passed var popup = authenticationPopupComp.createObject(mainWindow, {"identity": identity, "domain": domain, "callback":callback}) // Callback ownership is not passed
popup.open() popup.open()
@ -132,6 +135,7 @@ AbstractWindow {
Component { Component {
id: loginPage id: loginPage
LoginPage { LoginPage {
objectName: "loginPage"
showBackButton: accountProxy?.haveAccount || false showBackButton: accountProxy?.haveAccount || false
onGoBack: openMainPage() onGoBack: openMainPage()
onUseSIPButtonClicked: mainWindowStackView.push(sipLoginPage) onUseSIPButtonClicked: mainWindowStackView.push(sipLoginPage)
@ -145,6 +149,7 @@ AbstractWindow {
Component { Component {
id: sipLoginPage id: sipLoginPage
SIPLoginPage { SIPLoginPage {
objectName: "sipLoginPage"
onGoBack: { onGoBack: {
if(SettingsCpp.assistantGoDirectlyToThirdPartySipAccountLogin){ if(SettingsCpp.assistantGoDirectlyToThirdPartySipAccountLogin){
openMainPage() openMainPage()