apparently some skills have no icon

add jinja debug helper
restrict char_xml to gm 9
strip quoted from local desc
This commit is contained in:
Aaron Kimbre 2022-02-03 16:37:34 -06:00
parent c6d624e154
commit cf359e2c6b
4 changed files with 14 additions and 4 deletions

View File

@ -57,6 +57,10 @@ def create_app():
if cdclient is not None: if cdclient is not None:
cdclient.close() cdclient.close()
@app.template_filter('debug')
def debug(text):
print(text)
# add the commands to flask cli # add the commands to flask cli
app.cli.add_command(init_db) app.cli.add_command(init_db)
app.cli.add_command(init_accounts) app.cli.add_command(init_accounts)

View File

@ -89,6 +89,7 @@ def view(id):
@character_blueprint.route('/view_xml/<id>', methods=['GET']) @character_blueprint.route('/view_xml/<id>', methods=['GET'])
@login_required @login_required
@gm_level(9)
def view_xml(id): def view_xml(id):
character_data = CharacterInfo.query.filter(CharacterInfo.id == id).first() character_data = CharacterInfo.query.filter(CharacterInfo.id == id).first()
@ -107,6 +108,7 @@ def view_xml(id):
@character_blueprint.route('/get_xml/<id>', methods=['GET']) @character_blueprint.route('/get_xml/<id>', methods=['GET'])
@login_required @login_required
@gm_level(9)
def get_xml(id): def get_xml(id):
character_data = CharacterInfo.query.filter(CharacterInfo.id == id).first() character_data = CharacterInfo.query.filter(CharacterInfo.id == id).first()

View File

@ -271,6 +271,8 @@ def register_luclient_jinja_helpers(app):
)[0] )[0]
if desc in ("", None): if desc in ("", None):
desc = None desc = None
if desc:
desc = desc.strip('"')
return desc return desc
@app.template_filter('get_item_set') @app.template_filter('get_item_set')

View File

@ -27,10 +27,12 @@
{% set skill_desc = skill[0]|get_skill_desc %} {% set skill_desc = skill[0]|get_skill_desc %}
{% if "IP" not in skill_desc and "AP" not in skill_desc and "LP" not in skill_desc and skill[0]|string not in skill_desc %} {% if "IP" not in skill_desc and "AP" not in skill_desc and "LP" not in skill_desc and skill[0]|string not in skill_desc %}
<br/> <br/>
{% if skill[1]%}
<img src='{{ url_for('luclient.get_icon_iconid', id=skill[1]) }}' <img src='{{ url_for('luclient.get_icon_iconid', id=skill[1]) }}'
alt='Skill: ' alt='Skill: '
width='32' width='32'
height='32'> height='32'>
{% endif %}
{{ skill[0]|get_skill_desc }} {{ skill[0]|get_skill_desc }}
<br/> <br/>
{% endif %} {% endif %}