mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2026-01-01 11:40:45 +00:00
feat(core): 更新配置管理和文件忽略规则
- 修改.gitignore文件,添加对Python缓存文件、虚拟环境和系统文件的忽略规则,提升项目整洁性。 - 更新主窗口和相关模块的导入路径,确保从新的配置模块中正确导入配置项,增强代码结构的清晰度。 - 删除不再使用的图片和模块,优化项目资源,减少冗余文件,提升维护效率。
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from .url_censor import censor_url
|
||||
import logging
|
||||
import os
|
||||
from data.config import CACHE
|
||||
from config.config import CACHE
|
||||
|
||||
class URLCensorFormatter(logging.Formatter):
|
||||
"""自定义的日志格式化器,用于隐藏日志消息中的URL"""
|
||||
@@ -72,7 +72,7 @@ def setup_logger(name):
|
||||
logging.Logger: 配置好的logger对象
|
||||
"""
|
||||
# 导入LOG_FILE
|
||||
from data.config import LOG_FILE
|
||||
from config.config import LOG_FILE
|
||||
|
||||
# 创建logger
|
||||
logger = logging.getLogger(name)
|
||||
|
||||
Reference in New Issue
Block a user