aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/global
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages/global')
-rw-r--r--launcher/ui/pages/global/APIPage.cpp (renamed from launcher/ui/pages/global/PastePage.cpp)20
-rw-r--r--launcher/ui/pages/global/APIPage.h (renamed from launcher/ui/pages/global/PastePage.h)18
-rw-r--r--launcher/ui/pages/global/APIPage.ui (renamed from launcher/ui/pages/global/PastePage.ui)60
3 files changed, 77 insertions, 21 deletions
diff --git a/launcher/ui/pages/global/PastePage.cpp b/launcher/ui/pages/global/APIPage.cpp
index 7c69e1a4..ad79e00c 100644
--- a/launcher/ui/pages/global/PastePage.cpp
+++ b/launcher/ui/pages/global/APIPage.cpp
@@ -13,8 +13,8 @@
* limitations under the License.
*/
-#include "PastePage.h"
-#include "ui_PastePage.h"
+#include "APIPage.h"
+#include "ui_APIPage.h"
#include <QMessageBox>
#include <QFileDialog>
@@ -26,9 +26,9 @@
#include "tools/BaseProfiler.h"
#include "Application.h"
-PastePage::PastePage(QWidget *parent) :
+APIPage::APIPage(QWidget *parent) :
QWidget(parent),
- ui(new Ui::PastePage)
+ ui(new Ui::APIPage)
{
static QRegularExpression validUrlRegExp("https?://.+");
ui->setupUi(this);
@@ -37,26 +37,30 @@ PastePage::PastePage(QWidget *parent) :
loadSettings();
}
-PastePage::~PastePage()
+APIPage::~APIPage()
{
delete ui;
}
-void PastePage::loadSettings()
+void APIPage::loadSettings()
{
auto s = APPLICATION->settings();
QString pastebinURL = s->get("PastebinURL").toString();
ui->urlChoices->setCurrentText(pastebinURL);
+ QString msaClientID = s->get("MSAClientIDOverride").toString();
+ ui->msaClientID->setText(msaClientID);
}
-void PastePage::applySettings()
+void APIPage::applySettings()
{
auto s = APPLICATION->settings();
QString pastebinURL = ui->urlChoices->currentText();
s->set("PastebinURL", pastebinURL);
+ QString msaClientID = ui->msaClientID->text();
+ s->set("MSAClientIDOverride", msaClientID);
}
-bool PastePage::apply()
+bool APIPage::apply()
{
applySettings();
return true;
diff --git a/launcher/ui/pages/global/PastePage.h b/launcher/ui/pages/global/APIPage.h
index d475dfd9..9474ebbb 100644
--- a/launcher/ui/pages/global/PastePage.h
+++ b/launcher/ui/pages/global/APIPage.h
@@ -21,32 +21,32 @@
#include <Application.h>
namespace Ui {
-class PastePage;
+class APIPage;
}
-class PastePage : public QWidget, public BasePage
+class APIPage : public QWidget, public BasePage
{
Q_OBJECT
public:
- explicit PastePage(QWidget *parent = 0);
- ~PastePage();
+ explicit APIPage(QWidget *parent = 0);
+ ~APIPage();
QString displayName() const override
{
- return tr("Log Upload");
+ return tr("APIs");
}
QIcon icon() const override
{
- return APPLICATION->getThemedIcon("log");
+ return APPLICATION->getThemedIcon("worlds");
}
QString id() const override
{
- return "log-upload";
+ return "apis";
}
QString helpPage() const override
{
- return "Log-Upload";
+ return "APIs";
}
virtual bool apply() override;
@@ -55,6 +55,6 @@ private:
void applySettings();
private:
- Ui::PastePage *ui;
+ Ui::APIPage *ui;
};
diff --git a/launcher/ui/pages/global/PastePage.ui b/launcher/ui/pages/global/APIPage.ui
index 2d13a765..38bbc525 100644
--- a/launcher/ui/pages/global/PastePage.ui
+++ b/launcher/ui/pages/global/APIPage.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>PastePage</class>
- <widget class="QWidget" name="PastePage">
+ <class>APIPage</class>
+ <widget class="QWidget" name="APIPage">
<property name="geometry">
<rect>
<x>0</x>
@@ -34,7 +34,7 @@
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QGroupBox" name="groupBox_2">
+ <widget class="QGroupBox" name="groupBox_paste">
<property name="title">
<string>Pastebin URL</string>
</property>
@@ -101,6 +101,58 @@
</widget>
</item>
<item>
+ <widget class="QGroupBox" name="groupBox_msa">
+ <property name="title">
+ <string>Microsoft Secured Account</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <widget class="Line" name="line_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Note: you probably don't need to set this if logging in via Microsoft Secured Account already works.</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="msaClientID">
+ <property name="placeholderText">
+ <string>(Default)</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Enter a custom client ID for Microsoft Secured Account here. </string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ <property name="openExternalLinks">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -108,7 +160,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>216</height>
+ <height>40</height>
</size>
</property>
</spacer>