diff --git a/web/components/UpdateOs/ChangelogModal.vue b/web/components/UpdateOs/ChangelogModal.vue index 82d492c1e..81589e3b1 100644 --- a/web/components/UpdateOs/ChangelogModal.vue +++ b/web/components/UpdateOs/ChangelogModal.vue @@ -31,50 +31,17 @@ const updateOsChangelogStore = useUpdateOsChangelogStore(); const { availableWithRenewal } = storeToRefs(updateOsStore); const { - isReleaseForUpdateStable, releaseForUpdate, mutatedParsedChangelog, parseChangelogFailed, parsedChangelogTitle, } = storeToRefs(updateOsChangelogStore); -const showExternalChangelogLink = computed(() => { - return ( - releaseForUpdate.value && - isReleaseForUpdateStable.value && - (releaseForUpdate.value?.changelog) - ); -}); +const showExternalChangelogLink = computed(() => releaseForUpdate.value?.changelog_pretty); const showExtendKeyButton = computed(() => { return availableWithRenewal.value; }); - -// find all the links in the changelog and make them open in a new tab -const changelogOutput = ref(null); -const updateChangelogLinks = () => { - if (!changelogOutput.value) { return; } - const links = changelogOutput.value.querySelectorAll('a'); - links.forEach((link) => { - link.setAttribute('target', '_blank'); - link.setAttribute('rel', 'noopener noreferrer'); - /** @todo what do we do with docusaurus based links? May also be broken on the account app. */ - // if a link is a relative link or doesn't start with http but doesn't start with a # we need to prepend the base url of the changelog - // const linkIsRelative = link.getAttribute('href')?.startsWith('/') ?? false; - // const linkIsNotHttp = link.getAttribute('href')?.startsWith('http') === false; - // const linkIsNotHash = link.getAttribute('href')?.startsWith('#') === false; - // const linkIsNotAnchor = link.getAttribute('href')?.startsWith('mailto') === false; - // if (linkIsRelative || (linkIsNotHttp && linkIsNotHash && linkIsNotAnchor)) { - // link.setAttribute('href', `${releaseForUpdate.value?.changelog}${link.getAttribute('href')}`); - // } - }); -}; - -watchEffect(() => { - if (mutatedParsedChangelog.value) { - updateChangelogLinks(); - } -});