refactor(core): 优化消息框显示和下载流程

- 修改 hash_pop_window 函数,增加检查类型参数
- 优化 Cloudflare 优选失败和成功消息框显示
- 调整下载前后检查的消息框内容
- 改进解压缩后的文件检查流程
This commit is contained in:
hyb-oyqq
2025-07-24 16:29:30 +08:00
parent 0cf9f5e6c2
commit f86cb7aa7e
3 changed files with 80 additions and 19 deletions

View File

@@ -99,8 +99,25 @@ class HashManager:
print(f"Error calculating hash for {file_path}: {e}")
return results
def hash_pop_window(self):
msg_box = msgbox_frame(f"通知 - {APP_NAME}", "\n正在检验文件状态...\n")
def hash_pop_window(self, check_type="default"):
"""显示文件检验窗口
Args:
check_type: 检查类型,可以是 'pre'(预检查), 'after'(后检查), 'extraction'(解压后检查)
Returns:
QMessageBox: 消息框实例
"""
message = "\n正在检验文件状态...\n"
if check_type == "pre":
message = "\n正在检查游戏文件以确定需要安装的补丁...\n"
elif check_type == "after":
message = "\n正在检验文件完整性...\n"
elif check_type == "extraction":
message = "\n正在验证解压文件的完整性...\n"
msg_box = msgbox_frame(f"通知 - {APP_NAME}", message)
msg_box.open()
QtWidgets.QApplication.processEvents()
return msg_box