diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index ec600d8..7eb9086 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -32,6 +32,7 @@ import {default as Modal} from "./modal/Modal.svelte" import ChangeDataDialogue from "./ChangeDataDialogue.svelte"; import {onMount} from "svelte"; + import Pagination from "./Pagination.svelte"; let isAniListLoggedIn: boolean @@ -87,14 +88,6 @@ } }) }) - - function ChangeWatchListPage(newPage: number) { - GetAniListUserWatchingList(newPage, perPage, MediaListSort.UpdatedTimeDesc).then((result) => { - watchListPage.set(newPage) - aniListWatchlist.set(result) - aniListLoggedIn.set(true) - }) - }
@@ -104,50 +97,7 @@

Your AniList WatchList

-
- -
- +
{#each aniListWatchListLoaded.data.Page.mediaList as media} @@ -181,49 +131,7 @@ {/each}
-
- -
+
{/if} diff --git a/frontend/src/Pagination.svelte b/frontend/src/Pagination.svelte new file mode 100644 index 0000000..8b4235b --- /dev/null +++ b/frontend/src/Pagination.svelte @@ -0,0 +1,145 @@ + + +
+ {#if aniListWatchListLoaded.data.Page.pageInfo.lastPage <= 12} + + {/if} +
+
+ +
+ +
+
Total Anime: {aniListWatchListLoaded.data.Page.pageInfo.total}
+ {#if aniListWatchListLoaded.data.Page.pageInfo.lastPage <= 12} +
Page: {page} of {aniListWatchListLoaded.data.Page.pageInfo.lastPage}
+ {:else} +
Page: {page} of {aniListWatchListLoaded.data.Page.pageInfo.lastPage}
+ {/if} +
+ +
+
+ + +
+ Page # +
+ +
+
+
+
\ No newline at end of file