mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
refactor(render): 解决国内可能存在的资源访问问题,新增大陆资源和海外资源可选项,允许用户根据服务器位置选择不同的资源策略,并且允许自定义资源镜像站
- Updated language attributes in HTML templates to dynamically set based on `t2i_font_source`. - Replaced hardcoded Google Fonts links with dynamic links using `t2i_google_fonts_mirror` and `t2i_gstatic_mirror`. - Adjusted font-family declarations to conditionally include 'Noto Sans SC' and 'Noto Sans TC' based on the `t2i_font_source`. - Ensured consistent formatting and style across various templates including image, quote, topic, and user title items. - Added missing newlines at the end of several files for consistency.
This commit is contained in:
@@ -125,6 +125,21 @@ class MockConfigManager:
|
||||
def get_html_base_url(self) -> str:
|
||||
return ""
|
||||
|
||||
def get_t2i_font_source(self) -> str:
|
||||
return "Overseas"
|
||||
|
||||
def get_t2i_google_fonts_mirror(self) -> str:
|
||||
return "https://fonts.googleapis.com"
|
||||
|
||||
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_rendering_strategies(self) -> list:
|
||||
return []
|
||||
|
||||
|
||||
async def mock_get_user_avatar(user_id: str) -> str:
|
||||
# Return a known avatar URL for testing
|
||||
|
||||
Reference in New Issue
Block a user