only show lastfm/listenbrainz if configured

This commit is contained in:
Kendall Garner 2025-06-24 17:58:43 -07:00
parent 5878f89339
commit 8c4a7f4f91
No known key found for this signature in database
GPG key ID: 9355F387FE765C94
2 changed files with 41 additions and 37 deletions

View file

@ -400,25 +400,27 @@ export const AlbumDetailContent = ({ background, tableRef }: AlbumDetailContentP
{externalLinks && (lastFM || musicBrainz) ? ( {externalLinks && (lastFM || musicBrainz) ? (
<section> <section>
<Group gap="sm"> <Group gap="sm">
<ActionIcon {lastFM && (
component="a" <ActionIcon
href={`https://www.last.fm/music/${encodeURIComponent( component="a"
detailQuery?.data?.albumArtist || '', href={`https://www.last.fm/music/${encodeURIComponent(
)}/${encodeURIComponent(detailQuery.data?.name || '')}`} detailQuery?.data?.albumArtist || '',
icon="brandLastfm" )}/${encodeURIComponent(detailQuery.data?.name || '')}`}
iconProps={{ icon="brandLastfm"
fill: 'default', iconProps={{
size: 'xl', fill: 'default',
}} size: 'xl',
radius="md" }}
rel="noopener noreferrer" radius="md"
target="_blank" rel="noopener noreferrer"
tooltip={{ target="_blank"
label: t('action.openIn.lastfm'), tooltip={{
}} label: t('action.openIn.lastfm'),
variant="subtle" }}
/> variant="subtle"
{mbzId ? ( />
)}
{mbzId && musicBrainz ? (
<ActionIcon <ActionIcon
component="a" component="a"
href={`https://musicbrainz.org/release/${mbzId}`} href={`https://musicbrainz.org/release/${mbzId}`}

View file

@ -439,24 +439,26 @@ export const AlbumArtistDetailContent = ({ background }: AlbumArtistDetailConten
{externalLinks && (lastFM || musicBrainz) ? ( {externalLinks && (lastFM || musicBrainz) ? (
<section> <section>
<Group gap="sm"> <Group gap="sm">
<ActionIcon {lastFM && (
component="a" <ActionIcon
href={`https://www.last.fm/music/${encodeURIComponent( component="a"
detailQuery?.data?.name || '', href={`https://www.last.fm/music/${encodeURIComponent(
)}`} detailQuery?.data?.name || '',
icon="brandLastfm" )}`}
iconProps={{ icon="brandLastfm"
fill: 'default', iconProps={{
size: 'xl', fill: 'default',
}} size: 'xl',
rel="noopener noreferrer" }}
target="_blank" rel="noopener noreferrer"
tooltip={{ target="_blank"
label: t('action.openIn.lastfm'), tooltip={{
}} label: t('action.openIn.lastfm'),
variant="subtle" }}
/> variant="subtle"
{mbzId ? ( />
)}
{mbzId && musicBrainz ? (
<ActionIcon <ActionIcon
component="a" component="a"
href={`https://musicbrainz.org/artist/${mbzId}`} href={`https://musicbrainz.org/artist/${mbzId}`}