Handle database

This commit is contained in:
ZXY101
2023-08-09 10:27:58 +02:00
parent 4e645467bb
commit 416b832f63
17 changed files with 14576 additions and 258 deletions

View File

@@ -1,22 +1,22 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import { currentManga, currentVolume } from '$lib/catalog';
import type { Volume } from '$lib/types/catalog';
import { currentVolume } from '$lib/catalog';
import type { Volume } from '$lib/upload';
export let volume: Volume;
const { cover, title, currentPage, totalPages } = volume;
const { volumeName, files } = volume;
function onClick() {
currentVolume.set(volume);
}
</script>
<a href={`${$page.params.manga}/${title}`} on:click={onClick}>
<a href={`${$page.params.manga}/${volumeName}`} on:click={onClick}>
<div class="content">
{title}
<img src={cover} alt={title} />
{currentPage} / {totalPages}
{volumeName}
{#if files}
<img src={URL.createObjectURL(Object.values(files)[0])} alt="img" />
{/if}
</div>
</a>