Inform users of the filename before navigating to third-party download channel.

This commit is contained in:
burningtnt 2025-09-20 15:59:37 +08:00
parent 360f10c939
commit 7eeea377a0
No known key found for this signature in database
GPG Key ID: 18A43F21F9ACE8C4
4 changed files with 9 additions and 1 deletions

View File

@ -496,8 +496,13 @@ public class TerracottaControllerPage extends StackPane {
Node icon = SVG.OPEN_IN_NEW.createIcon(Theme.blackFill(), 16);
node.getChildren().setAll(description, placeholder, icon);
String url = link.link();
RipplerContainer container = new RipplerContainer(node);
container.setOnMouseClicked(ev -> FXUtils.openLink(link.link()));
container.setOnMouseClicked(ev -> Controllers.dialog(
i18n("terracotta.from_local.guide", TerracottaMetadata.PACKAGE_NAME),
i18n("message.info"), MessageDialogPane.MessageType.INFO,
() -> FXUtils.openLink(url)
));
container.getProperties().put("ComponentList.noPadding", true);
locals.getContent().add(container);
}

View File

@ -1421,6 +1421,7 @@ terracotta.network_warning=Terracotta | Multiplayer is based on P2P. The final e
terracotta.sudo_installing=HMCL must verify your password before installing Multiplayer Core
terracotta.from_local.title=Third-party download links for Multiplayer Core
terracotta.from_local.desc=In some regions, the default download channel for Multiplayer Core may be unstable.
terracotta.from_local.guide=Please download Multiplayer Core package named %s. Once downloaded, drag the file into the current page to install it.
terracotta.from_local.file_name_mismatch=You should download the Multiplayer Core package named %1$s instead of %2$s
terracotta.status.bootstrap=Gathering information
terracotta.status.uninitialized.not_exist=Multiplayer Core: Not Downloaded

View File

@ -1209,6 +1209,7 @@ terracotta.network_warning=多人連線基於 p2p最終線上體驗和您的
terracotta.sudo_installing=HMCL 需要驗證您的密碼才能安裝線上核心
terracotta.from_local.title=線上核心第三方下載鏈接
terracotta.from_local.desc=在部分地區,線上核心預設下載管道可能不穩定
terracotta.from_local.guide=您應下載名為 %s 的線上核心套件。下載完成後,請將檔案拖曳到目前介面來安裝。
terracotta.from_local.file_name_mismatch=您應該下載名為 %1$s 的線上核心包,而非 %2$s
terracotta.status.bootstrap=正在收集信息
terracotta.status.uninitialized.not_exist=未下載聯機核心

View File

@ -1220,6 +1220,7 @@ terracotta.network_warning=多人联机基于 p2p最终联机体验和您的
terracotta.sudo_installing=HMCL 需要验证您的密码才能安装联机核心
terracotta.from_local.title=联机核心第三方下载链接
terracotta.from_local.desc=在部分地区,联机核心默认下载渠道可能不稳定
terracotta.from_local.guide=您应当下载名为 %s 的联机核心包。下载完成后,请将文件拖入当前界面来安装。
terracotta.from_local.file_name_mismatch=您应当下载名为 %1$s 的联机核心包,而非 %2$s
terracotta.status.bootstrap=正在收集信息
terracotta.status.uninitialized.not_exist=未下载联机核心