UI: Improve multi OS display #205

Merged
Oleg-Komarov merged 40 commits from ui/multi-os into main 2024-07-16 07:24:07 +02:00
Showing only changes of commit 2c550392cc - Show all commits

View File

@ -286,8 +286,8 @@
</span>
</button>
<div class="text-center">
<strong>
{% with platform=download_item.platform %}
{% with platform=download_item.platform %}
<strong>
{% if platform == "linux-x64" %}
Linux
{% elif platform == "macos-arm64" %}
@ -299,9 +299,17 @@
{% elif platform == "windows-x64" %}
Windows
{% endif %}
{% endwith %}
{# TODO: fix file active size #}
</strong> {{ download_item.size_bytes|filesizeformat }}
</strong>
{% for file in latest.files.all %}
{# Pass in sliced variables to check platform match #}
{% with file_platform_base=file.get_platforms|join:", "|slice:":3" platform_base=platform|slice:":3" %}
{% if platform_base == file_platform_base %}
{{ file.size_bytes|filesizeformat }}
{% endif %}
{% endwith %}
{% endfor %}
{% endwith %}
</div>
</div>
<small class="d-block text-center w-100">