添加验证服务器界面回车代表下一步

This commit is contained in:
yushijinhun 2018-07-08 17:47:37 +08:00
parent 9bffc68c70
commit b3fdbe021d
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
2 changed files with 6 additions and 1 deletions

View File

@ -95,6 +95,11 @@ public class AddAuthlibInjectorServerPane extends StackPane {
@FXML
private void onAddNext() {
if (btnAddNext.isDisabled())
return;
lblCreationWarning.setText("");
String url = fixInputUrl(txtServerUrl.getText());
nextPane.showSpinner();

View File

@ -16,7 +16,7 @@
<Label text="%account.injector.add" />
</heading>
<body>
<JFXTextField fx:id="txtServerUrl" promptText="%account.injector.server_url">
<JFXTextField fx:id="txtServerUrl" promptText="%account.injector.server_url" onAction="#onAddNext">
<validators>
<URLValidator message="%input.url">
<protocols>