From 60a38ff569cbf851011194ae809c924e351ab821 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Mon, 9 Sep 2024 12:03:46 -0400 Subject: [PATCH] improved loading for change individual anime from search --- frontend/src/App.svelte | 12 +++- .../{routes => helperComponents}/Anime.svelte | 19 ++++-- .../src/helperComponents/AnimeTable.svelte | 4 ++ frontend/src/helperComponents/Header.svelte | 10 +-- .../helperDefaults/AniListGetSingleAnime.ts | 65 +++++++++++++++++++ ...ckIfAniListLoggedInAndLoadWatchList.svelte | 33 +++++----- .../GlobalVariablesAndHelperFunctions.svelte | 3 +- frontend/src/helperTypes/TableTypes.ts | 1 + frontend/src/routes/AnimeRoutePage.svelte | 9 +++ 9 files changed, 123 insertions(+), 33 deletions(-) rename frontend/src/{routes => helperComponents}/Anime.svelte (97%) create mode 100644 frontend/src/helperDefaults/AniListGetSingleAnime.ts create mode 100644 frontend/src/routes/AnimeRoutePage.svelte diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index b5311d3..bfb4e80 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -1,6 +1,5 @@
+
{ await CheckIfAniListLoggedInAndLoadWatchList() - return pop() + return push('/') }}> - Back + Go Home
diff --git a/frontend/src/helperComponents/AnimeTable.svelte b/frontend/src/helperComponents/AnimeTable.svelte index 819ca2f..6cb756c 100644 --- a/frontend/src/helperComponents/AnimeTable.svelte +++ b/frontend/src/helperComponents/AnimeTable.svelte @@ -12,6 +12,10 @@ header: "Service Id", accessor: 'id', }), + table.column({ + header: "Anime Title", + accessor: "title", + }), table.column({ header: 'Service', accessor: 'service', diff --git a/frontend/src/helperComponents/Header.svelte b/frontend/src/helperComponents/Header.svelte index 834d072..a52083f 100644 --- a/frontend/src/helperComponents/Header.svelte +++ b/frontend/src/helperComponents/Header.svelte @@ -16,8 +16,7 @@ import type {MyAnimeListUser} from "../mal/types/MALTypes"; import AvatarMenu from "./AvatarMenu.svelte"; import logo from "../assets/images/AniTrackLogo.svg" - import {location, pop} from "svelte-spa-router"; - import {CheckIfAniListLoggedInAndLoadWatchList} from "../helperModules/CheckIfAniListLoggedInAndLoadWatchList.svelte"; + import {location} from "svelte-spa-router"; let isAniListLoggedIn: boolean let isSimklLoggedIn: boolean @@ -40,14 +39,7 @@