refactor(gui): 抽 realtime_tab UI 创建到 components/realtime_tab (2037 → 1878)
This commit is contained in:
1 parent
e784efd5f8
commit
29cef2c578
3 files changed
+226
-174
No files matched your search
@@ -25,6 +25,8 @@ GUI_APP = ROOT / "gui" / "gui_app.py"
|
||||
# 但 GUI 启动时仍通过 main() 内的薄包装调用它们。本工具的同步检查需要从
|
||||
# config_io.py 抽 cfg/cfg2 赋值,从 gui_app.py 抽 gui_cfg 引用(仍在 main 里)。
|
||||
GUI_CONFIG_IO = ROOT / "gui" / "components" / "config_io.py"
|
||||
# realtime_tab UI 抽到 components/realtime_tab.py 后,gui_cfg 引用也跟过去了。
|
||||
GUI_REALTIME_TAB = ROOT / "gui" / "components" / "realtime_tab.py"
|
||||
WEB_INDEX = ROOT / "webui" / "index.html"
|
||||
MANIFEST_PATH = ROOT / "tools" / "dev" / "web_gui_config_manifest.json"
|
||||
|
||||
@@ -106,11 +108,14 @@ def extract_web_keys(source: str) -> set[str]:
|
||||
def build_manifest() -> dict[str, object]:
|
||||
gui_source = _read(GUI_APP)
|
||||
config_io_source = _read(GUI_CONFIG_IO)
|
||||
realtime_tab_source = _read(GUI_REALTIME_TAB)
|
||||
web_source = _read(WEB_INDEX)
|
||||
|
||||
# save/load 函数现在在 components/config_io.py 里;gui_cfg 引用仍在 gui_app.py
|
||||
# save/load 函数现在在 components/config_io.py 里;gui_cfg 引用在 realtime_tab.py
|
||||
gui_saved = extract_gui_saved_keys(config_io_source)
|
||||
gui_loaded = extract_gui_loaded_keys(config_io_source + "\n" + gui_source)
|
||||
gui_loaded = extract_gui_loaded_keys(
|
||||
config_io_source + "\n" + gui_source + "\n" + realtime_tab_source
|
||||
)
|
||||
web_keys = extract_web_keys(web_source)
|
||||
|
||||
expected_gui_keys = web_keys - GUI_RUNTIME_ONLY_KEYS
|
||||
|
||||
Reference in new issue
Block a user