mirror of
https://github.com/danbulant/Mangades
synced 2026-06-18 22:01:10 +00:00
some fixes
This commit is contained in:
parent
d53f829fed
commit
7a0e9f64f5
6 changed files with 24 additions and 11 deletions
|
|
@ -64,6 +64,9 @@
|
|||
</div>
|
||||
|
||||
<style>
|
||||
.item {
|
||||
color: white;
|
||||
}
|
||||
.description {
|
||||
line-height: 1.5rem;
|
||||
height: calc(1.5rem * 3);
|
||||
|
|
@ -103,6 +106,9 @@
|
|||
.cover-container {
|
||||
position: relative;
|
||||
}
|
||||
.list .cover-container {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.over {
|
||||
display: -webkit-box;
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
import { flip } from "svelte/animate";
|
||||
import { blur } from "svelte/transition";
|
||||
import Item from "./item.svelte";
|
||||
import { showNsfw } from "./showNsfwChooser.svelte";
|
||||
import { showType } from "./showTypeChooser.svelte";
|
||||
|
||||
export var entries;
|
||||
|
|
@ -10,7 +11,7 @@
|
|||
|
||||
|
||||
<div class="items" class:list={$showType == "list"}>
|
||||
{#each entries as entry (entry.id)}
|
||||
{#each entries.filter(t => $showNsfw !== "hide" || ["safe", "suggestive"].includes(t.attributes.contentRating)) as entry (entry.id)}
|
||||
<a href="/{entry.id}" animate:flip transition:blur>
|
||||
<Item
|
||||
r18={!["safe", "suggestive"].includes(entry.attributes.contentRating)}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<svelte:window bind:innerWidth={width} on:keydown={handleKeyDown} />
|
||||
|
||||
<div class="navbar flex" class:full-text={small && focused}>
|
||||
<h1>Library</h1>
|
||||
<a href="/"><h1>Library</h1></a>
|
||||
|
||||
<div class="search">
|
||||
<input type="text" bind:this={textfield} on:focus={() => focused = true} on:blur={() => focused = false} placeholder="{isLogedIn() ? "Search for manga or enter URL of mangadex.org manga" : "Enter UUID or URL of mangadex.org manga"}" bind:value={name}>
|
||||
|
|
@ -61,6 +61,10 @@
|
|||
<div class="spacer"></div>
|
||||
|
||||
<style>
|
||||
a h1 {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
.full-text h1, .full-text .right {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ const ratelimits = new Map();
|
|||
|
||||
function callback({ func }) {
|
||||
const params = ratelimits.get(func);
|
||||
console.log(params, func, ratelimits);
|
||||
console.log("ratelimit", params, func, ratelimits);
|
||||
func(...params.params).then(params.result.resolve).catch(params.result.reject);
|
||||
ratelimits.delete(func);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@
|
|||
let additionalImages = [];
|
||||
|
||||
$: if(anilistData) anilistData.then(data => {
|
||||
if(data.bannerImage && !additionalImages.find(t => t.src === data.bannerImage)) {
|
||||
if(data && data.bannerImage && !additionalImages.find(t => t.src === data.bannerImage)) {
|
||||
additionalImages.push({
|
||||
src: data.coverImage.large,
|
||||
alt: "Cover image from anilist",
|
||||
|
|
@ -354,7 +354,7 @@
|
|||
</ArtDialog>
|
||||
|
||||
{#if anilistData} {#await anilistData then data}
|
||||
{#if data.bannerImage}
|
||||
{#if data && data.bannerImage}
|
||||
<div class="banner-container">
|
||||
<img class="banner" src={data.bannerImage} on:click={() => selectedImage = data.bannerImage} alt="">
|
||||
<div class="fader"></div>
|
||||
|
|
@ -380,7 +380,7 @@
|
|||
{#if manga.year}
|
||||
{manga.year} ·
|
||||
{/if}
|
||||
{#if anilistData} {#await anilistData then data} {data.status} · {/await} {/if}
|
||||
{#if anilistData} {#await anilistData then data}{#if data && data.status} {data.status} · {/if} {/await} {/if}
|
||||
{manga.contentRating}
|
||||
</h3>
|
||||
{#if relationships.find(t => t.type === "author")}
|
||||
|
|
@ -482,7 +482,7 @@
|
|||
{/if}
|
||||
<table>
|
||||
<tbody>
|
||||
{#each chapters.data as chapter, i}
|
||||
{#each chapters.data as chapter}
|
||||
<Chapter progress={(progressMap.get(chapter.id) || 0) / chapter.attributes.pages} {chapter} disabledDownload={!!progress} selected={selected.includes(chapter)} on:select={() => select(chapter)} on:download={() => downloadSingle(chapter)} />
|
||||
{/each}
|
||||
</tbody>
|
||||
|
|
@ -498,7 +498,7 @@
|
|||
<SwiperSlide>
|
||||
<div class="more-info" style="min-height: 30rem;">
|
||||
<div class="flex-wrapped">
|
||||
{#if anilistData} {#await anilistData then data}
|
||||
{#if anilistData} {#await anilistData then data} {#if data}
|
||||
<div>
|
||||
<b>Genres</b>: {data.genres.join(", ")}
|
||||
<br>
|
||||
|
|
@ -510,7 +510,7 @@
|
|||
|
||||
<br><br>
|
||||
</div>
|
||||
{/await} {/if}
|
||||
{/if} {/await} {/if}
|
||||
{#if manga.links}
|
||||
<div>
|
||||
<h4>Links</h4>
|
||||
|
|
@ -563,7 +563,7 @@
|
|||
</SwiperSlide>
|
||||
<SwiperSlide>
|
||||
<div class="characters" style="min-height: 30rem;">
|
||||
{#await anilistData then data}{#if data}
|
||||
{#await anilistData then data}{#if data && data.characters?.edges.length}
|
||||
{#each data.characters.edges as character}
|
||||
<div class="character" on:click={() => {selectedImage = character.node.image.large; selectedCharacter = character}} >
|
||||
<div class="container">
|
||||
|
|
|
|||
|
|
@ -92,6 +92,8 @@
|
|||
$showNsfw;
|
||||
setTimeout(() => dispatch("slideToClosest"), 100);
|
||||
}
|
||||
|
||||
$: relations.then(relations => console.log("relations", relations));
|
||||
</script>
|
||||
|
||||
<div class="flex">
|
||||
|
|
@ -101,7 +103,7 @@
|
|||
</div>
|
||||
|
||||
<div class="grid" class:list={$showType == "list"}>
|
||||
{#each mangaRelations.filter(t => $showNsfw !== "hide" || ["safe", "suggestive"].includes(t.attributes.contentRating)) as manga (manga.id)}
|
||||
{#each mangaRelations.filter((t, i, a) => a.findIndex(b => b.id == t.id) == i).filter(t => $showNsfw !== "hide" || ["safe", "suggestive"].includes(t.attributes.contentRating)) as manga (manga.id)}
|
||||
<a href="/{manga.id}" class="manga" animate:flip={{ duration: d=>Math.sqrt(d)*10 }} transition:blur>
|
||||
{#await relations then relations}
|
||||
<Item
|
||||
|
|
|
|||
Loading…
Reference in a new issue