Skip to content

修复 OfflineAccountSkinPanecslApiField 的校验未生效的问题#5411

Merged
Glavo merged 3 commits intoHMCL-dev:mainfrom
CiiLu:xᴉℲǝuɐԀuᴉʞSʇunoɔɔⱯǝuᴉꞁɟɟO
Feb 6, 2026

Hidden character warning

The head ref may contain hidden characters: "x\u1d09\u2132\u01ddu\u0250\u0500u\u1d09\u029eS\u0287uno\u0254\u0254\u2c6f\u01ddu\u1d09\ua781\u025f\u025fO"
Merged

修复 OfflineAccountSkinPanecslApiField 的校验未生效的问题#5411
Glavo merged 3 commits intoHMCL-dev:mainfrom
CiiLu:xᴉℲǝuɐԀuᴉʞSʇunoɔɔⱯǝuᴉꞁɟɟO

Conversation

@CiiLu
Copy link
Contributor

@CiiLu CiiLu commented Feb 3, 2026

No description provided.

@NoClassFoundError
Copy link
Contributor

什么˥ƆWH

@Glavo
Copy link
Member

Glavo commented Feb 4, 2026

请不要在分支名内使用拉丁字母、数字、下划线和连字符以外的字符。

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to fix a validation issue in OfflineAccountSkinPane where the cslApiField validator was not being triggered. The changes enable real-time validation for the CSL API URL field and bind the accept button's disabled state to the validation result.

Changes:

  • Import statements reorganized to group related imports together and alphabetize static imports
  • Added FXUtils.setValidateWhileTextChanged(cslApiField, true) to enable real-time validation
  • Added binding to disable the accept button when the cslApiField has validation errors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

cancelButton.setOnAction(e -> fireEvent(new DialogCloseEvent()));
onEscPressed(this, cancelButton::fire);

acceptButton.disableProperty().bind(cslApiField.activeValidatorProperty().isNotNull());
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The accept button is unconditionally bound to the cslApiField validator, which will disable the button even when the user selects skin types other than CUSTOM_SKIN_LOADER_API (e.g., DEFAULT, STEVE, ALEX, LOCAL_FILE, LITTLE_SKIN). This binding should be conditional - the button should only be disabled based on the validator when the selected skin type is CUSTOM_SKIN_LOADER_API. Consider using a conditional binding with Bindings.when() or Bindings.createBooleanBinding() that checks skinItem.selectedDataProperty() to ensure the validator only affects the button when CSL API is selected.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Glavo Glavo merged commit aecbf2e into HMCL-dev:main Feb 6, 2026
8 checks passed
@CiiLu CiiLu deleted the xᴉℲǝuɐԀuᴉʞSʇunoɔɔⱯǝuᴉꞁɟɟO branch February 12, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants