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.
This commit is contained in:
1 parent
686dde5cc0
commit
26df350755
64 files changed
+7568
-414
No files matched your search
@@ -0,0 +1,44 @@
|
||||
"""图像查看组件
|
||||
|
||||
包含图像预览、列表等功能的GUI组件。
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Callable
|
||||
import os
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
from PIL import Image, ImageTk
|
||||
|
||||
|
||||
def create_image_viewer(
|
||||
parent: Any,
|
||||
on_line: Callable[[str], None],
|
||||
) -> tuple[Any, Callable[[], None], Callable[[], None]]:
|
||||
"""创建图像查看器组件。
|
||||
|
||||
参数:
|
||||
parent: 父容器
|
||||
on_line: 日志输出回调
|
||||
|
||||
返回:
|
||||
(image_var, update_image_list_func, refresh_preview_func)
|
||||
"""
|
||||
image_var = tk.StringVar()
|
||||
|
||||
def update_image_list(refresh_after: bool = True) -> None:
|
||||
"""更新图像列表。"""
|
||||
# TODO: 从原文件迁移函数实现
|
||||
pass
|
||||
|
||||
def refresh_preview() -> None:
|
||||
"""刷新图像预览。"""
|
||||
# TODO: 从原文件迁移函数实现
|
||||
pass
|
||||
|
||||
return image_var, update_image_list, refresh_preview
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user