diff --git a/apps/app-frontend/src/pages/Browse.vue b/apps/app-frontend/src/pages/Browse.vue index dc586a74e9..86818e6389 100644 --- a/apps/app-frontend/src/pages/Browse.vue +++ b/apps/app-frontend/src/pages/Browse.vue @@ -907,17 +907,18 @@ function getCardActions( const isQueued = queuedServerInstallProjectIds.value.has(projectResult.project_id) const isQueuedRoot = queuedServerInstallRootProjectIds.value.has(projectResult.project_id) const isInstallingSelection = isInstallingQueuedServerInstalls.value + const showAsInstalling = isInstalling || (isInstallingSelection && isQueuedRoot) const validatingInstall = isInstalling && currentProjectType !== 'modpack' && !isInstallingSelection const installLabel = showAsInstalled ? commonMessages.installedLabel : isQueued - ? isInstalling || isInstallingSelection + ? showAsInstalling ? validatingInstall ? commonMessages.validatingLabel : messages.installingToServer : commonMessages.selectedLabel - : isInstalling || isInstallingSelection + : showAsInstalling ? validatingInstall ? commonMessages.validatingLabel : messages.installingToServer @@ -927,15 +928,15 @@ function getCardActions( key: 'install', label: formatMessage(installLabel), icon: - isInstalling || isInstallingSelection + showAsInstalling ? SpinnerIcon : isQueued || showAsInstalled ? CheckIcon : PlusIcon, - iconClass: isInstalling || isInstallingSelection ? 'animate-spin' : undefined, + iconClass: showAsInstalling ? 'animate-spin' : undefined, disabled: showAsInstalled || isInstalling || isInstallingSelection || (isQueued && !isQueuedRoot), - color: isQueued && !isInstalling && !isInstallingSelection ? 'green' : 'brand', + color: isQueued && !showAsInstalling ? 'green' : 'brand', type: 'outlined', onClick: async () => { if (isQueuedRoot) { diff --git a/apps/frontend/src/pages/discover/[type]/index.vue b/apps/frontend/src/pages/discover/[type]/index.vue index 2c6093242b..8429002043 100644 --- a/apps/frontend/src/pages/discover/[type]/index.vue +++ b/apps/frontend/src/pages/discover/[type]/index.vue @@ -361,17 +361,18 @@ function getCardActions( serverData.value.upstream?.project_id === result.project_id const isInstalling = installingProjectIds.value.has(result.project_id) const isInstallingSelection = isInstallingQueuedServerInstalls.value + const showAsInstalling = isInstalling || (isInstallingSelection && isQueuedRoot) const validatingInstall = isInstalling && currentProjectType !== 'modpack' && !isInstallingSelection const installLabel = isInstalled ? formatMessage(commonMessages.installedLabel) : isQueued - ? isInstalling || isInstallingSelection + ? showAsInstalling ? validatingInstall ? formatMessage(commonMessages.validatingLabel) : formatMessage(commonMessages.installingLabel) : formatMessage(commonMessages.selectedLabel) - : isInstalling || isInstallingSelection + : showAsInstalling ? validatingInstall ? formatMessage(commonMessages.validatingLabel) : formatMessage(commonMessages.installingLabel) @@ -382,15 +383,15 @@ function getCardActions( key: 'install', label: installLabel, icon: - isInstalling || isInstallingSelection + showAsInstalling ? SpinnerIcon : isQueued || isInstalled ? CheckIcon : DownloadIcon, - iconClass: isInstalling || isInstallingSelection ? 'animate-spin' : undefined, + iconClass: showAsInstalling ? 'animate-spin' : undefined, disabled: !!isInstalled || isInstalling || isInstallingSelection || (isQueued && !isQueuedRoot), - color: isQueued && !isInstalling && !isInstallingSelection ? 'green' : 'brand', + color: isQueued && !showAsInstalling ? 'green' : 'brand', type: 'outlined', onClick: () => serverInstall(projectResult), },