Răsfoiți Sursa

better achieve list

Nattiden 2 ani în urmă
părinte
comite
cc6ed8f658

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

@@ -2,4 +2,6 @@ name: april-fools-versions
 fill:
   version-type-id: April-Fools
   version-type: 未知版本
-  wiki-link: https://zh.minecraft.wiki/w/${version-id}
+  wiki-link: https://zh.minecraft.wiki/w/${version-id}
+  list-icon: "pack://application:,,,/images/Blocks/GoldBlock.png"
+  important-version: true

+ 1 - 0
Libraries/Versions/Pre-Release/1.19.1-pre1.md

@@ -1,4 +1,5 @@
 ---
 cats: ['1.19','1.19.1']
+lack: true
 ---
 该页面暂时缺失

+ 1 - 0
Libraries/Versions/Pre-Release/1.19.1-pre2.md

@@ -1,4 +1,5 @@
 ---
 cats: ['1.19','1.19.1']
+lack: true
 ---
 该页面暂时缺失

+ 1 - 0
Libraries/Versions/Pre-Release/1.19.1-pre3.md

@@ -1,4 +1,5 @@
 ---
 cats: ['1.19','1.19.1']
+lack: true
 ---
 该页面暂时缺失

+ 1 - 0
Libraries/Versions/Pre-Release/1.19.1-pre4.md

@@ -1,4 +1,5 @@
 ---
 cats: ['1.19','1.19.1']
+lack: true
 ---
 该页面暂时缺失

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

@@ -2,4 +2,6 @@ name: pre-release-versions
 fill:
   version-type-id: Pre-Release
   version-type: 预发布版
-  wiki-link: https://zh.minecraft.wiki/w/Java版${version-id}
+  wiki-link: https://zh.minecraft.wiki/w/Java版${version-id}
+  list-icon: "pack://application:,,,/images/Blocks/GrassPath.png"
+  important-version: false

+ 1 - 0
Libraries/Versions/Release-Candidate/1.19-rc2.md

@@ -1,4 +1,5 @@
 ---
 cats: ['1.19']
+lack: true
 ---
 该页面暂时缺失

+ 1 - 0
Libraries/Versions/Release-Candidate/1.19.1-rc1.md

@@ -1,4 +1,5 @@
 ---
 cats: ['1.19','1.19.1']
+lack: true
 ---
 该页面暂时缺失

+ 1 - 0
Libraries/Versions/Release-Candidate/1.19.2-rc2.md

@@ -1,5 +1,6 @@
 ---
 cats: ['1.19','1.19.2']
+version-image-link: https://pic.imgdb.cn/item/64db978d661c6c8e54dae810.jpg
 ---
 ## 修复
 * 别看了就是修了个崩溃问题

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

@@ -2,4 +2,6 @@ name: release-candidate
 fill:
   version-type-id: Release-Candidate
   version-type: 发布候选版
-  wiki-link: https://zh.minecraft.wiki/w/Java版${version-id}
+  wiki-link: https://zh.minecraft.wiki/w/Java版${version-id}
+  list-icon: "pack://application:,,,/images/Blocks/GrassPath.png"
+  important-version: false

+ 5 - 0
Libraries/Versions/Release/1.19.md

@@ -0,0 +1,5 @@
+---
+cats: ['1.19']
+lack: true
+---
+该页面暂时缺失

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

@@ -2,4 +2,6 @@ name: release-versions
 fill:
   version-type-id: Release
   version-type: 正式版
-  wiki-link: https://zh.minecraft.wiki/w/Java版${version-id}
+  wiki-link: https://zh.minecraft.wiki/w/Java版${version-id}
+  list-icon: "pack://application:,,,/images/Blocks/Grass.png"
+  important-version: true

+ 1 - 0
Libraries/Versions/Snapshot/22w24a.md

@@ -1,4 +1,5 @@
 ---
 cats: ['1.19','1.19.1']
+lack: true
 ---
 该页面暂时缺失

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

@@ -2,4 +2,6 @@ name: snapshots
 fill:
   version-type-id: Snapshot
   version-type: 快照版
-  wiki-link: https://zh.minecraft.wiki/w/${version-id}
+  wiki-link: https://zh.minecraft.wiki/w/${version-id}
+  list-icon: "pack://application:,,,/images/Blocks/CommandBlock.png"
+  important-version: false

+ 6 - 2
Modules/VersionAchiveList.py

@@ -16,9 +16,13 @@ def version_achive_list(cat_name,proj:Project,card,**_):
     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']
+        code += res.components['VersionLinks/Future']
     for vercard in cards:
-        code += format_code(code = res.components[f'VersionLinks/{vercard["version-type-id"]}'],
+        if vercard.get('lack'):
+            code += format_code(code = res.components['VersionLinks/Lack'],
+                            card=vercard,project=proj)
+        else:
+            code += format_code(code = res.components['VersionLinks/Common'],
                             card=vercard,project=proj)
     code += '</StackPanel>'
     return code

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

@@ -1,3 +0,0 @@
-<local:MyListItem Margin="10,1,10,1" ToolTip="${version-type} 点击查看该版本更新日志"
-	Logo="pack://application:,,,/images/Blocks/GoldBlock.png" Title="${version-id}" Info="${@IF|${intro}|${intro}|${version-type}}"
-	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />

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

@@ -0,0 +1,3 @@
+<local:MyListItem Margin="${@IF|${important-version}|10,1,10,1|40,1,10,1}" ToolTip="${version-type} 点击查看该版本更新日志"
+	Logo="${list-icon}" Title="${version-id}" Info="${@IF|${intro}|${intro}|${version-type}}"
+	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />

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


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

@@ -0,0 +1,3 @@
+<local:MyListItem Margin="${@IF|${important-version}|10,1,10,1|40,1,10,1}" ToolTip="${version-type},新闻主页中缺少该版本存档"
+	Logo="pack://application:,,,/images/Blocks/Cobblestone.png" Title="${version-id}" Info="[存档缺失] ${@IF|${intro}|${intro}|${version-type}}"
+	EventType="弹出窗口" EventData="无法打开|新闻主页缺少该版本存档" Type="Clickable" />

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

@@ -1,3 +0,0 @@
-<local:MyListItem Margin="40,1,10,1" ToolTip="${version-type} 点击查看该版本更新日志"
-	Logo="pack://application:,,,/images/Blocks/GrassPath.png" Title="${version-id}" Info="${@IF|${intro}|${intro}|${version-type}}" 
-	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />

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

@@ -1,3 +0,0 @@
-<local:MyListItem Margin="40,1,10,1" ToolTip="${version-type} 点击查看该版本更新日志"
-	Logo="pack://application:,,,/images/Blocks/GrassPath.png" Title="${version-id}" Info="${@IF|${intro}|${intro}|${version-type}}" 
-	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />

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

@@ -1,3 +0,0 @@
-<local:MyListItem Margin="10,1,10,1" ToolTip="${version-type} 点击查看该版本更新日志"
-	Logo="pack://application:,,,/images/Blocks/Grass.png" Title="${version-id}" Info="${@IF|${intro}|${intro}|${version-type}}" 
-	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />

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

@@ -1,3 +0,0 @@
-<local:MyListItem Margin="40,1,10,1" ToolTip="${version-type} 点击查看该版本更新日志"
-	Logo="pack://application:,,,/images/Blocks/CommandBlock.png" Title="${version-id}" Info="${@IF|${intro}|${intro}|${version-type}}" 
-	EventType="打开帮助" EventData="https://news.bugjump.net/VersionDetail.json?ver=${version-id}" Type="Clickable" />