improved loading for change individual anime from search

This commit is contained in:
2024-09-09 12:03:46 -04:00
parent 45b11fa8f4
commit 60a38ff569
9 changed files with 123 additions and 33 deletions

View File

@ -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 @@
<nav class="bg-white border-gray-200 dark:bg-gray-900">
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<div class="flex items-center space-x-3 rtl:space-x-reverse">
{#if currentLocation === "/"}
<a href="/"><img src={logo} class="h-8" alt="AniTrack Logo"/></a>
{:else}
<button on:click={async () => {
await CheckIfAniListLoggedInAndLoadWatchList()
return pop()
}}><img src={logo} class="h-8" alt="AniTrack Logo"/></button>
{/if}
</div>
<div class="flex items-center min-[950px]:order-2 space-x-3 min-[950px]:space-x-0 rtl:space-x-reverse">
<div class="min-[950px]:block min-[950px]:mr-4">