提交 693c645f 编写于 作者: H hjdhnx

增加自定义壁纸

上级 34cb097c
...@@ -204,7 +204,8 @@ def rules_raw(): ...@@ -204,7 +204,8 @@ def rules_raw():
@app.route('/config/<int:mode>') @app.route('/config/<int:mode>')
def config_render(mode): def config_render(mode):
html = render_template('config.txt',rules=getRules('js'),host=getHost(mode),mode=mode,jxs=getJxs()) print(dict(app.config))
html = render_template('config.txt',rules=getRules('js'),host=getHost(mode),mode=mode,jxs=getJxs(),config=dict(app.config))
response = make_response(html) response = make_response(html)
response.headers['Content-Type'] = 'application/json; charset=utf-8' response.headers['Content-Type'] = 'application/json; charset=utf-8'
return response return response
......
...@@ -19,4 +19,5 @@ SQLALCHEMY_ECHO = False # 打印sql语句 ...@@ -19,4 +19,5 @@ SQLALCHEMY_ECHO = False # 打印sql语句
JSON_AS_ASCII = False # jsonify返回的中文正常显示 JSON_AS_ASCII = False # jsonify返回的中文正常显示
# PLAY_URL = 'http://localhost:5705' # 匹配远程解析服务器链接 # PLAY_URL = 'http://localhost:5705' # 匹配远程解析服务器链接
# PLAY_URL = PLAY_URL.rstrip('/') # PLAY_URL = PLAY_URL.rstrip('/')
PLAY_DISABLE = False # 全局禁用播放解析 PLAY_DISABLE = False # 全局禁用播放解析
\ No newline at end of file WALL_PAPER = "https://picsum.photos/1280/720/?blur=10" # 自定义壁纸,可注释
\ No newline at end of file
{ {
{% if config.WALL_PAPER %}"wallpaper":"{{ config.WALL_PAPER }}",{% endif %}
"dr_count": {{rules.list|length}}, "dr_count": {{rules.list|length}},
"mode": {{ mode }}, "mode": {{ mode }},
"sites": [{% for rule in rules.list %}{% if mode == 0 %} "sites": [{% for rule in rules.list %}{% if mode == 0 %}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册