mirror of
https://github.com/danbulant/Mangades
synced 2026-07-05 02:50:34 +00:00
filter by english
This commit is contained in:
parent
ee77ffee0d
commit
3dd59cda2e
1 changed files with 4 additions and 1 deletions
|
|
@ -13,7 +13,7 @@
|
||||||
$: manga = scoped.manga;
|
$: manga = scoped.manga;
|
||||||
|
|
||||||
async function getMangaChapters(id) {
|
async function getMangaChapters(id) {
|
||||||
const data = await request("manga/" + id + "/feed");
|
const data = await request("manga/" + id + "/feed?translatedLanguage[]=en");
|
||||||
data.results.sort((a, b) => a.data.attributes.chapter - b.data.attributes.chapter);
|
data.results.sort((a, b) => a.data.attributes.chapter - b.data.attributes.chapter);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
@ -221,6 +221,9 @@
|
||||||
{#await chapters}
|
{#await chapters}
|
||||||
Loading chapters...
|
Loading chapters...
|
||||||
{:then chapters}
|
{:then chapters}
|
||||||
|
{#if chapters.results.filter(c => c.data.attributes.translatedLanguage === "en").length === 0}
|
||||||
|
<p>No chapters found.</p>
|
||||||
|
{/if}
|
||||||
<ol class="hide-nums">
|
<ol class="hide-nums">
|
||||||
{#each chapters.results.filter(c => c.data.attributes.translatedLanguage === "en") as chapter}
|
{#each chapters.results.filter(c => c.data.attributes.translatedLanguage === "en") as chapter}
|
||||||
<li on:click={() => prepare(chapter)}>
|
<li on:click={() => prepare(chapter)}>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue