mirror of
https://github.com/danbulant/Mangades
synced 2026-06-16 04:41:21 +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
|
||||
{:then list}
|
||||
{#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}
|
||||
{/await}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<a href="/{entry.id}" class="item" class:r18={!["safe", "suggestive"].includes(entry.attributes.contentRating)} on:click={() => open(entry)}>
|
||||
<div class="flex">
|
||||
{#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}
|
||||
Broken art
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { goto, url } from "@roxi/routify/runtime/helpers";
|
||||
import { imageproxy } from "../../../util/request";
|
||||
import { imageproxy, proxy } from "../../../util/request";
|
||||
|
||||
export var page;
|
||||
export var scoped;
|
||||
|
|
@ -177,6 +177,7 @@
|
|||
|
||||
ratio = imageHeight / imageWidth - 3;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<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>
|
||||
</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">
|
||||
{#if page > 1}
|
||||
|
|
|
|||
Loading…
Reference in a new issue