added MAL Login

This commit is contained in:
2024-08-13 18:54:27 -04:00
parent 43a054ac92
commit fa3304db92
14 changed files with 459 additions and 22 deletions

View File

@ -4,6 +4,8 @@
anilistModal,
aniListPrimary,
aniListUser,
malUser,
malLoggedIn,
aniListWatchlist,
GetAniListSingleItemAndOpenModal,
simklLoggedIn,
@ -14,10 +16,12 @@
import {
CheckIfAniListLoggedIn,
CheckIfSimklLoggedIn,
CheckIfMyAnimeListLoggedIn,
GetAniListLoggedInUser,
GetAniListUserWatchingList,
GetSimklLoggedInUser,
SimklGetUserWatchlist,
GetMyAnimeListLoggedInUser,
} from "../wailsjs/go/main/App";
import {MediaListSort} from "./anilist/types/AniListTypes";
import type {AniListCurrentUserWatchList} from "./anilist/types/AniListCurrentUserWatchListType"
@ -58,6 +62,15 @@
}
})
await CheckIfMyAnimeListLoggedIn().then(result => {
if (result) {
GetMyAnimeListLoggedInUser().then(result => {
malUser.set(result)
malLoggedIn.set(result)
})
}
})
await CheckIfSimklLoggedIn().then(result => {
if (result) {
GetSimklLoggedInUser().then(result => {
@ -85,7 +98,7 @@
<main>
{#if isAniListLoggedIn}
<div class="mx-auto max-w-2xl p-4 sm:p-6 lg:max-w-7xl lg:px-8">
<h1 class="text-left text-xl font-bold mb-4">Your WatchList</h1>
<h1 class="text-left text-xl font-bold mb-4">Your AniList WatchList</h1>
<div class="mb-8">
<nav aria-label="Page navigation example">