This commit is contained in:
Sofía Aritz 2024-06-30 19:23:23 +02:00
parent d900dbe87d
commit 83ad4588db
Signed by: sofia
GPG key ID: 90B5116E3542B28F
3 changed files with 17 additions and 10 deletions

View file

@ -5,7 +5,6 @@ export default [
pluginJs.configs.recommended, pluginJs.configs.recommended,
{ languageOptions: { globals: globals.node } }, { languageOptions: { globals: globals.node } },
{ {
// FIXME: Figure this out...
ignores: [".pnp.cjs", ".pnp.loader.mjs"], ignores: [".pnp.cjs", ".pnp.loader.mjs"],
}, },
]; ];

View file

@ -121,9 +121,13 @@
> >
<div slot="contracted"> <div slot="contracted">
{#if entry.base.kind === 'song' || entry.base.kind === 'album'} {#if entry.base.kind === 'song' || entry.base.kind === 'album'}
<ExternalLink href={entry.base.link[0]}> {#if entry.base.link[0] != null}
{entry.base.artist} &dash; {entry.base.title} <ExternalLink href={entry.base.link[0]}>
</ExternalLink> {entry.base.artist} &dash; {entry.base.title}
</ExternalLink>
{:else}
<span class="font-bold">{entry.base.artist} &dash; {entry.base.title}</span>
{/if}
{/if} {/if}
{#if entry.base.kind === 'feeling'} {#if entry.base.kind === 'feeling'}
@ -159,9 +163,13 @@
</div> </div>
{#if entry.base.kind === 'song' || entry.base.kind === 'album'} {#if entry.base.kind === 'song' || entry.base.kind === 'album'}
<ExternalLink href={entry.base.link[0]}> {#if entry.base.link[0] != null}
{entry.base.artist} &dash; {entry.base.title} <ExternalLink href={entry.base.link[0]}>
</ExternalLink> {entry.base.artist} &dash; {entry.base.title}
</ExternalLink>
{:else}
<span class="font-bold">{entry.base.artist} &dash; {entry.base.title}</span>
{/if}
{/if} {/if}
{#if entry.base.kind === "environment" && typeof entry.base.location === "string"} {#if entry.base.kind === "environment" && typeof entry.base.location === "string"}

View file

@ -41,7 +41,7 @@
link: [values.spotify, values.yt, values.otherProvider].filter( link: [values.spotify, values.yt, values.otherProvider].filter(
(v) => v != null && v.length > 0 (v) => v != null && v.length > 0
), ),
// FIXME: infer univeersal ids // FIXME: Infer Universal IDs (Spotify URL, etc)
id: [] id: []
}; };
} else if (values.kind === 'environment') { } else if (values.kind === 'environment') {
@ -95,11 +95,11 @@
errors['musicTitle'] = 'Must not be empty'; errors['musicTitle'] = 'Must not be empty';
} }
// FIXME: When asset support is added, another precondition is that no asset is uploaded
if ( if (
values.spotify.length === 0 && values.spotify.length === 0 &&
values.yt.length === 0 && values.yt.length === 0 &&
values.otherProvider.length === 0 values.otherProvider.length === 0 &&
(values.asset == null || typeof values.asset !== "object")
) { ) {
errors['links'] = 'You must add at least one link or upload an audio asset'; errors['links'] = 'You must add at least one link or upload an audio asset';
} }