Add a link to the MusicBrainz release (#8).
This commit is contained in:
parent
0a43505bdc
commit
00e87167da
|
@ -37,6 +37,10 @@
|
|||
.no-links {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.divider {
|
||||
border-top: 2px solid var(--background-1);
|
||||
}
|
||||
}
|
||||
|
||||
.release-link {
|
||||
|
|
|
@ -80,8 +80,9 @@ export default class ReleasePage extends Component<Props, State> {
|
|||
`,
|
||||
);
|
||||
|
||||
const releaseUrl = `https://musicbrainz.org/release/${mbid}`;
|
||||
if (urls.length === 0) {
|
||||
const editUrl = `https://musicbrainz.org/release/${mbid}/edit`;
|
||||
const editUrl = `${releaseUrl}/edit`;
|
||||
urls.push(
|
||||
html`
|
||||
<li class="no-links">
|
||||
|
@ -92,6 +93,15 @@ export default class ReleasePage extends Component<Props, State> {
|
|||
</li>
|
||||
`,
|
||||
);
|
||||
} else {
|
||||
urls.push(
|
||||
html`<li class="divider"></li>`,
|
||||
html`
|
||||
<li class="release-link">
|
||||
<${ExternalAnchor} url="${releaseUrl}" text="MusicBrainz" />
|
||||
</li>
|
||||
`,
|
||||
);
|
||||
}
|
||||
|
||||
return html`
|
||||
|
|
Loading…
Reference in New Issue