镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 06:26:47 +00:00
支持动态切换主题
这个提交包含在:
@@ -3,6 +3,7 @@ from toolbox import get_conf
|
||||
THEME, = get_conf('THEME')
|
||||
|
||||
def load_dynamic_theme(THEME):
|
||||
adjust_dynamic_theme = None
|
||||
if THEME == 'Chuanhu-Small-and-Beautiful':
|
||||
from .green import adjust_theme, advanced_css
|
||||
theme_declaration = "<h2 align=\"center\" class=\"small\">[Chuanhu-Small-and-Beautiful主题]</h2>"
|
||||
@@ -11,10 +12,12 @@ def load_dynamic_theme(THEME):
|
||||
theme_declaration = ""
|
||||
elif '/' in THEME:
|
||||
from .gradios import adjust_theme, advanced_css
|
||||
from .gradios import dynamic_set_theme
|
||||
adjust_dynamic_theme = dynamic_set_theme(THEME)
|
||||
theme_declaration = ""
|
||||
else:
|
||||
from .default import adjust_theme, advanced_css
|
||||
theme_declaration = ""
|
||||
return adjust_theme, advanced_css, theme_declaration
|
||||
return adjust_theme, advanced_css, theme_declaration, adjust_dynamic_theme
|
||||
|
||||
adjust_theme, advanced_css, theme_declaration = load_dynamic_theme(THEME)
|
||||
adjust_theme, advanced_css, theme_declaration, _ = load_dynamic_theme(THEME)
|
||||
在新工单中引用
屏蔽一个用户