diff --git a/src/lib/components/VolumeItem.svelte b/src/lib/components/VolumeItem.svelte index 234d20a..d661028 100644 --- a/src/lib/components/VolumeItem.svelte +++ b/src/lib/components/VolumeItem.svelte @@ -1,40 +1,72 @@ {#if $page.params.manga} - - + + goto(`/${$page.params.manga}/${volume_uuid}`)} + normalClass="py-4" + > - {decodeURI(volumeName)} + {volName} {progressDisplay} - {#if isComplete} - - {/if} + + + {#if isComplete} + + {/if} + - + {/if} diff --git a/src/routes/[manga]/+page.svelte b/src/routes/[manga]/+page.svelte index 0995ec4..34a4569 100644 --- a/src/routes/[manga]/+page.svelte +++ b/src/routes/[manga]/+page.svelte @@ -21,23 +21,6 @@ $: manga = $catalog?.find((item) => item.id === $page.params.manga)?.manga.sort(sortManga); - $: stats = manga - ?.map((vol) => vol.mokuroData.volume_uuid) - ?.reduce( - (stats: any, volumeId) => { - const timeReadInMinutes = $volumes[volumeId]?.timeReadInMinutes || 0; - const chars = $volumes[volumeId]?.chars || 0; - const completed = $volumes[volumeId]?.completed || 0; - - stats.timeReadInMinutes = stats.timeReadInMinutes + timeReadInMinutes; - stats.chars = stats.chars + chars; - stats.completed = stats.completed + completed; - - return stats; - }, - { timeReadInMinutes: 0, chars: 0, completed: 0 } - ); - $: loading = false; async function confirmDelete() { @@ -84,8 +67,10 @@ - - + + {#each manga as volume (volume.mokuroData.volume_uuid)} + + {/each} {:else}
{decodeURI(volumeName)}
{volName}
{progressDisplay}