mirror of
https://github.com/danbulant/Mangades
synced 2026-06-24 17:11:45 +00:00
fix image loading
This commit is contained in:
parent
d3c3283b4d
commit
d30d5bbda1
3 changed files with 5 additions and 4 deletions
|
|
@ -14,7 +14,7 @@
|
||||||
Loading art
|
Loading art
|
||||||
{:then list}
|
{:then list}
|
||||||
{#each list.data.sort((a, b) => a.attributes.volume - b.attributes.volume) as item}
|
{#each list.data.sort((a, b) => a.attributes.volume - b.attributes.volume) as item}
|
||||||
<img on:click={() => selectedImage = `{imageproxy}https://uploads.mangadex.org/covers/${mangaId}/${item.attributes.fileName}.512.jpg`} width=512 height=805 src="https://uploads.mangadex.org/covers/{mangaId}/{item.attributes.fileName}.512.jpg" alt="" draggable={false}>
|
<img on:click={() => selectedImage = `${imageproxy}https://uploads.mangadex.org/covers/${mangaId}/${item.attributes.fileName}.512.jpg`} width=512 height=805 src="{imageproxy}https://uploads.mangadex.org/covers/{mangaId}/{item.attributes.fileName}.512.jpg" alt="" draggable={false}>
|
||||||
{/each}
|
{/each}
|
||||||
{/await}
|
{/await}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
<a href="/{entry.id}" class="item" class:r18={!["safe", "suggestive"].includes(entry.attributes.contentRating)} on:click={() => open(entry)}>
|
<a href="/{entry.id}" class="item" class:r18={!["safe", "suggestive"].includes(entry.attributes.contentRating)} on:click={() => open(entry)}>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
{#if entry.relationships.find(t => t.type === "cover_art")}
|
{#if entry.relationships.find(t => t.type === "cover_art")}
|
||||||
<img class="cover" draggable="false" src="{imageproxy}/https://uploads.mangadex.org/covers/{entry.id}/{entry.relationships.find(t => t.type === "cover_art").attributes.fileName}.512.jpg" alt="{title}" {title}>
|
<img class="cover" draggable="false" src="{imageproxy}https://uploads.mangadex.org/covers/{entry.id}/{entry.relationships.find(t => t.type === "cover_art").attributes.fileName}.512.jpg" alt="{title}" {title}>
|
||||||
{:else}
|
{:else}
|
||||||
Broken art
|
Broken art
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { goto, url } from "@roxi/routify/runtime/helpers";
|
import { goto, url } from "@roxi/routify/runtime/helpers";
|
||||||
import { imageproxy } from "../../../util/request";
|
import { imageproxy, proxy } from "../../../util/request";
|
||||||
|
|
||||||
export var page;
|
export var page;
|
||||||
export var scoped;
|
export var scoped;
|
||||||
|
|
@ -177,6 +177,7 @@
|
||||||
|
|
||||||
ratio = imageHeight / imageWidth - 3;
|
ratio = imageHeight / imageWidth - 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:window on:keydown={keydown} on:keyup={keyup} on:resize={isZooming} />
|
<svelte:window on:keydown={keydown} on:keyup={keyup} on:resize={isZooming} />
|
||||||
|
|
@ -190,7 +191,7 @@
|
||||||
<a class="back" href={$url("../..")}>Back to chapter list</a>
|
<a class="back" href={$url("../..")}>Back to chapter list</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img draggable={false} bind:this={image} style="height: {actualHeight}px" on:load={loaded} on:touchstart={handleTouchStart} on:touchmove={handleTouchMove} on:mousedown={mouseclick} on:mouseup={preventDefault} src={`${imageproxy}/${atHome.baseUrl}/${quality}/${atHome.chapter.hash}/${atHome.chapter[quality][page - 1]}`} alt="Page {page} in chapter {chapter.attributes.chapter} of {manga.title.en}">
|
<img draggable={false} bind:this={image} style="height: {actualHeight}px" on:load={loaded} on:touchstart={handleTouchStart} on:touchmove={handleTouchMove} on:mousedown={mouseclick} on:mouseup={preventDefault} src={`${imageproxy}${atHome.baseUrl}/${quality}/${atHome.chapter.hash}/${atHome.chapter[quality][page - 1]}`} alt="Page {page} in chapter {chapter.attributes.chapter} of {manga.title.en}">
|
||||||
|
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
{#if page > 1}
|
{#if page > 1}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue