Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into feature/java-downloader
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@@ -130,20 +130,7 @@ void AccountListPage::listChanged()
|
||||
|
||||
void AccountListPage::on_actionAddMicrosoft_triggered()
|
||||
{
|
||||
QMessageBox box(this);
|
||||
box.setWindowTitle(tr("Add account"));
|
||||
box.setText(tr("How do you want to login?"));
|
||||
box.setIcon(QMessageBox::Question);
|
||||
auto deviceCode = box.addButton(tr("Legacy"), QMessageBox::ButtonRole::YesRole);
|
||||
auto authCode = box.addButton(tr("Recommended"), QMessageBox::ButtonRole::NoRole);
|
||||
auto cancel = box.addButton(tr("Cancel"), QMessageBox::ButtonRole::RejectRole);
|
||||
box.setDefaultButton(authCode);
|
||||
box.exec();
|
||||
if ((box.clickedButton() != deviceCode && box.clickedButton() != authCode) || box.clickedButton() == cancel)
|
||||
return;
|
||||
MinecraftAccountPtr account = MSALoginDialog::newAccount(
|
||||
this, tr("Please enter your Mojang account email and password to add your account."), box.clickedButton() == deviceCode);
|
||||
|
||||
auto account = MSALoginDialog::newAccount(this);
|
||||
if (account) {
|
||||
m_accounts->addAccount(account);
|
||||
if (m_accounts->count() == 1) {
|
||||
|
||||
@@ -213,6 +213,7 @@ void LauncherPage::applySettings()
|
||||
|
||||
s->set("NumberOfConcurrentTasks", ui->numberOfConcurrentTasksSpinBox->value());
|
||||
s->set("NumberOfConcurrentDownloads", ui->numberOfConcurrentDownloadsSpinBox->value());
|
||||
s->set("RequestTimeout", ui->timeoutSecondsSpinBox->value());
|
||||
|
||||
// Console settings
|
||||
s->set("ShowConsole", ui->showConsoleCheck->isChecked());
|
||||
@@ -270,6 +271,7 @@ void LauncherPage::loadSettings()
|
||||
|
||||
ui->numberOfConcurrentTasksSpinBox->setValue(s->get("NumberOfConcurrentTasks").toInt());
|
||||
ui->numberOfConcurrentDownloadsSpinBox->setValue(s->get("NumberOfConcurrentDownloads").toInt());
|
||||
ui->timeoutSecondsSpinBox->setValue(s->get("RequestTimeout").toInt());
|
||||
|
||||
// Console settings
|
||||
ui->showConsoleCheck->setChecked(s->get("ShowConsole").toBool());
|
||||
|
||||
@@ -272,6 +272,13 @@
|
||||
<string>Miscellaneous</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="numberOfConcurrentDownloadsSpinBox">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="numberOfConcurrentTasksLabel">
|
||||
<property name="text">
|
||||
@@ -293,10 +300,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="numberOfConcurrentDownloadsSpinBox">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="timeoutSecondsLabel">
|
||||
<property name="toolTip">
|
||||
<string>Seconds to wait until the requests are terminated</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Timeout for HTTP requests</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="timeoutSecondsSpinBox">
|
||||
<property name="suffix">
|
||||
<string>s</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -104,7 +104,7 @@ void ImportPage::updateState()
|
||||
return;
|
||||
}
|
||||
if (ui->modpackEdit->hasAcceptableInput()) {
|
||||
QString input = ui->modpackEdit->text();
|
||||
QString input = ui->modpackEdit->text().trimmed();
|
||||
auto url = QUrl::fromUserInput(input);
|
||||
if (url.isLocalFile()) {
|
||||
// FIXME: actually do some validation of what's inside here... this is fake AF
|
||||
|
||||
Reference in New Issue
Block a user