From 21dec8d72d17876e5bb93046b662ddf0718d0cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Thu, 11 Jul 2024 15:36:07 +0200 Subject: [PATCH 01/39] UI: Improve template component platforms supported list display --- .../extensions/components/platforms.html | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/extensions/templates/extensions/components/platforms.html b/extensions/templates/extensions/components/platforms.html index ef77985f..6d722060 100644 --- a/extensions/templates/extensions/components/platforms.html +++ b/extensions/templates/extensions/components/platforms.html @@ -5,9 +5,21 @@
{% trans "Supported Platforms" %}
-
    +
      {% for p in version.platforms.all %} -
    • {{p.name}}
    • + {% with name=p.name %} + {% if name == "linux-x64" %} +
    • Linux
    • + {% elif name == "macos-arm64" %} +
    • macOS Apple Silicon
    • + {% elif name == "macos-x64" %} +
    • macOS Intel
    • + {% elif name == "windows-arm64" %} +
    • Windows ARM
    • + {% elif name == "windows-x64" %} +
    • Windows
    • + {% endif %} + {% endwith %} {% endfor %}
-- 2.30.2 From 0988c729f010d6fc889b649fc6dff5a44cbb1647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Thu, 11 Jul 2024 15:39:01 +0200 Subject: [PATCH 02/39] Fix: Add missing style utilty list-style-none --- common/static/common/styles/_utilities.sass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/static/common/styles/_utilities.sass b/common/static/common/styles/_utilities.sass index 83ffe1a0..3972e792 100644 --- a/common/static/common/styles/_utilities.sass +++ b/common/static/common/styles/_utilities.sass @@ -35,6 +35,9 @@ .mw-#{$i} min-width: var(--spacer-#{$i}) +.list-style-none + list-style: none + .opacity-50 opacity: 0.5 -- 2.30.2 From 4a2ac783e196dbfa7bbe9deb3f4f0d5da55982e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Thu, 11 Jul 2024 16:50:59 +0200 Subject: [PATCH 03/39] UI: Add js show multi OS install buttons based on platform Show multi OS install buttons dynamically, based on present active platform. --- common/static/common/scripts/app.js | 30 +++++++++++++++++++++ extensions/templates/extensions/detail.html | 10 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/common/static/common/scripts/app.js b/common/static/common/scripts/app.js index 67d8865c..c4123799 100644 --- a/common/static/common/scripts/app.js +++ b/common/static/common/scripts/app.js @@ -107,6 +107,36 @@ return; } + // Show multi OS install buttons based on active platform + if (btnInstallActionItem.length > 1) { + btnInstallActionItem.forEach(function(item) { + // Hide all items by default + item.classList.add('d-none'); + + // Get item platform + const itemPlatform = item.getAttribute('data-platform'); + const itemPlatformBase = itemPlatform.split('-')[0]; + const itemPlatformBasePrefix = itemPlatformBase.substring(0, 3); + + + // Get active platform + + /* + The navigator objects' 'platform' proporties are arbitrary, and specific to the browser. + + For a light match, we can use the first 3 characters of the platform string. + */ + + const activePlatform = navigator.platform.toLowerCase(); + const activePlatformPrefix = activePlatform.substring(0, 3); + + // Show button if item platform matches active platform + if (itemPlatformBasePrefix.startsWith(activePlatformPrefix)) { + item.classList.remove('d-none'); + } + }); + } + // Show btnInstallAction btnInstall.addEventListener('click', function() { // Hide btnInstallGroup diff --git a/extensions/templates/extensions/detail.html b/extensions/templates/extensions/detail.html index 6d939420..bace8ff3 100644 --- a/extensions/templates/extensions/detail.html +++ b/extensions/templates/extensions/detail.html @@ -193,6 +193,12 @@
    {% for file in latest.files.all %} + {% comment %} + TODOs: + - @back-end (?) show only the largest size + - @front-end remove the list + {% endcomment %} +
  • {{ file.size_bytes|filesizeformat }}
    ({{ file.get_platforms|join:", " }}) @@ -272,7 +278,7 @@
{% for download_item in download_list %} -
+
{% endfor %} + + {# TODO: add dropdown for other button install action items #}
{# If JavaScript is disabled. #} -- 2.30.2 From 0c5cfc639416b4eaf0b3eb37167db350be305384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Thu, 11 Jul 2024 17:58:13 +0200 Subject: [PATCH 04/39] UI: Add template detail multi OS all versions dropdown Add multi OS all versions dropdown to enable donwnload of other versions for non-active platforms. --- common/static/common/scripts/app.js | 8 ++++ extensions/templates/extensions/detail.html | 45 +++++++++++++++++++-- 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/common/static/common/scripts/app.js b/common/static/common/scripts/app.js index c4123799..dcac9be2 100644 --- a/common/static/common/scripts/app.js +++ b/common/static/common/scripts/app.js @@ -100,6 +100,8 @@ const btnInstallAction = document.querySelector('.js-btn-install-action'); const btnInstallGroup = document.querySelector('.js-btn-install-group'); + const dropdownAllVersionsWrapper = document.querySelector('.js-dropdown-all-versions-wrapper'); + // Create variables multiple const btnInstallActionItem = document.querySelectorAll('.js-btn-install-action-item'); @@ -107,8 +109,14 @@ return; } + // Hide dropdownAllVersionsWrapper by default + dropdownAllVersionsWrapper.classList.add('d-none'); + // Show multi OS install buttons based on active platform if (btnInstallActionItem.length > 1) { + // Show dropdownAllVersionsWrapper + dropdownAllVersionsWrapper.classList.remove('d-none'); + btnInstallActionItem.forEach(function(item) { // Hide all items by default item.classList.add('d-none'); diff --git a/extensions/templates/extensions/detail.html b/extensions/templates/extensions/detail.html index bace8ff3..7fb77f2f 100644 --- a/extensions/templates/extensions/detail.html +++ b/extensions/templates/extensions/detail.html @@ -110,7 +110,7 @@ {# Sidebar #}
-
{% endfor %} - {# TODO: add dropdown for other button install action items #} +
{# If JavaScript is disabled. #} -- 2.30.2 From dce674e5ab99188e5dda08a479efb25f086f1eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Thu, 11 Jul 2024 18:11:15 +0200 Subject: [PATCH 05/39] UI: Improve templa version_list multi OS download item buttons display --- .../templates/extensions/version_list.html | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/extensions/templates/extensions/version_list.html b/extensions/templates/extensions/version_list.html index 1cf6a52d..6e8195f1 100644 --- a/extensions/templates/extensions/version_list.html +++ b/extensions/templates/extensions/version_list.html @@ -115,9 +115,23 @@
{% with download_list=version.get_download_list %} {% for download_item in download_list %} - - - {% trans 'Download' %} v{{ version.version }} {{ download_item.platform }} + + + {% with platform=download_item.platform %} + {% if platform == "linux-x64" %} + Linux + {% elif platform == "macos-arm64" %} + macOS Apple Silicon + {% elif platform == "macos-x64" %} + macOS Intel + {% elif platform == "windows-arm64" %} + Windows ARM + {% elif platform == "windows-x64" %} + Windows + {% endif %} + {% endwith %} + + v{{ version.version }} {% endfor %} {% endwith %} -- 2.30.2 From 0aee09e62c6fbcdac99bddf05bbe8628ba552e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Thu, 11 Jul 2024 18:40:24 +0200 Subject: [PATCH 06/39] Fix: Template detail multi OS install buttons spacing horizontal --- extensions/templates/extensions/detail.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/templates/extensions/detail.html b/extensions/templates/extensions/detail.html index 7fb77f2f..98d5ad8d 100644 --- a/extensions/templates/extensions/detail.html +++ b/extensions/templates/extensions/detail.html @@ -319,11 +319,11 @@ {% if platform == "linux-x64" %} Linux {% elif platform == "macos-arm64" %} - macOS Apple Silicon + macOS Apple Silicon {% elif platform == "macos-x64" %} - macOS Intel + macOS Intel {% elif platform == "windows-arm64" %} - Windows ARM + Windows ARM {% elif platform == "windows-x64" %} Windows {% endif %} -- 2.30.2 From ceea83e2d95da245f0e533fda346039eb868adf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Thu, 11 Jul 2024 19:36:21 +0200 Subject: [PATCH 07/39] UI: Improve template multi OS install buttons display Improve template multi OS install buttons display based on coversation IRL. File size display is work in progress. --- extensions/templates/extensions/detail.html | 39 ++++++++++++--------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/extensions/templates/extensions/detail.html b/extensions/templates/extensions/detail.html index 98d5ad8d..4eec0e29 100644 --- a/extensions/templates/extensions/detail.html +++ b/extensions/templates/extensions/detail.html @@ -280,24 +280,29 @@ {% for download_item in download_list %}
- +
+ + {% with platform=download_item.platform %} + {% if platform == "linux-x64" %} + Linux + {% elif platform == "macos-arm64" %} + macOS - Apple Silicon + {% elif platform == "macos-x64" %} + macOS - Intel + {% elif platform == "windows-arm64" %} + Windows - ARM + {% elif platform == "windows-x64" %} + Windows + {% endif %} + {% endwith %} + {# TODO: fix file active size #} + – {{ download_item.size_bytes|filesizeformat }} +
{# TODO @front-end: Replace URL of the manual /dev/ with /latest/. #} @@ -307,9 +312,9 @@
{% endfor %} - -- 2.30.2 From 2ffc3ad6ddbb2d865b46c84acb3af63c933ab90a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Fri, 12 Jul 2024 12:48:34 +0200 Subject: [PATCH 09/39] UI: Add template detail multi OS other versions file size display --- extensions/templates/extensions/detail.html | 31 +++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/extensions/templates/extensions/detail.html b/extensions/templates/extensions/detail.html index 51379360..d71a9a58 100644 --- a/extensions/templates/extensions/detail.html +++ b/extensions/templates/extensions/detail.html @@ -327,20 +327,23 @@
-- 2.30.2 From f6e08ed953824df3e48e9f53e43cecfc55138ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Fri, 12 Jul 2024 12:52:09 +0200 Subject: [PATCH 11/39] UI: Add multi OS install buttons active size display Show the extension's size for the active platform in the install button's details. Refactor of #2c55039 --- extensions/templates/extensions/detail.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/templates/extensions/detail.html b/extensions/templates/extensions/detail.html index cb3bf3be..37a4124a 100644 --- a/extensions/templates/extensions/detail.html +++ b/extensions/templates/extensions/detail.html @@ -300,8 +300,7 @@ Windows {% endif %} {% endwith %} - {# TODO: fix file active size #} - – {{ download_item.size_bytes|filesizeformat }} + – {{ download_item.size|filesizeformat }}
-- 2.30.2 From 02a6e5bdd8eaa6a47a9a464b9e44ea3f3abd6ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Fri, 12 Jul 2024 14:12:33 +0200 Subject: [PATCH 12/39] UI: Add style btn-install-action-item dividers for multiple items --- common/static/common/scripts/app.js | 1 + common/static/common/styles/_extension.sass | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/static/common/scripts/app.js b/common/static/common/scripts/app.js index dcac9be2..7746d423 100644 --- a/common/static/common/scripts/app.js +++ b/common/static/common/scripts/app.js @@ -140,6 +140,7 @@ // Show button if item platform matches active platform if (itemPlatformBasePrefix.startsWith(activePlatformPrefix)) { + item.classList.add('btn-install-action-item-active'); item.classList.remove('d-none'); } }); diff --git a/common/static/common/styles/_extension.sass b/common/static/common/styles/_extension.sass index 07826cca..f4d71cdb 100644 --- a/common/static/common/styles/_extension.sass +++ b/common/static/common/styles/_extension.sass @@ -167,8 +167,9 @@ .btn-install-action-item +margin(3, bottom) - &:last-child - +margin(0, bottom) + .btn-install-action-item-active ~ .btn-install-action-item-active + border-bottom: thin solid var(--border-color) + +padding(3, bottom) .btn-install-drag, .btn-install-drag:active -- 2.30.2 From 0fc0e58b89c8db2f8264f8c8811e06d511fc81d8 Mon Sep 17 00:00:00 2001 From: Oleg Komarov Date: Fri, 12 Jul 2024 14:38:03 +0200 Subject: [PATCH 13/39] order supported platforms in detail card; match on slug, not name --- .../templates/extensions/components/platforms.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/extensions/templates/extensions/components/platforms.html b/extensions/templates/extensions/components/platforms.html index 6d722060..d3f4fc85 100644 --- a/extensions/templates/extensions/components/platforms.html +++ b/extensions/templates/extensions/components/platforms.html @@ -6,17 +6,17 @@
{% trans "Supported Platforms" %}
-
-
{% trans 'Size' %}
- {% if version.has_single_file %} -
{{ version.files.first.size_bytes|filesizeformat }}
- {% else %} - {% for file in version.files.all %} -
{{ file.size_bytes|filesizeformat }} ({{ file.get_platforms|join:", " }})
- {% endfor %} - {% endif %} -
+ + {% if version.has_single_file %} +
+
{% trans 'Size' %}
+
{{ version.files.first.size_bytes|filesizeformat }}
+
+ {% endif %}
-- 2.30.2 From 90ae5d3c522f6045e43a8fd212ff37b7bfbd34e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Mon, 15 Jul 2024 11:19:10 +0200 Subject: [PATCH 31/39] UI: Add multi OS Other versions list active platform indicator Show active platform in multi OS Other versions list with a dot indicator. Part of #205 --- common/static/common/scripts/app.js | 42 +++++++++++++++------ common/static/common/styles/_extension.sass | 8 ++++ extensions/templates/extensions/detail.html | 11 +++--- 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/common/static/common/scripts/app.js b/common/static/common/scripts/app.js index 7746d423..494b3114 100644 --- a/common/static/common/scripts/app.js +++ b/common/static/common/scripts/app.js @@ -100,6 +100,7 @@ const btnInstallAction = document.querySelector('.js-btn-install-action'); const btnInstallGroup = document.querySelector('.js-btn-install-group'); + const dropdownAllVersionsItemDot = document.querySelectorAll('.js-dropdown-all-versions-item-dot'); const dropdownAllVersionsWrapper = document.querySelector('.js-dropdown-all-versions-wrapper'); // Create variables multiple @@ -117,33 +118,50 @@ // Show dropdownAllVersionsWrapper dropdownAllVersionsWrapper.classList.remove('d-none'); + // Get active platform + + /* + The navigator objects' 'platform' proporties are arbitrary, and specific to the browser. + + For a light match, we can use the first 3 characters of the platform string. + */ + + const activePlatform = navigator.platform.toLowerCase(); + const activePlatformPrefix = activePlatform.substring(0, 3); + btnInstallActionItem.forEach(function(item) { // Hide all items by default item.classList.add('d-none'); + // Hide dropdownAllVersionsItemDot by default + dropdownAllVersionsItemDot.forEach(function(item) { + item.classList.add('d-none'); + }); + // Get item platform const itemPlatform = item.getAttribute('data-platform'); const itemPlatformBase = itemPlatform.split('-')[0]; const itemPlatformBasePrefix = itemPlatformBase.substring(0, 3); - - // Get active platform - - /* - The navigator objects' 'platform' proporties are arbitrary, and specific to the browser. - - For a light match, we can use the first 3 characters of the platform string. - */ - - const activePlatform = navigator.platform.toLowerCase(); - const activePlatformPrefix = activePlatform.substring(0, 3); - // Show button if item platform matches active platform if (itemPlatformBasePrefix.startsWith(activePlatformPrefix)) { item.classList.add('btn-install-action-item-active'); item.classList.remove('d-none'); } }); + + dropdownAllVersionsItemDot.forEach(function(item) { + // TODO: create named function to not repeat this (optional) + // Get item platform + const itemPlatform = item.getAttribute('data-platform'); + const itemPlatformBase = itemPlatform.split('-')[0]; + const itemPlatformBasePrefix = itemPlatformBase.substring(0, 3); + + // Show dropdownAllVersionsItemDot if item platform matches active platform + if (itemPlatformBasePrefix.startsWith(activePlatformPrefix)) { + item.classList.remove('d-none'); + } + }); } // Show btnInstallAction diff --git a/common/static/common/styles/_extension.sass b/common/static/common/styles/_extension.sass index d8e47d37..80757025 100644 --- a/common/static/common/styles/_extension.sass +++ b/common/static/common/styles/_extension.sass @@ -475,3 +475,11 @@ a .featured-image-preview width: 16rem + +.dropdown-all-versions-item-dot + background-color: var(--color-accent) + border-radius: 50% + height: var(--spacer-1) + position: absolute + transform: translateX(-1.2rem) + width: var(--spacer-1) diff --git a/extensions/templates/extensions/detail.html b/extensions/templates/extensions/detail.html index cc408c80..8be16b11 100644 --- a/extensions/templates/extensions/detail.html +++ b/extensions/templates/extensions/detail.html @@ -295,12 +295,13 @@
-- 2.30.2 From 65ae4a962341037351dd8a7e57a7c2d17cc39b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Mon, 15 Jul 2024 16:21:45 +0200 Subject: [PATCH 36/39] UI: Rewrite js app function isArchARM to prepare improving macOS architectures display Part of #205 --- common/static/common/scripts/app.js | 37 +++++++++++++++++------------ 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/common/static/common/scripts/app.js b/common/static/common/scripts/app.js index 721fe933..18607e0c 100644 --- a/common/static/common/scripts/app.js +++ b/common/static/common/scripts/app.js @@ -106,6 +106,28 @@ // Create variables multiple const btnInstallActionItem = document.querySelectorAll('.js-btn-install-action-item'); + // Create function isArchARM + function isArchARM() { + // Check if userAgentData and getHighEntropyValues are supported + if (navigator.userAgentData && navigator.userAgentData.getHighEntropyValues) { + navigator.userAgentData + .getHighEntropyValues(["architecture"]) + .then((values) => { + // Extract the architecture value + const arch = values.architecture; + // Check if the architecture is ARM + if (arch.toLowerCase().includes('arm')) { + return true; + } else { + return false; + } + }); + } else { + // Fallback for browsers that do not support userAgentData or getHighEntropyValues + return false; + } + } + if (btnInstall == null) { return; } @@ -129,21 +151,6 @@ const activePlatform = navigator.platform.toLowerCase(); const activePlatformPrefix = activePlatform.substring(0, 3); - // Create function to detect architecture ARM - function isArchARM() { - let isARM = false; - - // Newer browsers - if (navigator.userAgentData && navigator.userAgentData.platform) { - isARM = navigator.userAgentData.platform.includes('ARM'); - } else { - // Fallback for older browsers - isARM = navigator.userAgent.includes('ARM') || navigator.userAgent.includes('arm'); - } - - return isARM; - } - btnInstallActionItem.forEach(function(item) { // Hide all items by default item.classList.add('d-none'); -- 2.30.2 From 4806926999caca79df68815dded1947bebb74a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Mon, 15 Jul 2024 17:12:38 +0200 Subject: [PATCH 37/39] Cleanup: Remove js console logging for prod Part of #205 --- common/static/common/scripts/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/static/common/scripts/app.js b/common/static/common/scripts/app.js index 18607e0c..6312c729 100644 --- a/common/static/common/scripts/app.js +++ b/common/static/common/scripts/app.js @@ -115,6 +115,7 @@ .then((values) => { // Extract the architecture value const arch = values.architecture; + // Check if the architecture is ARM if (arch.toLowerCase().includes('arm')) { return true; @@ -173,9 +174,9 @@ // TODO: WIP show only relevant item for active macOS architecture, if architecture detection reliably works if (activePlatformPrefix.startsWith('mac')) { if (isArchARM()) { - console.log('Platform: macOS Apple Silicon'); + } else { - console.log('Platform: macOS Intel'); + } } } -- 2.30.2 From 7edfe03ebb2072d5213dda99df69ec3fe13cc776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Mon, 15 Jul 2024 17:22:29 +0200 Subject: [PATCH 38/39] UI: Add js app dropdownAllVersionItemIcon active styling Style dropdown multi OS download buttons based on active platform. Part of #205 --- common/static/common/scripts/app.js | 20 +++++++++++++++++++- extensions/templates/extensions/detail.html | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/common/static/common/scripts/app.js b/common/static/common/scripts/app.js index 6312c729..c281ef64 100644 --- a/common/static/common/scripts/app.js +++ b/common/static/common/scripts/app.js @@ -101,6 +101,7 @@ const btnInstallGroup = document.querySelector('.js-btn-install-group'); const dropdownAllVersionsItemDot = document.querySelectorAll('.js-dropdown-all-versions-item-dot'); + const dropdownAllVersionsItemIcon = document.querySelectorAll('.js-dropdown-all-versions-item-icon'); const dropdownAllVersionsWrapper = document.querySelector('.js-dropdown-all-versions-wrapper'); // Create variables multiple @@ -115,7 +116,6 @@ .then((values) => { // Extract the architecture value const arch = values.architecture; - // Check if the architecture is ARM if (arch.toLowerCase().includes('arm')) { return true; @@ -161,6 +161,11 @@ item.classList.add('d-none'); }); + // Style dropdownAllVersionsItemIcon by default + dropdownAllVersionsItemIcon.forEach(function(item) { + item.classList.add('text-muted'); + }); + // Get item platform const itemPlatform = item.getAttribute('data-platform'); const itemPlatformBase = itemPlatform.split('-')[0]; @@ -182,6 +187,7 @@ } }); + // TODO: refactor and DRY code dropdownAllVersionsItemDot.forEach(function(item) { // TODO: create named function to not repeat this (optional) // Get item platform @@ -194,6 +200,18 @@ item.classList.remove('d-none'); } }); + + dropdownAllVersionsItemIcon.forEach(function(item) { + // Get item platform + const itemPlatform = item.getAttribute('data-platform'); + const itemPlatformBase = itemPlatform.split('-')[0]; + const itemPlatformBasePrefix = itemPlatformBase.substring(0, 3); + + // Show dropdownAllVersionsItemIcon if item platform matches active platform + if (itemPlatformBasePrefix.startsWith(activePlatformPrefix)) { + item.classList.remove('text-muted'); + } + }); } // Show btnInstallAction diff --git a/extensions/templates/extensions/detail.html b/extensions/templates/extensions/detail.html index e54b223c..67d01659 100644 --- a/extensions/templates/extensions/detail.html +++ b/extensions/templates/extensions/detail.html @@ -305,7 +305,7 @@ {% with platform=download_item.platform %} - {{ platform.name_first_word }} {{ platform.name_rest}} + {{ platform.name_first_word }} {{ platform.name_rest}} {% endwith %} {{ download_item.size|filesizeformat }} -- 2.30.2 From c9884eed482721210961d0e2ba29b7450bfbbf99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Lente?= Date: Mon, 15 Jul 2024 17:28:57 +0200 Subject: [PATCH 39/39] UI: Change template detail only show size info for extensions with multiple explicit platform versions Part of #205 --- extensions/templates/extensions/detail.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/extensions/templates/extensions/detail.html b/extensions/templates/extensions/detail.html index 67d01659..c646957e 100644 --- a/extensions/templates/extensions/detail.html +++ b/extensions/templates/extensions/detail.html @@ -280,10 +280,8 @@ {% endif %} {% endwith %}
- – + – {{ download_item.size|filesizeformat }} {% endif %} - - {{ download_item.size|filesizeformat }} -- 2.30.2