fix: polish accounts list page

This commit is contained in:
Haowei Wen
2021-09-06 21:56:17 +08:00
parent 3051332165
commit d8943c266e
3 changed files with 9 additions and 8 deletions

View File

@@ -130,11 +130,14 @@ public class AccountListPage extends ListPageBase<AccountListItem> implements De
authServerItems = MappedObservableList.create(skinnable.authServersProperty(), server -> {
AdvancedListItem item = new AdvancedListItem();
item.getStyleClass().add("navigation-drawer-item");
item.setLeftGraphic(SVG.server(null, 20, 20));
item.setLeftGraphic(SVG.server(Theme.blackFillBinding(), 24, 24));
item.setOnAction(e -> Controllers.dialog(new CreateAccountPane(server)));
JFXButton btnRemove = new JFXButton();
btnRemove.setOnAction(e -> skinnable.authServersProperty().remove(server));
btnRemove.setOnAction(e -> {
skinnable.authServersProperty().remove(server);
e.consume();
});
btnRemove.getStyleClass().add("toggle-icon4");
btnRemove.setGraphic(SVG.close(Theme.blackFillBinding(), 14, 14));
item.setRightGraphic(btnRemove);

View File

@@ -38,6 +38,7 @@ import org.jackhuang.hmcl.auth.yggdrasil.YggdrasilAccountFactory;
import org.jackhuang.hmcl.auth.yggdrasil.YggdrasilService;
import org.jackhuang.hmcl.game.TexturesLoader;
import org.jackhuang.hmcl.setting.Accounts;
import org.jackhuang.hmcl.setting.Theme;
import org.jackhuang.hmcl.task.Schedulers;
import org.jackhuang.hmcl.task.Task;
import org.jackhuang.hmcl.task.TaskExecutor;
@@ -312,16 +313,16 @@ public class CreateAccountPane extends JFXDialogLayout {
classPropertyFor(cboServers, "jfx-combo-box-warning").bind(noServers);
classPropertyFor(cboServers, "jfx-combo-box").bind(noServers.not());
HBox.setHgrow(cboServers, Priority.ALWAYS);
HBox.setMargin(cboServers, new Insets(0, 10, 0, 0));
cboServers.setMaxWidth(Double.MAX_VALUE);
HBox linksContainer = new HBox();
linksContainer.setAlignment(Pos.CENTER);
linksContainer.setPadding(new Insets(0, 5, 0, 15));
onChangeAndOperate(cboServers.valueProperty(), server -> linksContainer.getChildren().setAll(createHyperlinks(server)));
linksContainer.setMinWidth(USE_PREF_SIZE);
JFXButton btnAddServer = new JFXButton();
btnAddServer.setGraphic(SVG.plus(null, 20, 20));
btnAddServer.setGraphic(SVG.plus(Theme.blackFillBinding(), 20, 20));
btnAddServer.getStyleClass().add("toggle-icon4");
btnAddServer.setOnAction(e -> {
Controllers.dialog(new AddAuthlibInjectorServerPane());

View File

@@ -59,8 +59,6 @@ account.failed.no_character=该帐号没有角色
account.failed.server_response_malformed=无法解析认证服务器响应,可能是服务器故障
account.injector.add=添加认证服务器
account.injector.empty=无(点击右侧加号添加)
account.injector.manage=管理认证服务器
account.injector.manage.title=认证服务器
account.injector.http=警告:此服务器使用不安全的 HTTP 协议,您的密码在登录时会被明文传输。
account.injector.link.register=注册
account.injector.server=认证服务器
@@ -68,8 +66,7 @@ account.injector.server_url=服务器地址
account.injector.server_name=服务器名称
account.manage=账户列表
account.methods=登录方式
account.methods.authlib_injector=外置登录
account.methods.authlib_injector.subtitle=authlib-injector
account.methods.authlib_injector=外置登录 (authlib-injector)
account.methods.microsoft=微软账户
account.methods.microsoft.close_page=已完成微软账号授权,接下来启动器还需要完成剩余登录步骤。你已经可以关闭本页面了。
account.methods.microsoft.error.add_family=由于你未满 18 岁,你的账号必须被加入到家庭中才能登录游戏。