mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 04:07:46 +00:00
Use the unified login interface in tablet version too
This commit is contained in:
parent
350e88aa34
commit
e51d8243f2
4 changed files with 8 additions and 9 deletions
|
@ -159,7 +159,7 @@ public:
|
||||||
*
|
*
|
||||||
* The login process is asynchronous.
|
* The login process is asynchronous.
|
||||||
*/
|
*/
|
||||||
void login(LoginInformation& loginInformation);
|
Q_INVOKABLE void login(LoginInformation* loginInformation);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Attempts to log into a profile without LoginInformation, which may or may not work depending on a combination of
|
* Attempts to log into a profile without LoginInformation, which may or may not work depending on a combination of
|
||||||
|
|
|
@ -640,11 +640,11 @@ void LauncherCore::readGameData(ProfileSettings& profile) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LauncherCore::login(LoginInformation& loginInformation) {
|
void LauncherCore::login(LoginInformation* loginInformation) {
|
||||||
if (loginInformation.settings->isSapphire) {
|
if (loginInformation->settings->isSapphire) {
|
||||||
sapphireLauncher->login(loginInformation.settings->lobbyURL, loginInformation);
|
sapphireLauncher->login(loginInformation->settings->lobbyURL, *loginInformation);
|
||||||
} else {
|
} else {
|
||||||
squareBoot->checkGateStatus(&loginInformation);
|
squareBoot->checkGateStatus(loginInformation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -709,7 +709,7 @@ bool LauncherCore::autoLogin(ProfileSettings& profile) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: when login fails, we need some way to propagate this back? or not?
|
// TODO: when login fails, we need some way to propagate this back? or not?
|
||||||
login(*info);
|
login(info);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -303,7 +303,7 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
this->core.login(*info);
|
this->core.login(info);
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(loginButton, &QPushButton::released, [=] {
|
connect(loginButton, &QPushButton::released, [=] {
|
||||||
|
|
|
@ -67,8 +67,7 @@ ApplicationWindow {
|
||||||
info.password = passwordField.text
|
info.password = passwordField.text
|
||||||
info.oneTimePassword = otpField.text
|
info.oneTimePassword = otpField.text
|
||||||
|
|
||||||
print(info);
|
core.login(info);
|
||||||
core.squareBoot.checkGateStatus(info);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue