From 83ad4588db6332534a9eeffb4913979bdbe11531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sof=C3=ADa=20Aritz?= Date: Sun, 30 Jun 2024 19:23:23 +0200 Subject: [PATCH] cleanup --- asset-api/eslint.config.js | 1 - .../src/routes/dashboard/Entries.svelte | 20 +++++++++++++------ .../src/routes/entry/new/+page.svelte | 6 +++--- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/asset-api/eslint.config.js b/asset-api/eslint.config.js index 22af061..199a361 100644 --- a/asset-api/eslint.config.js +++ b/asset-api/eslint.config.js @@ -5,7 +5,6 @@ export default [ pluginJs.configs.recommended, { languageOptions: { globals: globals.node } }, { - // FIXME: Figure this out... ignores: [".pnp.cjs", ".pnp.loader.mjs"], }, ]; diff --git a/identity-web/src/routes/dashboard/Entries.svelte b/identity-web/src/routes/dashboard/Entries.svelte index 4699291..ead9689 100644 --- a/identity-web/src/routes/dashboard/Entries.svelte +++ b/identity-web/src/routes/dashboard/Entries.svelte @@ -121,9 +121,13 @@ >
{#if entry.base.kind === 'song' || entry.base.kind === 'album'} - - {entry.base.artist} ‐ {entry.base.title} - + {#if entry.base.link[0] != null} + + {entry.base.artist} ‐ {entry.base.title} + + {:else} + {entry.base.artist} ‐ {entry.base.title} + {/if} {/if} {#if entry.base.kind === 'feeling'} @@ -159,9 +163,13 @@
{#if entry.base.kind === 'song' || entry.base.kind === 'album'} - - {entry.base.artist} ‐ {entry.base.title} - + {#if entry.base.link[0] != null} + + {entry.base.artist} ‐ {entry.base.title} + + {:else} + {entry.base.artist} ‐ {entry.base.title} + {/if} {/if} {#if entry.base.kind === "environment" && typeof entry.base.location === "string"} diff --git a/identity-web/src/routes/entry/new/+page.svelte b/identity-web/src/routes/entry/new/+page.svelte index de14149..1af9d3a 100644 --- a/identity-web/src/routes/entry/new/+page.svelte +++ b/identity-web/src/routes/entry/new/+page.svelte @@ -41,7 +41,7 @@ link: [values.spotify, values.yt, values.otherProvider].filter( (v) => v != null && v.length > 0 ), - // FIXME: infer univeersal ids + // FIXME: Infer Universal IDs (Spotify URL, etc) id: [] }; } else if (values.kind === 'environment') { @@ -95,11 +95,11 @@ errors['musicTitle'] = 'Must not be empty'; } - // FIXME: When asset support is added, another precondition is that no asset is uploaded if ( values.spotify.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'; }