Files
douyin_guaji-main/gui/components/config_manager.py
T
Your Name 26df350755 feat: Implement 30-minute timeout protection and unify path configurations
- Introduced a 30-minute timeout mechanism to prevent the script from getting stuck in invalid states, with configurable timeout settings.
- Unified path configurations across the project to enhance maintainability and avoid hardcoded paths.
- Updated documentation and flowcharts to reflect the new timeout feature and improved path management.
- Fixed issues with template and screenshot path configurations to ensure consistency across the project.
2025-12-28 14:47:31 +08:00

49 lines
929 B
Python

"""配置管理组件
包含配置加载、保存等功能的GUI组件。
"""
from __future__ import annotations
from typing import Any, Callable
import tkinter as tk
from tkinter import ttk
from gui.gui_core import read_config, write_config
def load_config_to_ui(
cfg: dict[str, Any],
vars_dict: dict[str, Any],
on_line: Callable[[str], None],
) -> None:
"""从配置文件加载到UI变量。
参数:
cfg: 配置字典
vars_dict: UI变量字典
on_line: 日志输出回调
"""
# TODO: 实现配置加载逻辑
# 临时从原文件导入
pass
def save_ui_to_config(
vars_dict: dict[str, Any],
on_line: Callable[[str], None],
) -> None:
"""将UI变量保存到配置文件。
参数:
vars_dict: UI变量字典
on_line: 日志输出回调
"""
# TODO: 实现配置保存逻辑
# 临时从原文件导入
pass