feat(core): 优化隐私协议管理并添加日志功能

- 重构 PrivacyManager 类,增加隐私协议版本检查和用户同意状态管理
- 在主窗口初始化时获取云端配置,提高效率
- 添加日志功能,记录应用启动、隐私协议加载等关键事件
- 优化错误处理和用户提示信息
This commit is contained in:
hyb-oyqq
2025-07-31 14:38:12 +08:00
parent 5ad4062346
commit c941c03446
8 changed files with 367 additions and 65 deletions

View File

@@ -41,8 +41,14 @@ class DebugManager:
Args:
checked: 是否启用调试模式
"""
print(f"Toggle debug mode: {checked}")
self.main_window.config["debug_mode"] = checked
self.main_window.save_config(self.main_window.config)
# 更新打开log文件按钮状态
if hasattr(self, 'ui_manager') and hasattr(self.ui_manager, 'open_log_action'):
self.ui_manager.open_log_action.setEnabled(checked)
if checked:
self.start_logging()
else: