diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-03-09 15:10:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-09 15:10:40 +0100 |
commit | 1dd96898e1e6c68146424a3af66b2734a88fc23e (patch) | |
tree | 4941c84c291231d42e8a1caacab4dfe582be919e /launcher/ui/pages | |
parent | 3bd4ad7c93486e29c4dccc17d5d42719b452fd08 (diff) | |
parent | 59b15c5f08e00e2da0f77b9544881e93158320ed (diff) | |
download | PrismLauncher-1dd96898e1e6c68146424a3af66b2734a88fc23e.tar.gz PrismLauncher-1dd96898e1e6c68146424a3af66b2734a88fc23e.tar.bz2 PrismLauncher-1dd96898e1e6c68146424a3af66b2734a88fc23e.zip |
Merge pull request #896 from TheKodeToad/modrinth-token
Diffstat (limited to 'launcher/ui/pages')
-rw-r--r-- | launcher/ui/pages/global/APIPage.cpp | 7 | ||||
-rw-r--r-- | launcher/ui/pages/global/APIPage.ui | 51 |
2 files changed, 54 insertions, 4 deletions
diff --git a/launcher/ui/pages/global/APIPage.cpp b/launcher/ui/pages/global/APIPage.cpp index e3d30475..f662ee1c 100644 --- a/launcher/ui/pages/global/APIPage.cpp +++ b/launcher/ui/pages/global/APIPage.cpp @@ -1,9 +1,10 @@ // SPDX-License-Identifier: GPL-3.0-only /* - * PolyMC - Minecraft Launcher + * Prism Launcher - Minecraft Launcher * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net> * Copyright (c) 2022 Jamie Mansfield <jmansfield@cadixdev.org> * Copyright (c) 2022 Lenny McLennington <lenny@sneed.church> + * Copyright (C) 2023 TheKodeToad <TheKodeToad@proton.me> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -147,6 +148,8 @@ void APIPage::loadSettings() ui->metaURL->setText(metaURL); QString flameKey = s->get("FlameKeyOverride").toString(); ui->flameKey->setText(flameKey); + QString modrinthToken = s->get("ModrinthToken").toString(); + ui->modrinthToken->setText(modrinthToken); QString customUserAgent = s->get("UserAgentOverride").toString(); ui->userAgentLineEdit->setText(customUserAgent); } @@ -177,6 +180,8 @@ void APIPage::applySettings() s->set("MetaURLOverride", metaURL); QString flameKey = ui->flameKey->text(); s->set("FlameKeyOverride", flameKey); + QString modrinthToken = ui->modrinthToken->text(); + s->set("ModrinthToken", modrinthToken); s->set("UserAgentOverride", ui->userAgentLineEdit->text()); } diff --git a/launcher/ui/pages/global/APIPage.ui b/launcher/ui/pages/global/APIPage.ui index d56a9ef6..40b89d91 100644 --- a/launcher/ui/pages/global/APIPage.ui +++ b/launcher/ui/pages/global/APIPage.ui @@ -196,24 +196,69 @@ </widget> </item> <item> - <widget class="QGroupBox" name="groupBox_flame"> + <widget class="QGroupBox" name="groupBox_modrinth"> <property name="enabled"> <bool>true</bool> </property> <property name="title"> - <string>&CurseForge Core API</string> + <string>&Modrinth API</string> </property> <layout class="QGridLayout" name="gridLayout"> <item row="0" column="0"> <widget class="QLabel" name="label_8"> <property name="text"> - <string>Note: you probably don't need to set this if CurseForge already works.</string> + <string><html><head/><body><p>Note: you only need to set this to access private data. Read the <a href="https://docs.modrinth.com/api-spec/#section/Authentication">documentation</a> for more information.</p></body></html></string> </property> </widget> </item> <item row="2" column="0"> <widget class="QLabel" name="label_7"> <property name="text"> + <string>Enter a custom API token for Modrinth 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> + <item row="1" column="0"> + <widget class="QLineEdit" name="modrinthToken"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="placeholderText"> + <string>(None)</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_flame"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="title"> + <string>&CurseForge Core API</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <widget class="QLabel" name="label_10"> + <property name="text"> + <string>Note: you probably don't need to set this if CurseForge already works.</string> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_9"> + <property name="text"> <string>Enter a custom API Key for CurseForge here.</string> </property> <property name="textFormat"> |