diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index c766ab1..d042240 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -5,42 +5,19 @@ CheckIfSimklLoggedIn, GetAniListLoggedInUser, GetAniListUserWatchingList, - GetSimklLoggedInUser, SimklGetUserWatchlist, + GetSimklLoggedInUser, + SimklGetUserWatchlist, } from "../wailsjs/go/main/App"; import {type AniListUser, MediaListSort} from "./anilist/types/AniListTypes"; import type {AniListCurrentUserWatchList} from "./anilist/types/AniListCurrentUserWatchListType" import Header from "./Header.svelte"; - import StarRatting from '@ernane/svelte-star-rating' - import {Button, Modal} from "flowbite-svelte"; - + import {Button, Rating} from "flowbite-svelte"; + import {default as Modal} from "./modal/Modal.svelte" import ChangeDataDialogue from "./ChangeDataDialogue.svelte"; import {onMount} from "svelte"; import type {SimklUser, SimklWatchList} from "./simkl/types/simklTypes"; import {writable} from "svelte/store"; - const config = { - readOnly: false, - countStars: 5, - range: { - min: 0, - max: 5, - step: 0.5 - }, - score: 0.0, - showScore: true, - scoreFormat: function () { - return `(${this.score.toFixed(1)}/${this.countStars})` - }, - name: "", - starConfig: { - size: 20, - fillColor: '#F9ED4F', - strokeColor: "#e2c714", - unfilledColor: '#FFF', - strokeUnfilledColor: '#000' - } - } - let aniListLoggedIn = false let aniListPrimary = true let simklUser: SimklUser @@ -99,24 +76,24 @@ }) } - function anilistGetUserWatchlist(): void { - GetAniListUserWatchingList(page, perPage, MediaListSort.UpdatedTimeDesc).then((result) => { - aniListWatchlist = result - aniListLoggedIn = true - }) - } - - let count = 1; - - const decrement = () => { - if (count > 0) { - count-- - } - } - - const increment = () => { - count++ - } + // function anilistGetUserWatchlist(): void { + // GetAniListUserWatchingList(page, perPage, MediaListSort.UpdatedTimeDesc).then((result) => { + // aniListWatchlist = result + // aniListLoggedIn = true + // }) + // } + // + // let count = 1; + // + // const decrement = () => { + // if (count > 0) { + // count-- + // } + // } + // + // const increment = () => { + // count++ + // } @@ -137,75 +114,43 @@ {/if} {#if aniListLoggedIn} -
-

Your Watching List

+
+

Your Watching List

{#each aniListWatchlist.data.Page.mediaList as media}
- + +
- + media.media.title.romaji : + media.media.title.english + } + +

{media.progress} + / {media.media.nextAiringEpisode.episode !== 0 ? + media.media.nextAiringEpisode.episode - 1 : media.media.episodes}

+ {#if media.media.episodes > 0} +

Total + Episodes: {media.media.episodes}

+ {/if} +
{/each}
{/if} -
- - - -
- - - - - - - - - - - - - - - - - - -