Skip to content

Commit

Permalink
Allow ExternalLink icons to be styled (#1503)
Browse files Browse the repository at this point in the history
* Allow ArtistExternalLink icons to be styled

* Allow AlbumExternalLink icons to be styled

* Standardize external links' classes to kebab-case

Co-authored-by: Deluan <deluan@navidrome.org>
  • Loading branch information
srichter and deluan committed Sep 30, 2022
1 parent e7fab8b commit 66818b2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ui/src/album/AlbumExternalLinks.js
Expand Up @@ -33,14 +33,14 @@ const AlbumExternalLinks = (props) => {
encodeURIComponent(record.name)
}`,
'message.openIn.lastfm',
<ImLastfm2 />
<ImLastfm2 className="lastfm-icon" />
)

record.mbzAlbumId &&
addLink(
`https://musicbrainz.org/release/${record.mbzAlbumId}`,
'message.openIn.musicbrainz',
<MusicBrainz />
<MusicBrainz className="musicbrainz-icon" />
)

return <div className={className}>{intersperse(links, ' ')}</div>
Expand Down
12 changes: 10 additions & 2 deletions ui/src/artist/ArtistExternalLink.js
Expand Up @@ -36,9 +36,17 @@ const ArtistExternalLinks = ({ artistInfo, record }) => {
linkButtons.push(<span key={`link-${record.id}-${id}`}>{link}</span>)
}

addLink(links[0], 'message.openIn.lastfm', <ImLastfm2 />)
addLink(
links[0],
'message.openIn.lastfm',
<ImLastfm2 className="lastfm-icon" />
)
artistInfo?.musicBrainzId &&
addLink(links[1], 'message.openIn.musicbrainz', <MusicBrainz />)
addLink(
links[1],
'message.openIn.musicbrainz',
<MusicBrainz className="musicbrainz-icon" />
)

return <div>{intersperse(linkButtons, ' ')}</div>
}
Expand Down
8 changes: 8 additions & 0 deletions ui/src/icons/MusicBrainz.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66818b2

Please sign in to comment.