feat(core): 更新配置管理和文件忽略规则

- 修改.gitignore文件,添加对Python缓存文件、虚拟环境和系统文件的忽略规则,提升项目整洁性。
- 更新主窗口和相关模块的导入路径,确保从新的配置模块中正确导入配置项,增强代码结构的清晰度。
- 删除不再使用的图片和模块,优化项目资源,减少冗余文件,提升维护效率。
This commit is contained in:
hyb-oyqq
2025-08-11 16:13:58 +08:00
parent 6a4c6ca1f1
commit 4d847f58d0
65 changed files with 50 additions and 8164 deletions

View File

@@ -11,7 +11,7 @@ import re
from PySide6.QtGui import QIcon, QPixmap
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QDialog, QVBoxLayout, QHBoxLayout, QLabel, QPushButton, QProgressBar
from data.config import APP_NAME, CONFIG_FILE
from config.config import APP_NAME, CONFIG_FILE
from utils.logger import setup_logger
import datetime
import traceback
@@ -144,7 +144,7 @@ def msgbox_frame(title, text, buttons=QtWidgets.QMessageBox.StandardButton.NoBut
msg_box.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
# 直接加载图标文件
icon_path = resource_path(os.path.join("IMG", "ICO", "icon.png"))
icon_path = resource_path(os.path.join("assets", "images", "ICO", "icon.png"))
if os.path.exists(icon_path):
pixmap = QPixmap(icon_path)
if not pixmap.isNull():
@@ -266,7 +266,7 @@ class HashManager:
# 尝试检测是否处于调试模式
try:
from data.config import CACHE
from config.config import CACHE
debug_file = os.path.join(os.path.dirname(CACHE), "debug_mode.txt")
debug_mode = os.path.exists(debug_file)
except:
@@ -316,7 +316,7 @@ class HashManager:
# 尝试检测是否处于调试模式
try:
from data.config import CACHE
from config.config import CACHE
debug_file = os.path.join(os.path.dirname(CACHE), "debug_mode.txt")
debug_mode = os.path.exists(debug_file)
except: