added char_xml download
fix bad call in luclient.get_lot_name Don't show rank for rank 0 fixes
This commit is contained in:
parent
3df9f143ed
commit
0066e0ea2d
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,4 +1,3 @@
|
||||
app/static/bootstrap-4.2.1/* linguist-vendored=true
|
||||
app/static/bootswatch-master/* linguist-vendored=true
|
||||
app/static/datatables/* linguist-vendored=true
|
||||
app/static/font-awesome/* linguist-vendored=true
|
||||
|
@ -33,7 +33,7 @@ docker run -d \
|
||||
* /app/luclient must be mapped to the location of an unpacked client
|
||||
* you only need `res/` and `locale/` from the client, but dropping the whole cleint in there won't hurt
|
||||
* Use `fdb_to_sqlite.py` in lcdr's utilities on `res/cdclient.fdb` in the unpacked client to convert the client database to `cdclient.sqlite`
|
||||
* Put teh resulting `cdclient.sqlite` in the res folder: `res/cdclient.sqlite`
|
||||
* Put the resulting `cdclient.sqlite` in the res folder: `res/cdclient.sqlite`
|
||||
* unzip `res/brickdb.zip` in-place
|
||||
* **Docker will do this for you**
|
||||
* you should have new folders and files in the following places:
|
||||
|
@ -1,4 +1,4 @@
|
||||
from flask import render_template, Blueprint, redirect, url_for, request, abort, flash
|
||||
from flask import render_template, Blueprint, redirect, url_for, request, abort, flash, make_response
|
||||
from flask_user import login_required, current_user
|
||||
import json
|
||||
from datatables import ColumnDT, DataTables
|
||||
@ -87,6 +87,47 @@ def view(id):
|
||||
)
|
||||
|
||||
|
||||
@character_blueprint.route('/view_xml/<id>', methods=['GET'])
|
||||
@login_required
|
||||
def view_xml(id):
|
||||
|
||||
character_data = CharacterInfo.query.filter(CharacterInfo.id == id).first()
|
||||
|
||||
if character_data == {}:
|
||||
abort(404)
|
||||
return
|
||||
|
||||
character_xml = CharacterXML.query.filter(
|
||||
CharacterXML.id==id
|
||||
).first().xml_data
|
||||
|
||||
response = make_response(character_xml)
|
||||
response.headers.set('Content-Type', 'text/xml')
|
||||
return response
|
||||
|
||||
@character_blueprint.route('/get_xml/<id>', methods=['GET'])
|
||||
@login_required
|
||||
def get_xml(id):
|
||||
|
||||
character_data = CharacterInfo.query.filter(CharacterInfo.id == id).first()
|
||||
|
||||
if character_data == {}:
|
||||
abort(404)
|
||||
return
|
||||
|
||||
character_xml = CharacterXML.query.filter(
|
||||
CharacterXML.id==id
|
||||
).first().xml_data
|
||||
|
||||
response = make_response(character_xml)
|
||||
response.headers.set('Content-Type', 'attachment/xml')
|
||||
response.headers.set(
|
||||
'Content-Disposition',
|
||||
'attachment',
|
||||
filename=f"{character_data.name}.xml"
|
||||
)
|
||||
return response
|
||||
|
||||
@character_blueprint.route('/restrict/<bit>/<id>', methods=['GET'])
|
||||
@login_required
|
||||
@gm_level(3)
|
||||
|
@ -233,7 +233,7 @@ def register_luclient_jinja_helpers(app):
|
||||
@app.template_filter('get_lot_name')
|
||||
def get_lot_name(lot_id):
|
||||
name = translate_from_locale(f'Objects_{lot_id}_name')
|
||||
if name == translate_from_locale(f'Objects_{lot_id}_name'):
|
||||
if name == f'Objects_{lot_id}_name':
|
||||
intermed = query_cdclient(
|
||||
'select * from Objects where id = ?',
|
||||
[lot_id],
|
||||
|
@ -747,11 +747,8 @@
|
||||
// let vnh = new VertexNormalsHelper( mesh, 5 );
|
||||
// scene.add( vnh );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,8 @@
|
||||
<br/>
|
||||
--------------------------------
|
||||
<br/>
|
||||
{{ ("ItemSets_" ~ item_set[0] ~ "_kitName")|lu_translate }}: Rank {{ item_set[4] }}<br/>
|
||||
|
||||
{{ ("ItemSets_" ~ item_set[0] ~ "_kitName")|lu_translate }}{% if item_set[4]|int > 0%}: Rank {{ item_set[4] }}{% endif %}<br/>
|
||||
{% if item_set[5] %}
|
||||
<img src='/luclient/get_icon_iconid/{{item_set[5]}}'
|
||||
alt='Kit Image'
|
||||
|
Loading…
Reference in New Issue
Block a user