Add back DRM for offline and authlib-injector accounts

This commit is contained in:
Evan Goode 2024-05-20 13:23:57 -04:00
parent d19074302c
commit 13a32a6642
3 changed files with 11 additions and 14 deletions

View File

@ -6,8 +6,6 @@ Fjord Launcher is a **fork** of Prism Launcher. It is **not** endorsed by or aff
- [Support for alternative auth servers](doc/alternative-auth-servers.md) - [Support for alternative auth servers](doc/alternative-auth-servers.md)
- Offline mode doesn't require a Microsoft account
- Ability to download FTB modpacks from within the launcher - Ability to download FTB modpacks from within the launcher
## Having a problem with the launcher? ## Having a problem with the launcher?

View File

@ -137,15 +137,6 @@ void AccountListPage::listChanged()
updateButtonStates(); updateButtonStates();
} }
void AccountListPage::showLegalNotice()
{
QMessageBox::warning(this, tr("Notice"),
tr("Depending on the laws in your area, accessing Minecraft may require purchasing the game from Mojang."
"<br><br>"
"In order to limit dependence on nonfree network services, this Minecraft Launcher does not include DRM, "
"but its developers do not condone the violation of any law. "));
}
void AccountListPage::on_actionAddMojang_triggered() void AccountListPage::on_actionAddMojang_triggered()
{ {
MinecraftAccountPtr account = MinecraftAccountPtr account =
@ -162,7 +153,12 @@ void AccountListPage::on_actionAddMojang_triggered()
void AccountListPage::on_actionAddAuthlibInjector_triggered() void AccountListPage::on_actionAddAuthlibInjector_triggered()
{ {
if (m_accounts->count() == 0) { if (m_accounts->count() == 0) {
showLegalNotice(); QMessageBox::warning(this, tr("Error"),
tr("You must add a Microsoft or Mojang account that owns Minecraft before you can add an account on a custom "
"authentication server."
"<br><br>"
"If you have lost your account you can contact Microsoft for support."));
return;
} }
MinecraftAccountPtr account = AuthlibInjectorLoginDialog::newAccount( MinecraftAccountPtr account = AuthlibInjectorLoginDialog::newAccount(
@ -197,7 +193,11 @@ void AccountListPage::on_actionAddMicrosoft_triggered()
void AccountListPage::on_actionAddOffline_triggered() void AccountListPage::on_actionAddOffline_triggered()
{ {
if (m_accounts->count() == 0) { if (m_accounts->count() == 0) {
showLegalNotice(); QMessageBox::warning(this, tr("Error"),
tr("You must add a Microsoft or Mojang account that owns Minecraft before you can add an offline account."
"<br><br>"
"If you have lost your account you can contact Microsoft for support."));
return;
} }
MinecraftAccountPtr account = MinecraftAccountPtr account =

View File

@ -90,7 +90,6 @@ class AccountListPage : public QMainWindow, public BasePage {
void ShowContextMenu(const QPoint& pos); void ShowContextMenu(const QPoint& pos);
private: private:
void showLegalNotice();
void changeEvent(QEvent* event) override; void changeEvent(QEvent* event) override;
QMenu* createPopupMenu() override; QMenu* createPopupMenu() override;
shared_qobject_ptr<AccountList> m_accounts; shared_qobject_ptr<AccountList> m_accounts;