Hide direct links

This commit is contained in:
Jorge Vargas 2025-02-19 21:28:35 -06:00
parent 4f0984d326
commit c7a6da21e2
2 changed files with 2 additions and 3 deletions

View file

@ -19,7 +19,7 @@ const disabled = direct && !permissions.includes('SKIP_ADS')
' flex justify-center items-center flex-1 rounded-md hover:bg-dark border-none border-2 hover:border-solid uppercase'
]}
target='_blank'
href={href}
href={disabled ? null : href}
>
{icon ? <Image class='rounded-md' width={20} height={20} alt={alt ?? ''} src={icon} /> : null}
<slot />

View file

@ -7,7 +7,6 @@ import BaseLayout from 'layouts/base.astro'
import TrackList from 'components/albumPage/TrackList'
import DownloadBtn from 'components/albumPage/DownloadBtn.astro'
import AlbumBox from 'components/AlbumBox.astro'
import ReleaseDate from 'components/albumPage/releaseDate'
import kofi from 'img/socials/ko-fi-donate-button.png'
import discord from 'img/socials/discord.png'
@ -263,7 +262,7 @@ const { currentLocale } = Astro
</DownloadBtn>
) : null}
{directUrl ? (
<DownloadBtn href={directUrl} direct>
<DownloadBtn href={directUrl} direct server:defer>
{m.direct()}
</DownloadBtn>
) : null}