finish login dialog
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
125fb2eaf2
commit
80ea67f7cf
@ -60,8 +60,6 @@ MSALoginDialog::MSALoginDialog(QWidget* parent) : QDialog(parent), ui(new Ui::MS
|
|||||||
font.setFixedPitch(true);
|
font.setFixedPitch(true);
|
||||||
ui->code->setFont(font);
|
ui->code->setFont(font);
|
||||||
|
|
||||||
// ui->buttonBox->button(QDialogButtonBox::Help)->setDefault(false);
|
|
||||||
|
|
||||||
connect(ui->copyCode, &QPushButton::clicked, this, [this] { QApplication::clipboard()->setText(ui->code->text()); });
|
connect(ui->copyCode, &QPushButton::clicked, this, [this] { QApplication::clipboard()->setText(ui->code->text()); });
|
||||||
ui->qr->setPixmap(QIcon((":/documents/login-qr.svg")).pixmap(QSize(75, 75)));
|
ui->qr->setPixmap(QIcon((":/documents/login-qr.svg")).pixmap(QSize(75, 75)));
|
||||||
ui->title->setText(tr("Login to %1").arg(BuildConfig.LAUNCHER_DISPLAYNAME));
|
ui->title->setText(tr("Login to %1").arg(BuildConfig.LAUNCHER_DISPLAYNAME));
|
||||||
@ -129,16 +127,7 @@ void MSALoginDialog::onTaskFailed(QString reason)
|
|||||||
void MSALoginDialog::authorizeWithBrowser(const QUrl& url)
|
void MSALoginDialog::authorizeWithBrowser(const QUrl& url)
|
||||||
{
|
{
|
||||||
ui->stackedWidget->setCurrentIndex(1);
|
ui->stackedWidget->setCurrentIndex(1);
|
||||||
// DesktopServices::openUrl(url);
|
|
||||||
const auto uri = url.toString();
|
|
||||||
const auto linkString = QString("<a href=\"%1\">%2</a>").arg(uri, uri);
|
|
||||||
m_url = url;
|
m_url = url;
|
||||||
ui->link->setText(linkString);
|
|
||||||
// ui->urlInfo->setText(
|
|
||||||
// tr("Browser opened to complete the login process."
|
|
||||||
// "<br /><br />"
|
|
||||||
// "If your browser hasn't opened, please manually open the following link and choose your account:</p>"));
|
|
||||||
// ui->url->setText(linkString);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MSALoginDialog::authorizeWithBrowserWithExtra(QString url, QString code, int expiresIn)
|
void MSALoginDialog::authorizeWithBrowserWithExtra(QString url, QString code, int expiresIn)
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>772</width>
|
<width>770</width>
|
||||||
<height>326</height>
|
<height>256</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -121,19 +121,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="link">
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
<item>
|
<item>
|
||||||
|
Loading…
Reference in New Issue
Block a user