Apply some review comments

This commit is contained in:
2025-02-20 18:13:40 +01:00
parent f7ff77b88f
commit a87016a23f
5 changed files with 39 additions and 35 deletions

View File

@@ -33,4 +33,32 @@
{{ print_path(file.parent) }}
<a href="{{ url('sas:album', album_id=file.id) }}">{{ file.get_display_name() }}</a> /
{% endif %}
{% endmacro %}
{% endmacro %}
{# Helper macro to create a download button for a
record of albums with alpine
This needs to be used inside an alpine environment.
Downloaded pictures will be `pictures` from the
parent data store.
Note:
This requires importing `bundled/sas/pictures-download-index.ts`
Parameters:
name (str): name displayed on the button
#}
{% macro download_button(name) %}
<div x-data="pictures_download">
<div x-show="pictures.length > 0" x-cloak>
<button
:disabled="isDownloading"
class="btn btn-blue"
@click="downloadZip()"
>
<i class="fa fa-download"></i>{{ name }}
</button>
<progress x-ref="progress" x-show="isDownloading"></progress>
</div>
</div>
{% endmacro %}