mirror of
https://github.com/danbulant/Mangades
synced 2026-07-05 19:10:58 +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>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.item {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
.description {
|
.description {
|
||||||
line-height: 1.5rem;
|
line-height: 1.5rem;
|
||||||
height: calc(1.5rem * 3);
|
height: calc(1.5rem * 3);
|
||||||
|
|
@ -103,6 +106,9 @@
|
||||||
.cover-container {
|
.cover-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
.list .cover-container {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
.over {
|
.over {
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
import { flip } from "svelte/animate";
|
import { flip } from "svelte/animate";
|
||||||
import { blur } from "svelte/transition";
|
import { blur } from "svelte/transition";
|
||||||
import Item from "./item.svelte";
|
import Item from "./item.svelte";
|
||||||
|
import { showNsfw } from "./showNsfwChooser.svelte";
|
||||||
import { showType } from "./showTypeChooser.svelte";
|
import { showType } from "./showTypeChooser.svelte";
|
||||||
|
|
||||||
export var entries;
|
export var entries;
|
||||||
|
|
@ -10,7 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="items" class:list={$showType == "list"}>
|
<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>
|
<a href="/{entry.id}" animate:flip transition:blur>
|
||||||
<Item
|
<Item
|
||||||
r18={!["safe", "suggestive"].includes(entry.attributes.contentRating)}
|
r18={!["safe", "suggestive"].includes(entry.attributes.contentRating)}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
<svelte:window bind:innerWidth={width} on:keydown={handleKeyDown} />
|
<svelte:window bind:innerWidth={width} on:keydown={handleKeyDown} />
|
||||||
|
|
||||||
<div class="navbar flex" class:full-text={small && focused}>
|
<div class="navbar flex" class:full-text={small && focused}>
|
||||||
<h1>Library</h1>
|
<a href="/"><h1>Library</h1></a>
|
||||||
|
|
||||||
<div class="search">
|
<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}>
|
<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>
|
<div class="spacer"></div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
a h1 {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
.full-text h1, .full-text .right {
|
.full-text h1, .full-text .right {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ const ratelimits = new Map();
|
||||||
|
|
||||||
function callback({ func }) {
|
function callback({ func }) {
|
||||||
const params = ratelimits.get(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);
|
func(...params.params).then(params.result.resolve).catch(params.result.reject);
|
||||||
ratelimits.delete(func);
|
ratelimits.delete(func);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,7 @@
|
||||||
let additionalImages = [];
|
let additionalImages = [];
|
||||||
|
|
||||||
$: if(anilistData) anilistData.then(data => {
|
$: 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({
|
additionalImages.push({
|
||||||
src: data.coverImage.large,
|
src: data.coverImage.large,
|
||||||
alt: "Cover image from anilist",
|
alt: "Cover image from anilist",
|
||||||
|
|
@ -354,7 +354,7 @@
|
||||||
</ArtDialog>
|
</ArtDialog>
|
||||||
|
|
||||||
{#if anilistData} {#await anilistData then data}
|
{#if anilistData} {#await anilistData then data}
|
||||||
{#if data.bannerImage}
|
{#if data && data.bannerImage}
|
||||||
<div class="banner-container">
|
<div class="banner-container">
|
||||||
<img class="banner" src={data.bannerImage} on:click={() => selectedImage = data.bannerImage} alt="">
|
<img class="banner" src={data.bannerImage} on:click={() => selectedImage = data.bannerImage} alt="">
|
||||||
<div class="fader"></div>
|
<div class="fader"></div>
|
||||||
|
|
@ -380,7 +380,7 @@
|
||||||
{#if manga.year}
|
{#if manga.year}
|
||||||
{manga.year} ·
|
{manga.year} ·
|
||||||
{/if}
|
{/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}
|
{manga.contentRating}
|
||||||
</h3>
|
</h3>
|
||||||
{#if relationships.find(t => t.type === "author")}
|
{#if relationships.find(t => t.type === "author")}
|
||||||
|
|
@ -482,7 +482,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<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)} />
|
<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}
|
{/each}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
@ -498,7 +498,7 @@
|
||||||
<SwiperSlide>
|
<SwiperSlide>
|
||||||
<div class="more-info" style="min-height: 30rem;">
|
<div class="more-info" style="min-height: 30rem;">
|
||||||
<div class="flex-wrapped">
|
<div class="flex-wrapped">
|
||||||
{#if anilistData} {#await anilistData then data}
|
{#if anilistData} {#await anilistData then data} {#if data}
|
||||||
<div>
|
<div>
|
||||||
<b>Genres</b>: {data.genres.join(", ")}
|
<b>Genres</b>: {data.genres.join(", ")}
|
||||||
<br>
|
<br>
|
||||||
|
|
@ -510,7 +510,7 @@
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
</div>
|
</div>
|
||||||
{/await} {/if}
|
{/if} {/await} {/if}
|
||||||
{#if manga.links}
|
{#if manga.links}
|
||||||
<div>
|
<div>
|
||||||
<h4>Links</h4>
|
<h4>Links</h4>
|
||||||
|
|
@ -563,7 +563,7 @@
|
||||||
</SwiperSlide>
|
</SwiperSlide>
|
||||||
<SwiperSlide>
|
<SwiperSlide>
|
||||||
<div class="characters" style="min-height: 30rem;">
|
<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}
|
{#each data.characters.edges as character}
|
||||||
<div class="character" on:click={() => {selectedImage = character.node.image.large; selectedCharacter = character}} >
|
<div class="character" on:click={() => {selectedImage = character.node.image.large; selectedCharacter = character}} >
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,8 @@
|
||||||
$showNsfw;
|
$showNsfw;
|
||||||
setTimeout(() => dispatch("slideToClosest"), 100);
|
setTimeout(() => dispatch("slideToClosest"), 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$: relations.then(relations => console.log("relations", relations));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
|
|
@ -101,7 +103,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid" class:list={$showType == "list"}>
|
<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>
|
<a href="/{manga.id}" class="manga" animate:flip={{ duration: d=>Math.sqrt(d)*10 }} transition:blur>
|
||||||
{#await relations then relations}
|
{#await relations then relations}
|
||||||
<Item
|
<Item
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue