sync: 鍚屾灞€鍩熺綉鏈€鏂颁唬鐮?(source master @ b69568e4)

This commit is contained in:
gozeros committed 2026-10-21 14:51:31 +08:00
1 parent 4f7f07504a
commit 8bc8b0e082
1651 files changed
+278599 -11416

No files matched your search

@@ -0,0 +1,24 @@
"""Selected map engine for newly generated HTML pages."""
from __future__ import annotations
import logging
from typing import Literal
logger = logging.getLogger(__name__)
HtmlMapEngine = Literal["echarts", "leaflet"]
def html_map_engine() -> HtmlMapEngine:
"""Return the admin-selected HTML map engine, defaulting to ECharts."""
try:
from deerflow.config.system_settings import load_system_settings
engine = load_system_settings().html_map.engine
except Exception:
logger.debug("Failed to read the HTML map engine; using ECharts", exc_info=True)
return "echarts"
if engine == "leaflet":
return "leaflet"
return "echarts"