mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
fix(ATRI): 将镜像地址配置注入到子模板渲染上下文中,解决子模板中变量未定义导致的问题
This commit is contained in:
+11
-4
@@ -125,8 +125,8 @@ class MockConfigManager:
|
||||
def get_html_base_url(self) -> str:
|
||||
return ""
|
||||
|
||||
def get_t2i_font_source(self) -> str:
|
||||
return "Overseas"
|
||||
def get_t2i_atri_font_mirror(self) -> str:
|
||||
return "https://tc.ciallo.ccwu.cc"
|
||||
|
||||
def get_t2i_google_fonts_mirror(self) -> str:
|
||||
return "https://fonts.googleapis.com"
|
||||
@@ -134,8 +134,8 @@ class MockConfigManager:
|
||||
def get_t2i_gstatic_mirror(self) -> str:
|
||||
return "https://fonts.gstatic.com"
|
||||
|
||||
def get_t2i_atri_font_mirror(self) -> str:
|
||||
return "https://tc.ciallo.ccwu.cc"
|
||||
def get_t2i_font_source(self) -> str:
|
||||
return "Overseas"
|
||||
|
||||
def get_t2i_rendering_strategies(self) -> list:
|
||||
return []
|
||||
@@ -325,6 +325,13 @@ async def debug_render(
|
||||
"image_template.html", **render_payload
|
||||
)
|
||||
|
||||
# 复用最终 HTML 中所有内联头像资源,并注入复用样式
|
||||
final_html = generator._reuse_avatars_in_final_html(
|
||||
final_html,
|
||||
render_payload.get("avatar_reuse_registry", {}),
|
||||
render_payload.get("avatar_reuse_aliases", {}),
|
||||
)
|
||||
|
||||
# 6. Save to file
|
||||
output_path = Path(output_file)
|
||||
output_path.write_text(final_html, encoding="utf-8")
|
||||
|
||||
Reference in New Issue
Block a user