Added sets.csv download, added missing minifig image error, added auto download of nil and nil_mf images, started proper fix for error in set numbers

This commit is contained in:
2024-04-24 20:24:04 +02:00
parent f87332a7f8
commit 525169ef77
4 changed files with 72 additions and 30 deletions

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html data-theme="light" class="has-navbar-fixed-top">
<head
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
@@ -49,13 +49,11 @@
</div>
</section>
{% if error is defined %}
<button class="js-modal-trigger" data-target="modal-js-example" id="modal-js">
</button>
{% else %}
<button id="modal-js">
</button>
{% endif %}
<div class="modal" id="modal-js-example">
@@ -104,6 +102,13 @@ var socket = io.connect('http://' + document.domain + ':' + location.port + '/pr
window.location.href = '/';
});
socket.on('task_failed', function(data) {
// Redirect to '/'
const error = data.error;
document.getElementById('modal-js').style.display = 'block';
// window.location.href = '/create';
});
document.addEventListener('DOMContentLoaded', () => {
window.onload = function () {

View File

@@ -68,7 +68,11 @@
<div style="display: flex; justify-content: center;">
<div style="display: flex; align-items: center;">
{% if fig[4] == None %}
<img src="/static/nil_mf.jpg" class="lightbox-trigger" style="height: 100px; width: auto;" alt="{{ fig[2] }}" loading="lazy">
{% else %}
<img src="{{ '/static/minifigs/' + fig[0] + '.jpg' }}" class="lightbox-trigger" style="height: 100px; width: auto;" alt="{{ fig[2] }}" loading="lazy">
{% endif %}
<span style="font-size: 50px; margin-left: 10px;">X {{ fig[3] }}</span>
</div>
</div>