ui: add tags for dub and rebroadcast

This commit is contained in:
2026-02-10 04:26:10 -08:00
parent e0d6e5bc32
commit 48e5719813
7 changed files with 49 additions and 12 deletions

View File

@@ -36,6 +36,8 @@
songName: s.songName,
artistName: s.artistName,
fileName: s.fileName ?? null,
dub: Boolean(s.dub),
rebroadcast: Boolean(s.rebroadcast),
}),
)
.filter((t) => t !== null);
@@ -57,8 +59,8 @@
{#if !data.annId}
<h1 class="text-2xl font-semibold">Anime not found</h1>
<p class="mt-2 text-sm text-muted-foreground">
The requested anime entry doesnt exist (or the route param wasnt a
valid ANN id).
The requested anime entry doesnt exist (or the route param wasnt a valid
ANN id).
</p>
{:else if !data.animeWithSongs}
<p class="mt-3 text-sm text-muted-foreground">Loading anime…</p>
@@ -166,6 +168,8 @@
artistName={s.artistName}
fileName={s.fileName}
globalPercent={s.globalPercent}
dub={Boolean(s.dub)}
rebroadcast={Boolean(s.rebroadcast)}
/>
</li>
{/each}

View File

@@ -159,6 +159,10 @@
.chip input:checked + span {
@apply font-semibold;
}
.tag {
@apply rounded bg-muted px-2 py-0.5 text-sm text-muted-foreground;
}
}
@layer scn {

View File

@@ -62,6 +62,8 @@
songName: r.songName,
artistName: songArtistLabel(r),
fileName: r.fileName,
dub: Boolean(r.dub),
rebroadcast: Boolean(r.rebroadcast),
}),
)
.filter((t) => t !== null),
@@ -184,8 +186,8 @@
{#if (formMal ?? "").trim() && data.username && (data.malResponse?.data.length ?? 0) > 0 && data.songRows.length === 0}
<p class="mt-4 text-sm text-muted-foreground">
No songs matched in the local database. This likely means none of the
MAL anime IDs exist in the AMQ DB.
No songs matched in the local database. This likely means none of the MAL
anime IDs exist in the AMQ DB.
</p>
{/if}
@@ -204,6 +206,8 @@
artistName={songArtistLabel(r)}
fileName={r.fileName}
globalPercent={r.globalPercent}
dub={Boolean(r.dub)}
rebroadcast={Boolean(r.rebroadcast)}
/>
</li>
{/each}

View File

@@ -49,6 +49,8 @@
songName: r.songName,
artistName: songArtistLabel(r),
fileName: r.fileName,
dub: Boolean(r.dub),
rebroadcast: Boolean(r.rebroadcast),
}),
)
.filter((t) => t !== null),
@@ -124,9 +126,7 @@
label="Song Type"
items={Object.keys(AmqSongLinkTypeMap).map((type) => ({
label: type,
value: AmqSongLinkTypeMap[
type as keyof typeof AmqSongLinkTypeMap
],
value: AmqSongLinkTypeMap[type as keyof typeof AmqSongLinkTypeMap],
}))}
bind:value={params.type}
/>
@@ -190,6 +190,8 @@
artistName={songArtistLabel(r)}
fileName={r.fileName}
globalPercent={r.globalPercent}
dub={Boolean(r.dub)}
rebroadcast={Boolean(r.rebroadcast)}
/>
</li>
{/each}