1
Fork 0

Add a link to the MusicBrainz release (#8).

This commit is contained in:
Bauke 2022-01-04 13:04:45 +01:00
parent 0a43505bdc
commit 00e87167da
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 15 additions and 1 deletions

View File

@ -37,6 +37,10 @@
.no-links {
text-align: center;
}
.divider {
border-top: 2px solid var(--background-1);
}
}
.release-link {

View File

@ -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`