Fix #5294 构建不包含 Microsoft OAuth App 密钥时,微软登录对话框显示为空#5297
Hidden character warning
Fix #5294 构建不包含 Microsoft OAuth App 密钥时,微软登录对话框显示为空#5297CiiLu wants to merge 1 commit intoHMCL-dev:mainfrom
Conversation
9846c3a to
6c9ade6
Compare
There was a problem hiding this comment.
Pull request overview
Fixes #5294 where the Microsoft login details area could render empty when the build does not include a Microsoft OAuth App client id.
Changes:
- Adds the Microsoft details pane to the container before the “missing client id” early-return, so the warning UI is visible.
- Disables the “Accept/Login” button when the Microsoft OAuth client id is missing, and resets button disabled state when swapping panes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -368,8 +371,6 @@ private void initDetailsPane() { | |||
| detailsPane = new AccountDetailsInputPane(factory, btnAccept::fire); | |||
| btnAccept.disableProperty().bind(((AccountDetailsInputPane) detailsPane).validProperty().not()); | |||
| } | |||
There was a problem hiding this comment.
initDetailsPane() no longer adds detailsPane to detailsContainer for non-Microsoft factories. The only remaining detailsContainer.getChildren().add(detailsPane) call is inside the Microsoft branch, so selecting any other login method will leave the details area empty.
Suggested fix: re-add detailsPane to detailsContainer in the else branch (after creating/binding AccountDetailsInputPane), or restore a single add-at-end with a guard to avoid double-adding while still handling the early-return case for missing Microsoft clientId.
| } | |
| } | |
| if (detailsPane != null && !detailsContainer.getChildren().contains(detailsPane)) { | |
| detailsContainer.getChildren().add(detailsPane); | |
| } |
No description provided.