From a6ec3234f7bca03065780398eeb8d4b0c196891b Mon Sep 17 00:00:00 2001 From: Xen0Xys Date: Sun, 30 Jun 2024 13:58:15 +0200 Subject: [PATCH] :ambulance: Fix episode images display --- pages/episode/[id].vue | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/pages/episode/[id].vue b/pages/episode/[id].vue index 8b2e9a5..ce0b2f9 100644 --- a/pages/episode/[id].vue +++ b/pages/episode/[id].vue @@ -16,16 +16,8 @@ const episodeImages = ref([]); const episodeInfos = ref({}); const maxIndex = ref(10); -let isIncreasing = false; - function increaseMaxIndex(){ - if (!isIncreasing){ - isIncreasing = true; - maxIndex.value += 10; - setTimeout(() => { - isIncreasing = false; - }, 500); - } + maxIndex.value += 10; } async function loadEpisodeImages(){ @@ -50,6 +42,11 @@ async function loadEpisodeInfos(){ episodeState.value = episodeInfos.value; } +function removeLoadingClass(event: Event){ + const target = event.target as HTMLImageElement; + target.classList.remove("loading-episode"); +} + onMounted(async() => { loadEpisodeImages(); loadEpisodeInfos(); @@ -62,9 +59,21 @@ onMounted(async() => {

{{ episodeInfos.title }}

- + - +