fix tests
Traceability Validation / Check Requirement Traces (push) Has been cancelled
🏗️ Build and Test JellyTau / Build APK and Run Tests (push) Has been cancelled

This commit is contained in:
2026-02-14 16:39:46 +01:00
parent b8363aa993
commit 59270e8a4f
14 changed files with 86 additions and 37 deletions
@@ -39,7 +39,7 @@
};
const circumference = 2 * Math.PI * 15;
const offset = circumference - (state.progress || 0) * circumference;
const offset = $derived(circumference - (state.progress || 0) * circumference);
</script>
<button
@@ -156,13 +156,14 @@
}
}
const aspectRatioClass = config.itemDisplayMode === "poster" ? "aspect-[2/3]" : "aspect-square";
const gridColsClass =
const aspectRatioClass = $derived(config.itemDisplayMode === "poster" ? "aspect-[2/3]" : "aspect-square");
const gridColsClass = $derived(
config.itemDisplayMode === "poster"
? "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5"
: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6";
const searchPlaceholder = config.searchPlaceholder || `Search ${config.title.toLowerCase()}...`;
const noItemsMessage = config.noItemsMessage || `No ${config.itemTypes[0]?.toLowerCase() || "items"} found in this genre`;
: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6"
);
const searchPlaceholder = $derived(config.searchPlaceholder || `Search ${config.title.toLowerCase()}...`);
const noItemsMessage = $derived(config.noItemsMessage || `No ${config.itemTypes[0]?.toLowerCase() || "items"} found in this genre`);
</script>
<div class="space-y-6">
@@ -42,10 +42,14 @@
let loading = $state(true);
let searchQuery = $state("");
let debouncedSearchQuery = $state("");
let sortBy = $state<string>(config.defaultSort);
let sortBy = $state<string>("");
let sortOrder = $state<"Ascending" | "Descending">("Ascending");
let searchTimeout: ReturnType<typeof setTimeout> | null = null;
$effect(() => {
sortBy = config.defaultSort;
});
const { markLoaded } = useServerReachabilityReload(async () => {
await loadItems();
});
@@ -117,7 +121,7 @@
goto(config.backPath);
}
const searchPlaceholder = config.searchPlaceholder || `Search ${config.title.toLowerCase()}...`;
const searchPlaceholder = $derived(config.searchPlaceholder || `Search ${config.title.toLowerCase()}...`);
function handleItemClick(item: MediaItem) {
// Navigate to detail page for browseable items
+36 -24
View File
@@ -254,13 +254,15 @@
<div class="text-gray-300 truncate flex flex-wrap items-center gap-1">
{#if track.artistItems && track.artistItems.length > 0}
{#each track.artistItems as artist, idx}
<button
type="button"
<span
role="button"
tabindex="0"
onclick={(e) => handleArtistClick(artist.id, e)}
class="text-[var(--color-jellyfin)] hover:underline truncate"
onkeydown={(e) => e.key === 'Enter' && handleArtistClick(artist.id, e)}
class="text-[var(--color-jellyfin)] hover:underline truncate cursor-pointer"
>
{artist.name}
</button>
</span>
{#if idx < track.artistItems.length - 1}
<span>,</span>
{/if}
@@ -275,13 +277,15 @@
{#if showAlbum}
<div class="text-gray-300 truncate">
{#if track.albumId}
<button
type="button"
<span
role="button"
tabindex="0"
onclick={(e) => handleAlbumClick(track.albumId, e)}
class="text-[var(--color-jellyfin)] hover:underline truncate"
onkeydown={(e) => e.key === 'Enter' && handleAlbumClick(track.albumId, e)}
class="text-[var(--color-jellyfin)] hover:underline truncate cursor-pointer"
>
{track.albumName || "-"}
</button>
</span>
{:else}
{track.albumName || "-"}
{/if}
@@ -361,13 +365,15 @@
{#if showArtist && showAlbum}
{#if track.artistItems && track.artistItems.length > 0}
{#each track.artistItems as artist, idx}
<button
type="button"
<span
role="button"
tabindex="0"
onclick={(e) => handleArtistClick(artist.id, e)}
class="text-[var(--color-jellyfin)] hover:underline"
onkeydown={(e) => e.key === 'Enter' && handleArtistClick(artist.id, e)}
class="text-[var(--color-jellyfin)] hover:underline cursor-pointer"
>
{artist.name}
</button>
</span>
{#if idx < track.artistItems.length - 1}
<span>,</span>
{/if}
@@ -377,26 +383,30 @@
{/if}
<span></span>
{#if track.albumId}
<button
type="button"
<span
role="button"
tabindex="0"
onclick={(e) => handleAlbumClick(track.albumId, e)}
class="text-[var(--color-jellyfin)] hover:underline"
onkeydown={(e) => e.key === 'Enter' && handleAlbumClick(track.albumId, e)}
class="text-[var(--color-jellyfin)] hover:underline cursor-pointer"
>
{track.albumName || "-"}
</button>
</span>
{:else}
{track.albumName || "-"}
{/if}
{:else if showArtist}
{#if track.artistItems && track.artistItems.length > 0}
{#each track.artistItems as artist, idx}
<button
type="button"
<span
role="button"
tabindex="0"
onclick={(e) => handleArtistClick(artist.id, e)}
class="text-[var(--color-jellyfin)] hover:underline"
onkeydown={(e) => e.key === 'Enter' && handleArtistClick(artist.id, e)}
class="text-[var(--color-jellyfin)] hover:underline cursor-pointer"
>
{artist.name}
</button>
</span>
{#if idx < track.artistItems.length - 1}
<span>,</span>
{/if}
@@ -406,13 +416,15 @@
{/if}
{:else if showAlbum}
{#if track.albumId}
<button
type="button"
<span
role="button"
tabindex="0"
onclick={(e) => handleAlbumClick(track.albumId, e)}
class="text-[var(--color-jellyfin)] hover:underline"
onkeydown={(e) => e.key === 'Enter' && handleAlbumClick(track.albumId, e)}
class="text-[var(--color-jellyfin)] hover:underline cursor-pointer"
>
{track.albumName || "-"}
</button>
</span>
{:else}
{track.albumName || "-"}
{/if}