forked from Github/PrismLauncher
feat: allow offline accounts
This commit is contained in:
parent
0af021fef2
commit
3b87452699
2 changed files with 1 additions and 9 deletions
|
|
@ -116,7 +116,7 @@ class MinecraftAccount : public QObject, public Usable {
|
||||||
|
|
||||||
[[nodiscard]] AccountType accountType() const noexcept { return data.type; }
|
[[nodiscard]] AccountType accountType() const noexcept { return data.type; }
|
||||||
|
|
||||||
bool ownsMinecraft() const { return data.type != AccountType::Offline && data.minecraftEntitlement.ownsMinecraft; }
|
bool ownsMinecraft() const { return true; }
|
||||||
|
|
||||||
bool hasProfile() const { return data.profileId().size() != 0; }
|
bool hasProfile() const { return data.profileId().size() != 0; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,14 +141,6 @@ void AccountListPage::on_actionAddMicrosoft_triggered()
|
||||||
|
|
||||||
void AccountListPage::on_actionAddOffline_triggered()
|
void AccountListPage::on_actionAddOffline_triggered()
|
||||||
{
|
{
|
||||||
if (!m_accounts->anyAccountIsValid()) {
|
|
||||||
QMessageBox::warning(this, tr("Error"),
|
|
||||||
tr("You must add a Microsoft 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 =
|
||||||
OfflineLoginDialog::newAccount(this, tr("Please enter your desired username to add your offline account."));
|
OfflineLoginDialog::newAccount(this, tr("Please enter your desired username to add your offline account."));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue