[patch] 优化版本管理显示 与 更新提示(修改表名信息)

This commit is contained in:
2025-10-10 10:53:16 +08:00
parent 982e896916
commit bb5ef9ccbf
2 changed files with 25 additions and 6 deletions

22
main.py
View File

@@ -725,20 +725,36 @@ class LoginWindow(QMainWindow):
QMessageBox.Yes | QMessageBox.No,
QMessageBox.Yes
)
if reply == QMessageBox.Yes:
self.trigger_update(download_url)
self.trigger_update(download_url, latest_version)
except Exception as e:
self.add_log(f"❌ 显示更新通知失败: {e}", "ERROR")
import traceback
self.add_log(f"详细错误: {traceback.format_exc()}", "ERROR")
def trigger_update(self, download_url):
def trigger_update(self, download_url, latest_version):
"""触发更新下载"""
import webbrowser
try:
# 检查下载地址是否有效
if not download_url or download_url.strip() == "":
self.add_log("⚠️ 下载地址为空,无法打开更新页面", "WARNING")
QMessageBox.warning(
self,
"下载地址缺失",
f"版本 {latest_version} 的下载地址暂未配置。\n\n请联系管理员或稍后再试。",
QMessageBox.Ok
)
return
self.add_log(f"📂 打开下载页面: {download_url}", "INFO")
webbrowser.open(download_url)
self.add_log("✅ 已打开更新下载页面", "SUCCESS")
except Exception as e:
self.add_log(f"❌ 打开下载页面失败: {e}", "ERROR")
import traceback
self.add_log(f"详细错误: {traceback.format_exc()}", "ERROR")
def main():