From 2139f031f4b92a1bffe1f2402b5ce98094222e3e Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 21 Sep 2022 15:36:38 -0400 Subject: [PATCH] Pass anilist ids more directly, see #39 --- app/templates/anime-cover.php | 1 + frontEndSrc/js/anime.js | 1 + frontEndSrc/js/template-helpers.js | 2 + public/css/auto.min.css | 2 +- public/css/dark.min.css | 2 +- public/css/light.min.css | 2 +- public/js/scripts.min.js | 2 +- public/js/scripts.min.js.map | 2 +- src/AnimeClient/API/Anilist/Model.php | 39 +++++++++++++++---- src/AnimeClient/API/Kitsu/MutationTrait.php | 11 ++++++ .../Transformer/AnimeListTransformer.php | 9 ++++- src/AnimeClient/Controller/Anime.php | 2 +- src/AnimeClient/Model/MediaTrait.php | 26 +++++++++++-- 13 files changed, 83 insertions(+), 18 deletions(-) diff --git a/app/templates/anime-cover.php b/app/templates/anime-cover.php index 95790cca..0965d29f 100644 --- a/app/templates/anime-cover.php +++ b/app/templates/anime-cover.php @@ -1,6 +1,7 @@
isAuthenticated()): ?> diff --git a/frontEndSrc/js/anime.js b/frontEndSrc/js/anime.js index 231f9cab..a163ae88 100644 --- a/frontEndSrc/js/anime.js +++ b/frontEndSrc/js/anime.js @@ -63,6 +63,7 @@ _.on('body.anime.list', 'click', '.plus-one', (e) => { // Setup the update data let data = { id: parentSel.dataset.kitsuId, + anilist_id: parentSel.dataset.anilistId, mal_id: parentSel.dataset.malId, data: { progress: watchedCount + 1 diff --git a/frontEndSrc/js/template-helpers.js b/frontEndSrc/js/template-helpers.js index b83af63a..3146cf75 100644 --- a/frontEndSrc/js/template-helpers.js +++ b/frontEndSrc/js/template-helpers.js @@ -5,6 +5,7 @@ import _ from './anime-client.js'; _.on('main', 'change', '.big-check', (e) => { const id = e.target.id; document.getElementById(`mal_${id}`).checked = true; + document.getElementById(`anilist_${id}`).checked = true; }); /** @@ -55,6 +56,7 @@ export function renderSearchResults (type, data, isCollection = false) { return `