diff --git a/public/scripts/extensions.js b/public/scripts/extensions.js index 22f71df94..2c68b949a 100644 --- a/public/scripts/extensions.js +++ b/public/scripts/extensions.js @@ -512,8 +512,8 @@ async function generateExtensionHtml(name, manifest, isActive, isDisabled, isExt isUpToDate = data.isUpToDate; displayVersion = ` (${branch}-${commitHash.substring(0, 7)})`; updateButton = isUpToDate ? - `` : - ``; + `` : + ``; originHtml = ``; } @@ -641,6 +641,7 @@ async function showExtensionsDetails() { */ async function onUpdateClick() { const extensionName = $(this).data('name'); + $(this).find('i').addClass('fa-spin'); await updateExtension(extensionName, false); } @@ -658,6 +659,11 @@ async function updateExtension(extensionName, quiet) { }); const data = await response.json(); + + if (!quiet) { + showExtensionsDetails(); + } + if (data.isUpToDate) { if (!quiet) { toastr.success('Extension is already up to date'); @@ -665,10 +671,6 @@ async function updateExtension(extensionName, quiet) { } else { toastr.success(`Extension ${extensionName} updated to ${data.shortCommitHash}`); } - - if (!quiet) { - showExtensionsDetails(); - } } catch (error) { console.error('Error:', error); } diff --git a/public/scripts/extensions/assets/index.js b/public/scripts/extensions/assets/index.js index fe6cd12ef..1c49917ce 100644 --- a/public/scripts/extensions/assets/index.js +++ b/public/scripts/extensions/assets/index.js @@ -67,7 +67,7 @@ function downloadAssetsList(url) { const asset = availableAssets[assetType][i]; const elemId = `assets_install_${assetType}_${i}`; let element = $('