Fix Steam game transition jumping to top of container
Deploy with Docker Compose / deploy (push) Successful in 3m28s

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 <[email protected]>
This commit is contained in:
2026-03-26 02:10:21 +00:00
co-authored by Claude Opus 4.6
parent d4a6343d5e
commit 7798b54391
+18 -4
View File
@@ -54,8 +54,13 @@ function formatHours(minutes) {
<div v-if="!loaded" class="p-2 text-sm">Loading...</div> <div v-if="!loaded" class="p-2 text-sm">Loading...</div>
<Transition name="fade" v-else-if="game"> <div v-else-if="game" class="game-container">
<div @click="nextGame" :key="game.appId" class="flex flex-col items-center"> <Transition name="fade">
<div
@click="nextGame"
:key="game.appId"
class="flex flex-col items-center"
>
<img <img
:src="game.headerImageUrl" :src="game.headerImageUrl"
:alt="game.name" :alt="game.name"
@@ -69,6 +74,7 @@ function formatHours(minutes) {
</p> </p>
</div> </div>
</Transition> </Transition>
</div>
<div v-else class="p-2 text-sm">No recent games.</div> <div v-else class="p-2 text-sm">No recent games.</div>
</div> </div>
@@ -77,8 +83,16 @@ function formatHours(minutes) {
<style scoped> <style scoped>
.steam-wrapper { .steam-wrapper {
position: relative; position: relative;
width: 100%; height: 50mm;
height: 100%; display: flex;
flex-direction: column;
}
.game-container {
position: relative;
flex: 1;
min-height: 0;
overflow-y: scroll;
} }
.game-img { .game-img {