mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Flow2: Bring account setup wizard to top (raise) on auth result
Show and raise the wizard on success / error in the Login Flow v2 auth. Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
parent
ccd20f0172
commit
3a160a4dce
4 changed files with 16 additions and 2 deletions
|
@ -407,7 +407,8 @@ void OwncloudSetupWizard::slotAuthError()
|
||||||
errorMsg = tr("There was an invalid response to an authenticated webdav request");
|
errorMsg = tr("There was an invalid response to an authenticated webdav request");
|
||||||
}
|
}
|
||||||
|
|
||||||
_ocWizard->show();
|
// bring wizard to top
|
||||||
|
_ocWizard->bringToTop();
|
||||||
if (_ocWizard->currentId() == WizardCommon::Page_ShibbolethCreds || _ocWizard->currentId() == WizardCommon::Page_OAuthCreds || _ocWizard->currentId() == WizardCommon::Page_Flow2AuthCreds) {
|
if (_ocWizard->currentId() == WizardCommon::Page_ShibbolethCreds || _ocWizard->currentId() == WizardCommon::Page_OAuthCreds || _ocWizard->currentId() == WizardCommon::Page_Flow2AuthCreds) {
|
||||||
_ocWizard->back();
|
_ocWizard->back();
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,11 @@ int Flow2AuthCredsPage::nextId() const
|
||||||
|
|
||||||
void Flow2AuthCredsPage::setConnected()
|
void Flow2AuthCredsPage::setConnected()
|
||||||
{
|
{
|
||||||
wizard()->show();
|
OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
|
||||||
|
Q_ASSERT(ocWizard);
|
||||||
|
|
||||||
|
// bring wizard to top
|
||||||
|
ocWizard->bringToTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractCredentials *Flow2AuthCredsPage::getCredentials() const
|
AbstractCredentials *Flow2AuthCredsPage::getCredentials() const
|
||||||
|
|
|
@ -307,4 +307,11 @@ void OwncloudWizard::customizeStyle()
|
||||||
// HINT: Customize wizard's own style here, if necessary in the future (Dark-/Light-Mode switching)
|
// HINT: Customize wizard's own style here, if necessary in the future (Dark-/Light-Mode switching)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OwncloudWizard::bringToTop()
|
||||||
|
{
|
||||||
|
// bring wizard to top
|
||||||
|
show();
|
||||||
|
raise();
|
||||||
|
}
|
||||||
|
|
||||||
} // end namespace
|
} // end namespace
|
||||||
|
|
|
@ -74,6 +74,8 @@ public:
|
||||||
void displayError(const QString &, bool retryHTTPonly);
|
void displayError(const QString &, bool retryHTTPonly);
|
||||||
AbstractCredentials *getCredentials() const;
|
AbstractCredentials *getCredentials() const;
|
||||||
|
|
||||||
|
void bringToTop();
|
||||||
|
|
||||||
// FIXME: Can those be local variables?
|
// FIXME: Can those be local variables?
|
||||||
// Set from the OwncloudSetupPage, later used from OwncloudHttpCredsPage
|
// Set from the OwncloudSetupPage, later used from OwncloudHttpCredsPage
|
||||||
QSslKey _clientSslKey;
|
QSslKey _clientSslKey;
|
||||||
|
|
Loading…
Reference in a new issue