forked from FrederikBaerentsen/BrickTracker
Add a refresh mode for sets
This commit is contained in:
@@ -63,6 +63,9 @@
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if g.login.is_authenticated() %}
|
||||
{{ accordion.header('Management', 'management', 'set-details', icon='settings-4-line', class='text-end') }}
|
||||
<a href="{{ item.url_for_refresh() }}" class="btn btn-primary" role="button"><i class="ri-refresh-line"></i> Refresh the set</a>
|
||||
{{ accordion.footer() }}
|
||||
{{ accordion.header('Danger zone', 'danger-zone', 'set-details', expanded=delete, danger=true, class='text-end') }}
|
||||
{% if delete %}
|
||||
<form action="{{ item.url_for_do_delete() }}" method="post">
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
new BrickSetSocket('add', '{{ path }}', '{{ namespace }}', {
|
||||
COMPLETE: '{{ messages['COMPLETE'] }}',
|
||||
FAIL: '{{ messages['FAIL'] }}',
|
||||
IMPORT_SET: '{{ messages['IMPORT_SET'] }}',
|
||||
LOAD_SET: '{{ messages['LOAD_SET'] }}',
|
||||
PROGRESS: '{{ messages['PROGRESS'] }}',
|
||||
SET_LOADED: '{{ messages['SET_LOADED'] }}',
|
||||
}{% if bulk %}, true{% endif %});
|
||||
new BrickSetSocket(
|
||||
'{{ id }}',
|
||||
'{{ path }}',
|
||||
'{{ namespace }}',
|
||||
{
|
||||
COMPLETE: '{{ messages['COMPLETE'] }}',
|
||||
FAIL: '{{ messages['FAIL'] }}',
|
||||
IMPORT_SET: '{{ messages['IMPORT_SET'] }}',
|
||||
LOAD_SET: '{{ messages['LOAD_SET'] }}',
|
||||
PROGRESS: '{{ messages['PROGRESS'] }}',
|
||||
SET_LOADED: '{{ messages['SET_LOADED'] }}',
|
||||
},
|
||||
{% if bulk %}true{% else %}false{% endif %},
|
||||
{% if refresh %}true{% else %}false{% endif %}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user