mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-08-03 19:36:53 -04:00
update
This commit is contained in:
parent
b5b56664e0
commit
009552f479
@ -32,11 +32,9 @@ import org.jackhuang.hmcl.auth.AuthenticationException;
|
|||||||
import org.jackhuang.hmcl.auth.CredentialExpiredException;
|
import org.jackhuang.hmcl.auth.CredentialExpiredException;
|
||||||
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount;
|
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount;
|
||||||
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorServer;
|
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorServer;
|
||||||
import org.jackhuang.hmcl.auth.microsoft.MicrosoftAccount;
|
|
||||||
import org.jackhuang.hmcl.auth.offline.OfflineAccount;
|
import org.jackhuang.hmcl.auth.offline.OfflineAccount;
|
||||||
import org.jackhuang.hmcl.auth.yggdrasil.CompleteGameProfile;
|
import org.jackhuang.hmcl.auth.yggdrasil.CompleteGameProfile;
|
||||||
import org.jackhuang.hmcl.auth.yggdrasil.TextureType;
|
import org.jackhuang.hmcl.auth.yggdrasil.TextureType;
|
||||||
import org.jackhuang.hmcl.game.OAuthServer;
|
|
||||||
import org.jackhuang.hmcl.setting.Accounts;
|
import org.jackhuang.hmcl.setting.Accounts;
|
||||||
import org.jackhuang.hmcl.task.Schedulers;
|
import org.jackhuang.hmcl.task.Schedulers;
|
||||||
import org.jackhuang.hmcl.task.Task;
|
import org.jackhuang.hmcl.task.Task;
|
||||||
@ -98,9 +96,6 @@ public class AccountListItem extends RadioButton {
|
|||||||
|
|
||||||
public Task<?> refreshAsync() {
|
public Task<?> refreshAsync() {
|
||||||
return Task.runAsync(() -> {
|
return Task.runAsync(() -> {
|
||||||
if (account instanceof MicrosoftAccount && Accounts.OAUTH_CALLBACK.getClientId().isEmpty()) {
|
|
||||||
throw new OAuthServer.MicrosoftAuthenticationNotSupportedException();
|
|
||||||
}
|
|
||||||
account.clearCache();
|
account.clearCache();
|
||||||
try {
|
try {
|
||||||
account.logIn();
|
account.logIn();
|
||||||
|
@ -33,6 +33,7 @@ import javafx.scene.layout.VBox;
|
|||||||
import org.jackhuang.hmcl.auth.Account;
|
import org.jackhuang.hmcl.auth.Account;
|
||||||
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount;
|
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount;
|
||||||
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorServer;
|
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorServer;
|
||||||
|
import org.jackhuang.hmcl.auth.microsoft.MicrosoftAccount;
|
||||||
import org.jackhuang.hmcl.game.TexturesLoader;
|
import org.jackhuang.hmcl.game.TexturesLoader;
|
||||||
import org.jackhuang.hmcl.setting.Accounts;
|
import org.jackhuang.hmcl.setting.Accounts;
|
||||||
import org.jackhuang.hmcl.setting.Theme;
|
import org.jackhuang.hmcl.setting.Theme;
|
||||||
@ -128,6 +129,7 @@ public final class AccountListItemSkin extends SkinBase<AccountListItem> {
|
|||||||
JFXButton btnRefresh = new JFXButton();
|
JFXButton btnRefresh = new JFXButton();
|
||||||
SpinnerPane spinnerRefresh = new SpinnerPane();
|
SpinnerPane spinnerRefresh = new SpinnerPane();
|
||||||
spinnerRefresh.getStyleClass().setAll("small-spinner-pane");
|
spinnerRefresh.getStyleClass().setAll("small-spinner-pane");
|
||||||
|
btnRefresh.setDisable(skinnable.getAccount() instanceof MicrosoftAccount && Accounts.OAUTH_CALLBACK.getClientId().isEmpty());
|
||||||
btnRefresh.setOnAction(e -> {
|
btnRefresh.setOnAction(e -> {
|
||||||
spinnerRefresh.showSpinner();
|
spinnerRefresh.showSpinner();
|
||||||
skinnable.refreshAsync()
|
skinnable.refreshAsync()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user