feat: 更新日志中仅显示本次更新内容 (#3974)

* 更新日志中仅显示本次更新内容

---------

Co-authored-by: Glavo <[email protected]>
This commit is contained in:
Wulian233andGlavo authored and GitHub committed 2025-06-11 00:57:30 +08:00
1 parent 9565c3bdfe
commit f1ea316bad
4 files changed
+7 -4

No files matched your search

@@ -51,7 +51,7 @@ public final class UpgradeDialog extends JFXDialogLayout {
Task.supplyAsync(Schedulers.io(), () -> {
Document document = Jsoup.parse(new URL(url), 30 * 1000);
Node node = document.selectFirst("#nowchange");
if (node == null)
if (node == null || !"h1".equals(node.nodeName()))
throw new IOException("Cannot find #nowchange in document");
HTMLRenderer renderer = new HTMLRenderer(uri -> {
@@ -60,6 +60,9 @@ public final class UpgradeDialog extends JFXDialogLayout {
});
do {
if ("h1".equals(node.nodeName()) && !"nowchange".equals(node.attr("id"))) {
break;
}
renderer.appendNode(node);
node = node.nextSibling();
} while (node != null);
@@ -1061,7 +1061,7 @@ datapack.title=World [%s] - Datapacks
web.failed=Failed to load page
web.open_in_browser=Do you want to open this address in a browser:\n%s
web.view_in_browser=View in browser
web.view_in_browser=View all in browser
world=Worlds
world.add=Add World
@@ -863,7 +863,7 @@ datapack.title=世界 [%s] - 資料包
web.failed=加載頁面失敗
web.open_in_browser=是否要在瀏覽器中開啟此連結:\n%s
web.view_in_browser=在瀏覽器中查看
web.view_in_browser=在瀏覽器中查看完整日誌
world=世界
world.add=新增世界
@@ -873,7 +873,7 @@ datapack.title=世界 [%s] - 数据包
web.failed=加载页面失败
web.open_in_browser=是否要在浏览器中打开此链接:\n%s
web.view_in_browser=在浏览器中查看
web.view_in_browser=在浏览器中查看完整日志
world=世界
world.add=添加世界