update Add account question
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
c4a65dd861
commit
df142550fe
@ -126,14 +126,7 @@ void MSALoginDialog::authorizeWithBrowserWithExtra(QString url, QString code, in
|
|||||||
const auto linkString = QString("<a href=\"%1\">%2</a>").arg(url, url);
|
const auto linkString = QString("<a href=\"%1\">%2</a>").arg(url, url);
|
||||||
ui->code->setText(code);
|
ui->code->setText(code);
|
||||||
ui->codeInfo->setText(tr("<p>Enter this code into %1 and choose your account.</p>").arg(linkString));
|
ui->codeInfo->setText(tr("<p>Enter this code into %1 and choose your account.</p>").arg(linkString));
|
||||||
|
ui->qr->setVisible(url == "https://www.microsoft.com/link");
|
||||||
const auto isDefaultUrl = url == "https://www.microsoft.com/link";
|
|
||||||
|
|
||||||
ui->qr->setVisible(isDefaultUrl);
|
|
||||||
if (isDefaultUrl && !code.isEmpty()) {
|
|
||||||
url += QString("?otc=%1").arg(code);
|
|
||||||
}
|
|
||||||
DesktopServices::openUrl(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MSALoginDialog::onTaskStatus(QString status)
|
void MSALoginDialog::onTaskStatus(QString status)
|
||||||
|
@ -132,10 +132,10 @@ void AccountListPage::on_actionAddMicrosoft_triggered()
|
|||||||
{
|
{
|
||||||
QMessageBox box(this);
|
QMessageBox box(this);
|
||||||
box.setWindowTitle(tr("Add account"));
|
box.setWindowTitle(tr("Add account"));
|
||||||
box.setText(tr("How do you want to login?"));
|
box.setText(tr("Where would you like to login?"));
|
||||||
box.setIcon(QMessageBox::Question);
|
box.setIcon(QMessageBox::Question);
|
||||||
auto deviceCode = box.addButton(tr("Remote"), QMessageBox::ButtonRole::YesRole);
|
auto authCode = box.addButton(tr("On this device"), QMessageBox::ButtonRole::NoRole);
|
||||||
auto authCode = box.addButton(tr("Recommended"), QMessageBox::ButtonRole::NoRole);
|
auto deviceCode = box.addButton(tr("On another device"), QMessageBox::ButtonRole::YesRole);
|
||||||
auto cancel = box.addButton(tr("Cancel"), QMessageBox::ButtonRole::RejectRole);
|
auto cancel = box.addButton(tr("Cancel"), QMessageBox::ButtonRole::RejectRole);
|
||||||
box.setDefaultButton(authCode);
|
box.setDefaultButton(authCode);
|
||||||
box.exec();
|
box.exec();
|
||||||
|
Loading…
Reference in New Issue
Block a user