移除残留的 MCBBS 按钮 (#2849)

* remove

* fix
This commit is contained in:
zkitefly 2024-02-25 01:20:42 +08:00 committed by GitHub
parent 815b90845a
commit 20ed42ab8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 16 deletions

View File

@ -34,7 +34,6 @@ import javafx.stage.FileChooser;
import org.jackhuang.hmcl.download.LibraryAnalyzer; import org.jackhuang.hmcl.download.LibraryAnalyzer;
import org.jackhuang.hmcl.game.Version; import org.jackhuang.hmcl.game.Version;
import org.jackhuang.hmcl.mod.ModLoaderType; import org.jackhuang.hmcl.mod.ModLoaderType;
import org.jackhuang.hmcl.mod.ModManager;
import org.jackhuang.hmcl.mod.RemoteMod; import org.jackhuang.hmcl.mod.RemoteMod;
import org.jackhuang.hmcl.mod.RemoteModRepository; import org.jackhuang.hmcl.mod.RemoteModRepository;
import org.jackhuang.hmcl.setting.Profile; import org.jackhuang.hmcl.setting.Profile;
@ -254,13 +253,13 @@ public class DownloadPage extends Control implements DecoratorPage {
openMcmodButton.setMinWidth(Region.USE_PREF_SIZE); openMcmodButton.setMinWidth(Region.USE_PREF_SIZE);
runInFX(() -> FXUtils.installFastTooltip(openMcmodButton, i18n("mods.mcmod"))); runInFX(() -> FXUtils.installFastTooltip(openMcmodButton, i18n("mods.mcmod")));
if (StringUtils.isNotBlank(getSkinnable().mod.getMcbbs())) { // if (StringUtils.isNotBlank(getSkinnable().mod.getMcbbs())) {
JFXHyperlink openMcbbsButton = new JFXHyperlink(i18n("mods.mcbbs")); // JFXHyperlink openMcbbsButton = new JFXHyperlink(i18n("mods.mcbbs"));
openMcbbsButton.setExternalLink(ModManager.getMcbbsUrl(getSkinnable().mod.getMcbbs())); // openMcbbsButton.setExternalLink(ModManager.getMcbbsUrl(getSkinnable().mod.getMcbbs()));
descriptionPane.getChildren().add(openMcbbsButton); // descriptionPane.getChildren().add(openMcbbsButton);
openMcbbsButton.setMinWidth(Region.USE_PREF_SIZE); // openMcbbsButton.setMinWidth(Region.USE_PREF_SIZE);
runInFX(() -> FXUtils.installFastTooltip(openMcbbsButton, i18n("mods.mcbbs"))); // runInFX(() -> FXUtils.installFastTooltip(openMcbbsButton, i18n("mods.mcbbs")));
} // }
} }
JFXHyperlink openUrlButton = new JFXHyperlink(control.page.getLocalizedOfficialPage()); JFXHyperlink openUrlButton = new JFXHyperlink(control.page.getLocalizedOfficialPage());

View File

@ -391,14 +391,14 @@ class ModListPageSkin extends SkinBase<ModListPage> {
getActions().add(officialPageButton); getActions().add(officialPageButton);
} }
if (modInfo.getMod() != null && StringUtils.isNotBlank(modInfo.getMod().getMcbbs())) { // if (modInfo.getMod() != null && StringUtils.isNotBlank(modInfo.getMod().getMcbbs())) {
JFXHyperlink mcbbsButton = new JFXHyperlink(i18n("mods.mcbbs")); // JFXHyperlink mcbbsButton = new JFXHyperlink(i18n("mods.mcbbs"));
mcbbsButton.setOnAction(e -> { // mcbbsButton.setOnAction(e -> {
fireEvent(new DialogCloseEvent()); // fireEvent(new DialogCloseEvent());
FXUtils.openLink(ModManager.getMcbbsUrl(modInfo.getMod().getMcbbs())); // FXUtils.openLink(ModManager.getMcbbsUrl(modInfo.getMod().getMcbbs()));
}); // });
getActions().add(mcbbsButton); // getActions().add(mcbbsButton);
} // }
if (modInfo.getMod() == null || StringUtils.isBlank(modInfo.getMod().getMcmod())) { if (modInfo.getMod() == null || StringUtils.isBlank(modInfo.getMod().getMcmod())) {
JFXHyperlink searchButton = new JFXHyperlink(i18n("mods.mcmod.search")); JFXHyperlink searchButton = new JFXHyperlink(i18n("mods.mcmod.search"));