sync update from LAN repo (source master @ ca48c4ec)

This commit is contained in:
gozeros committed 2026-11-05 10:53:54 +08:00
1 parent 8bc8b0e082
commit ea9dcff9c0
873 files changed
+107866 -14011

No files matched your search

@@ -1,20 +1,26 @@
"""Browser runtime configuration for generated HTML artifacts."""
"""Fallback browser runtime configuration for generated HTML artifacts.
The settings dialog stores the addresses that new pages actually use. These
fields remain so an older ``config.yaml`` still loads; they apply only when
the dialog has not saved a value yet.
"""
from pydantic import BaseModel, Field
DEFAULT_HTML_RUNTIME_BASE_URL = "http://localhost:8001/api/public/html-runtime"
DEFAULT_HTML_MAP_TILE_URL = "https://mt0.google.com/vt/lyrs=m&hl=zh-CN&x={x}&y={y}&z={z}"
class HtmlRuntimeConfig(BaseModel):
"""Resources used by standalone HTML pages generated in the sandbox."""
"""Legacy fallback used before the settings dialog saves an address."""
base_url: str = Field(
default="http://localhost:8001/api/public/html-runtime",
default=DEFAULT_HTML_RUNTIME_BASE_URL,
min_length=1,
description="Browser-accessible Gateway base URL for generated HTML runtime files",
description="Fallback browser-accessible Gateway base URL for generated HTML runtime files",
)
map_tile_url: str = Field(
default=DEFAULT_HTML_MAP_TILE_URL,
min_length=1,
description="Leaflet tile URL template used when HTML maps use the map-webpage engine",
description="Fallback Leaflet tile URL template used when HTML maps use the map-webpage engine",
)