소스 검색

new achive

Nattiden 2 년 전
부모
커밋
35a8205c82

+ 1 - 0
Libraries/Versions/Others/__LIBRARY__.yml

@@ -1,4 +1,5 @@
 name: april-fools-versions
 fill:
+  version-type-id: April-Fools
   version-type: ???版
   wiki-link: https://zh.minecraft.wiki/w/${version-id}

+ 1 - 0
Libraries/Versions/Pre-Release/__LIBRARY__.yml

@@ -1,4 +1,5 @@
 name: pre-release-versions
 fill:
+  version-type-id: Pre-Release
   version-type: 预发布版
   wiki-link: https://zh.minecraft.wiki/w/Java版${version-id}

+ 1 - 0
Libraries/Versions/Release-Candidate/__LIBRARY__.yml

@@ -1,4 +1,5 @@
 name: release-candidate
 fill:
+  version-type-id: Release-Candidate
   version-type: 发布候选版
   wiki-link: https://zh.minecraft.wiki/w/Java版${version-id}

+ 4 - 0
Libraries/Versions/Release/1.20.2.md

@@ -1,3 +1,7 @@
+---
+cats: ['1.21','1.20','1.20.2']
+translator: 最亮的信标
+---
 ## 新特性
 * 加入了玩家皮肤与用户名举报功能
 ## 更改

+ 4 - 0
Libraries/Versions/Release/1.20.3.md

@@ -1,3 +1,7 @@
+---
+cats: ['1.21','1.20','1.20.3']
+translator: 最亮的信标
+---
 ## 更改
 * 饰纹陶罐现在能储存物品,也能被弹射物击碎
 * 当玩家在用盾牌格挡时,在第三人称视角下,持有盾牌的手臂现在跟随玩家目视的方向

+ 4 - 0
Libraries/Versions/Release/1.20.4.md

@@ -1 +1,5 @@
+---
+cats: ['1.21','1.20','1.20.4']
+translator: 最亮的信标
+---
 * 修了个纹饰陶罐内物品重新加载后会消失的漏洞

+ 1 - 0
Libraries/Versions/Release/__LIBRARY__.yml

@@ -1,4 +1,5 @@
 name: release-versions
 fill:
+  version-type-id: Release
   version-type: 正式版
   wiki-link: https://zh.minecraft.wiki/w/Java版${version-id}

+ 1 - 0
Libraries/Versions/Snapshot/__LIBRARY__.yml

@@ -1,4 +1,5 @@
 name: snapshots
 fill:
+  version-type-id: Snapshot
   version-type: 快照版
   wiki-link: https://zh.minecraft.wiki/w/${version-id}

+ 2 - 2
Pages/1.21.yml

@@ -4,5 +4,5 @@ alias:
 display_name: 1.21存档
 cards:
  - archive_noticebar
- - T:Separator | content = 历史版本
- - ${@VersionCategory|1.21}
+ - T:VersionAchiveList | cat = 1.21
+ - NewFooter

+ 3 - 0
Resources/Components/VersionLinks/April-Fools.xaml

@@ -0,0 +1,3 @@
+<local:MyListItem Margin="10,1,10,1"
+	Logo="pack://application:,,,/images/Blocks/GoldBlock.png" Title="${version-id}" Info="${version-type}" 
+	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />

+ 3 - 0
Resources/Components/VersionLinks/Future-Release.xaml

@@ -0,0 +1,3 @@
+<local:MyListItem Margin="10,1,10,1"
+	Logo="pack://application:,,,/images/Blocks/Cobblestone.png" Title="尚未发布的版本" Info="未来的正式版" 
+	EventType="弹出窗口" EventData="未来的正式版|该版本尚未发布" Type="Clickable"/>

+ 3 - 0
Resources/Components/VersionLinks/Pre-Release.xaml

@@ -0,0 +1,3 @@
+<local:MyListItem Margin="40,1,10,1"
+	Logo="pack://application:,,,/images/Blocks/GrassPath.png" Title="${version-id}" Info="${version-type}" 
+	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />

+ 3 - 0
Resources/Components/VersionLinks/Release-Candidate.xaml

@@ -0,0 +1,3 @@
+<local:MyListItem Margin="40,1,10,1"
+	Logo="pack://application:,,,/images/Blocks/GrassPath.png" Title="${version-id}" Info="${version-type}" 
+	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />

+ 3 - 0
Resources/Components/VersionLinks/Release.xaml

@@ -0,0 +1,3 @@
+<local:MyListItem Margin="10,1,10,1"
+	Logo="pack://application:,,,/images/Blocks/Grass.png" Title="${version-id}" Info="${version-type}" 
+	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />

+ 3 - 0
Resources/Components/VersionLinks/Snapshot.xaml

@@ -0,0 +1,3 @@
+<local:MyListItem Margin="40,1,10,1"
+	Logo="pack://application:,,,/images/Blocks/CommandBlock.png" Title="${version-id}" Info="${version-type}" 
+	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />

+ 24 - 0
Resources/Scripts/VersionAchiveList.py

@@ -0,0 +1,24 @@
+from Core.project import Project
+from Core.module_manager import invoke_module, until_loaded
+from Core.code_formatter import format_code
+
+until_loaded('MinecraftVersions') # 需求前置 MinecraftVersions
+MANIFSET = invoke_module('MinecraftVersions','get_manifset')()
+FULL_VERSIONS = MANIFSET.get('versions')
+ID_LIST = [version.get('id') for version in FULL_VERSIONS]
+
+def script(cat_name,proj:Project,card,**_):
+    cat_name = format_code(code = cat_name,card=card,project=proj)
+    cards = list(filter(lambda card:isinstance(card.get('cats'),list)
+           and cat_name in card.get('cats'), proj.get_all_card()))
+    code = '<StackPanel Margin="8,2,8,20">'
+    res = proj.resources
+    cards.sort(key=lambda card:ID_LIST.index(format_code(card['version-id'],
+                                                         card=card,project=proj)))
+    if len(cards) > 0 and cards[0]['version-type-id'] not in ['Release','April-Fools']:
+        code += res.components['VersionLinks/Future-Release']
+    for vercard in cards:
+        code += format_code(code = res.components[f'VersionLinks/{vercard['version-type-id']}'],
+                            card=vercard,project=proj)
+    code += '</StackPanel>'
+    return code

+ 7 - 0
Resources/Templates/VersionAchiveList.yml

@@ -0,0 +1,7 @@
+components:
+ - $VersionAchiveList|${cat}
+base: Card
+fill:
+   title: 版本列表
+cover:
+   canswap: false