Handle database
This commit is contained in:
@@ -5,14 +5,28 @@
|
||||
import MangaPage from './MangaPage.svelte';
|
||||
|
||||
const volume = $currentVolume;
|
||||
let page = 1;
|
||||
|
||||
let pages = volume?.mokuroData.pages;
|
||||
function right() {
|
||||
page++;
|
||||
}
|
||||
|
||||
function left() {
|
||||
if (page > 1) {
|
||||
page--;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if volume}
|
||||
<div>
|
||||
<Button on:click={zoomOriginal}>Reset Zoom</Button>
|
||||
<Button on:click={left}>{'<'}</Button>
|
||||
<Button on:click={right}>{'>'}</Button>
|
||||
</div>
|
||||
<Panzoom>
|
||||
<MangaPage />
|
||||
<MangaPage page={pages[page - 1]} src={Object.values(volume?.files)[page - 1]} />
|
||||
</Panzoom>
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user