diff --git a/web/__test__/components/ChangelogModal.test.ts b/web/__test__/components/ChangelogModal.test.ts index 6c6772405e..2e0603a378 100644 --- a/web/__test__/components/ChangelogModal.test.ts +++ b/web/__test__/components/ChangelogModal.test.ts @@ -11,13 +11,14 @@ vi.mock('@unraid/ui', () => ({ BrandButton: { template: '' }, BrandLoading: { template: '
' }, cn: (...classes: string[]) => classes.filter(Boolean).join(' '), - ResponsiveModal: { template: '- {{ t('updateOs.update.receiveTheLatestAndGreatestFor') }} -
-- Released on {{ userFormattedReleaseDate }} -
-- {{ t('updateOs.checkUpdateResponseModal.requiresVerificationToUpdate') }} -
-+ {{ + available || availableWithRenewal + ? t('updateOs.status.unraidAvailable', [available || availableWithRenewal]) + : t('updateOs.status.upToDate') + }} +
++ Released on {{ userFormattedReleaseDate }} +
++ {{ t('updateOs.checkUpdateResponseModal.requiresVerificationToUpdate') }} +
- {{ t('updateOs.checkUpdateResponseModal.currentVersion', [osVersion]) }} -
- ++ {{ t('updateOs.checkUpdateResponseModal.currentVersion', [osVersion]) }} +
+ {{ + t('updateOs.checkUpdateResponseModal.manageUpdatePreferencesIncludingBetaAccess') + }} +
+- {{ - t('updateOs.checkUpdateResponseModal.manageUpdatePreferencesIncludingBetaAccess') - }} -
-+ {{ t('updateOs.checkUpdateResponseModal.youCanOptBackInTo') }} +
- {{ t('updateOs.checkUpdateResponseModal.youCanOptBackInTo') }} -
-{{ props.date }}
-{{ t('updateOs.rawChangelogRenderer.loadingChangelog') }}
++ {{ t('updateOs.rawChangelogRenderer.loadingChangelog') }} +
{{ t('updateOs.rawChangelogRenderer.noChangelogContentAvailable') }}
diff --git a/web/src/components/UpdateOs/Status.vue b/web/src/components/UpdateOs/Status.vue index f148099524..30639cade3 100644 --- a/web/src/components/UpdateOs/Status.vue +++ b/web/src/components/UpdateOs/Status.vue @@ -44,10 +44,11 @@ const LoadingIcon = () => h(BrandLoading, { variant: 'white', style: 'width: 16p const { dateTimeFormat, osVersion, rebootType, rebootVersion, regExp, regUpdatesExpired } = storeToRefs(serverStore); -const { available, availableWithRenewal } = storeToRefs(updateOsStore); +const { available, availableWithRenewal, checkForUpdatesLoading } = storeToRefs(updateOsStore); const { ineligibleText, rebootTypeText, status } = storeToRefs(updateOsActionsStore); const updateAvailable = computed(() => available.value || availableWithRenewal.value); +const checkingForUpdates = computed(() => checkForUpdatesLoading.value || status.value === 'checking'); const { outputDateTimeReadableDiff: readableDiffRegExp, outputDateTimeFormatted: formattedRegExp } = useDateTimeHelper(dateTimeFormat.value, t, true, regExp.value); @@ -74,6 +75,14 @@ const showRebootButton = computed( () => rebootType.value === 'downgrade' || rebootType.value === 'update' ); +const checkForUpdates = () => { + updateOsStore.localCheckForUpdate(); +}; + +const showRefreshButton = computed( + () => updateAvailable.value && !showRebootButton.value && !props.showExternalDowngrade +); + const checkButton = computed(() => { if (showRebootButton.value || props.showExternalDowngrade) { return { @@ -91,9 +100,7 @@ const checkButton = computed(() => { if (!updateAvailable.value) { return { - click: () => { - updateOsStore.localCheckForUpdate(); - }, + click: checkForUpdates, icon: () => h(ArrowPathIcon, { style: 'width: 16px; height: 16px;' }), text: t('userProfile.dropdownContent.checkForUpdate'), }; @@ -230,10 +237,21 @@ const navigateToRegistration = () => { }} + +