rename bison_theme_use_browser -> bison_use_browser

This commit is contained in:
felinae98
2024-05-06 19:12:46 +08:00
parent d8f48fc490
commit cf50e9f288
9 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ class ThemeManager:
logger.trace(f"Registering theme: {theme}")
if theme.name in self.__themes:
raise ThemeRegistrationError(f"Theme {theme.name} duplicated registration")
if theme.need_browser and not plugin_config.bison_theme_use_browser:
if theme.need_browser and not plugin_config.bison_use_browser:
logger.opt(colors=True).warning(f"Theme <b><u>{theme.name}</u></b> requires browser, but not allowed")
self.__themes[theme.name] = theme
logger.opt(colors=True).success(f"Theme <b><u>{theme.name}</u></b> registered")
+2 -2
View File
@@ -23,8 +23,8 @@ class Theme(ABC, BaseModel):
async def is_support_render(self, post: "AbstractPost") -> bool:
"""是否支持渲染该类型的Post"""
if self.need_browser and not plugin_config.bison_theme_use_browser:
logger.warning(f"Theme {self.name} need browser, but `bison_theme_use_browser` is False")
if self.need_browser and not plugin_config.bison_use_browser:
logger.warning(f"Theme {self.name} need browser, but `bison_use_browser` is False")
return False
return True