viewer now has (non-functional) buttons for rotation, flip, fullscreen, and Ive put icons.svg into the repo as its hand-crafted upstream content so I cant really just download it anymore

This commit is contained in:
2021-07-31 22:40:12 +10:00
parent 6ce92c3398
commit 902830ad95
2 changed files with 218 additions and 10 deletions

View File

@@ -205,33 +205,60 @@
</div id="/form-row">
{# use this for color of toggles: https://www.codeply.com/p/4sL9uhevwJ #}
<div class="row">
<span class="d-flex col-1 justify-content-end my-auto">Show:</span>
<div class="d-flex form-check form-switch border border-info rounded col-1 my-auto py-1 justify-content-center">
{# this whole div, just takes up the same space as the left button and is hidden for alignment only #}
<div class="col col-auto">
<button class="btn btn-outline-info" disabled style="visibility:hidden">
<svg width="16" height="16" fill="currentColor"><use xlink:href="{{url_for('static', filename='upstream/icons.svg')}}#next"/></svg>
</button>
</div>
<span class="col col-auto my-auto">Show:</span>
<div class="d-flex form-check form-switch border border-info rounded col col-auto my-auto py-1 justify-content-center">
<input class="form-check-input" type="checkbox" id="fname" onChange="$('.figure-caption').toggle()"
{% if sels['fname']=='true' %} checked {% endif %} >
<label class="form-check-label" for="fname">Filename</label>
</div>
<div class="d-flex form-check form-switch border border-info rounded col-1 my-auto py-1 justify-content-center">
<div class="d-flex form-check form-switch border border-info rounded col col-auto my-auto py-1 justify-content-center">
<input class="form-check-input" type="checkbox" onChange="FaceToggle()" id="faces"
{% if not obj.file_details.faces %} disabled {% endif %}
{% if sels['faces']=='true' %} checked {% endif %}
>
<label class="form-check-label" for="faces">Faces</label>
</div>
<div class="d-flex form-check form-switch border border-info rounded col-1 my-auto py-1 justify-content-center">
<div class="d-flex form-check form-switch border border-info rounded col col-auto my-auto py-1 justify-content-center">
<input class="form-check-input" type="checkbox" onChange="DrawImg()" id="distance"
{% if not obj.file_details.faces or sels['faces']=='false' %} disabled {% endif %}
{% if sels['distance']=='true' %} checked {% endif %}
>
<label class="form-check-label" for="distance">Distance</label>
</div>
<span class="col col-auto my-auto py-1">AI Model:</span>
<div class="col col-auto my-auto">
AI Model:
{% if not obj.file_details.faces %}
{{CreateSelect( "model", 0, ["N/A", "normal", "slow/accurate"], "", "rounded norm-txt", [0,1,2])|safe }}
{% else %}
{{CreateSelect( "model", obj.file_details.faces[0].facefile_lnk.model_used, ["normal", "slow/accurate"], "", "rounded norm-txt", [1,2])|safe }}
{% endif %}
</div>
<div class="col col-auto">
{% if not obj.file_details.faces %}
{{CreateSelect( "model", 0, ["N/A", "normal", "slow/accurate"], "", "rounded-end h-100 norm-txt", [0,1,2])|safe }}
{% else %}
{{CreateSelect( "model", obj.file_details.faces[0].facefile_lnk.model_used, ["normal", "slow/accurate"], "", "rounded-end h-100 norm-txt", [1,2])|safe }}
{% endif %}
<button class="btn btn-outline-info p-1">
<svg width="28" height="28" fill="currentColor"><use xlink:href="{{url_for('static', filename='upstream/icons.svg')}}#rot90"/></svg>
</button>
<button class="btn btn-outline-info p-1">
<svg width="28" height="28" fill="currentColor"><use xlink:href="{{url_for('static', filename='upstream/icons.svg')}}#rot180"/></svg>
</button>
<button class="btn btn-outline-info p-1">
<svg width="28" height="28" fill="currentColor"><use xlink:href="{{url_for('static', filename='upstream/icons.svg')}}#rot270"/></svg>
</button>
<button class="btn btn-outline-info p-1">
<svg width="28" height="28" fill="currentColor"><use xlink:href="{{url_for('static', filename='upstream/icons.svg')}}#flip_h"/></svg>
</button>
<button class="btn btn-outline-info p-1">
<svg width="28" height="28" fill="currentColor"><use xlink:href="{{url_for('static', filename='upstream/icons.svg')}}#flip_v"/></svg>
</button>
<button class="btn btn-outline-info p-1">
<svg width="28" height="28" fill="currentColor"><use xlink:href="{{url_for('static', filename='upstream/icons.svg')}}#fullscreen"/></svg>
</button>
</div>
</div class="row">
{% endblock main_content %}