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 ceea83e2d9 - Show all commits

View File

@ -280,24 +280,29 @@
{% for download_item in download_list %} {% for download_item in download_list %}
<div class="btn-install-action-item js-btn-install-action-item" data-install-url="{{ request.scheme }}://{{ request.get_host }}{{ download_item.url }}" data-platform="{{ download_item.platform }}" download="{{ download_item.name }}"> <div class="btn-install-action-item js-btn-install-action-item" data-install-url="{{ request.scheme }}://{{ request.get_host }}{{ download_item.url }}" data-platform="{{ download_item.platform }}" download="{{ download_item.name }}">
<div class="btn-install-drag-group js-btn-install-drag-group mb-2 rounded"> <div class="btn-install-drag-group js-btn-install-drag-group mb-2 rounded">
<button class="btn btn-flex btn-primary btn-install-drag cursor-move js-btn-install-drag w-100" draggable="true"> <button class="btn btn-flex btn-primary btn-install-drag cursor-move js-btn-install-drag mb-2 w-100" draggable="true">
<i class="i-move"></i> <i class="i-move"></i>
<span>{% trans 'Drag and Drop into Blender' %} <span>{% trans 'Drag and Drop into Blender' %}
{% with platform=download_item.platform %}
{% if platform == "linux-x64" %}
<i class="i-linux"></i>
{% elif platform == "macos-arm64" %}
<i class="i-macos"></i>
{% elif platform == "macos-x64" %}
<i class="i-macos"></i>
{% elif platform == "windows-arm64" %}
<i class="i-windows"></i>
{% elif platform == "windows-x64" %}
<i class="i-windows"></i>
{% endif %}
{% endwith %}
</span> </span>
</button> </button>
<div class="text-center">
<strong>
{% with platform=download_item.platform %}
{% if platform == "linux-x64" %}
Linux
{% elif platform == "macos-arm64" %}
macOS <span class="fw-normal"> - Apple Silicon</span>
{% elif platform == "macos-x64" %}
macOS <span class="fw-normal"> - Intel</span>
{% elif platform == "windows-arm64" %}
Windows <span class="fw-normal"> - ARM</span>
{% elif platform == "windows-x64" %}
Windows
{% endif %}
{% endwith %}
{# TODO: fix file active size #}
</strong> {{ download_item.size_bytes|filesizeformat }}
</div>
</div> </div>
<small class="d-block text-center w-100"> <small class="d-block text-center w-100">
{# TODO @front-end: Replace URL of the manual /dev/ with /latest/. #} {# TODO @front-end: Replace URL of the manual /dev/ with /latest/. #}
@ -307,9 +312,9 @@
</div> </div>
{% endfor %} {% endfor %}
<div class="dropdown js-dropdown-all-versions-wrapper pt-3"> <div class="dropdown js-dropdown-all-versions-wrapper">
<button class="btn dropdown-toggle js-dropdown-toggle w-100" data-toggle-menu-id="js-dropdown-all-versions"> <button class="btn btn-link dropdown-toggle js-dropdown-toggle w-100" data-toggle-menu-id="js-dropdown-all-versions">
<i class="i-download me-1"></i> {% trans 'All versions' %}<i class="i-chevron-down"></i> </i> {% trans 'Other versions' %}<i class="i-chevron-down"></i>
</button> </button>
<ul class="dropdown-menu js-dropdown-menu w-100" id="js-dropdown-all-versions"> <ul class="dropdown-menu js-dropdown-menu w-100" id="js-dropdown-all-versions">
{% for download_item in download_list %} {% for download_item in download_list %}