sync update from LAN repo (source dhk-1 @ 3b1ec5b4)

This commit is contained in:
gozeros committed 2026-11-05 10:56:34 +08:00
1 parent da6521b6cb
commit 264e2200d6
995 files changed
+148105 -13399

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"