From 7798b5439148aa63eedaafc1582f163058b69aed Mon Sep 17 00:00:00 2001 From: Adam French Date: Thu, 26 Mar 2026 02:10:21 +0000 Subject: [PATCH] Fix Steam game transition jumping to top of container Wrap Transition in a relative-positioned game-container div so the leaving element's absolute positioning is scoped to the game area, not the full wrapper. Use flex layout so the container fills only the space below the header. Co-Authored-By: Claude Opus 4.6 --- vue/src/views/home/Steam.vue | 118 ++++++++++++++++++++--------------- 1 file changed, 66 insertions(+), 52 deletions(-) diff --git a/vue/src/views/home/Steam.vue b/vue/src/views/home/Steam.vue index 5f70ac7..6ceb12d 100644 --- a/vue/src/views/home/Steam.vue +++ b/vue/src/views/home/Steam.vue @@ -17,91 +17,105 @@ let nextId = null; let refreshId = null; function nextGame() { - clearTimeout(nextId); - nextId = setTimeout(nextGame, 5000); - if (steamStatus.value.recentGames.length) { - idx.value = (idx.value + 1) % steamStatus.value.recentGames.length; - } + clearTimeout(nextId); + nextId = setTimeout(nextGame, 5000); + if (steamStatus.value.recentGames.length) { + idx.value = (idx.value + 1) % steamStatus.value.recentGames.length; + } } onMounted(() => { - nextId = setTimeout(nextGame, 5000); - refreshId = setInterval(() => steamStore.fetchSteam(), 5 * 60 * 1000); + nextId = setTimeout(nextGame, 5000); + refreshId = setInterval(() => steamStore.fetchSteam(), 5 * 60 * 1000); }); onUnmounted(() => { - clearTimeout(nextId); - clearInterval(refreshId); + clearTimeout(nextId); + clearInterval(refreshId); }); function formatHours(minutes) { - const hrs = (minutes / 60).toFixed(1); - return `${hrs}h`; + const hrs = (minutes / 60).toFixed(1); + return `${hrs}h`; }