Really fix overflow not being updated properly + scroll title enough so that we can see it
All checks were successful
ci / deploy (push) Successful in 2m12s

This commit is contained in:
2026-01-23 09:41:02 +01:00
parent 8239a21c43
commit 4fe1e88220
2 changed files with 9 additions and 6 deletions

View File

@@ -17,15 +17,18 @@
}" }"
x-init="setInterval( x-init="setInterval(
async () => { async () => {
metadata = await get_metadata() metadata = await getMetadata()
}, },
2000, 2000,
) )
$watch('metadata.title', (value, oldValue) => { $watch('metadata.title', async (value, oldValue) => {
if (value != oldValue){ if (value == oldValue){
isTitleOverflow = false; // force a reset
return return
} }
// First, reset overflow for proper recalculation
isTitleOverflow = false
await $nextTick()
// Now check for overflow
isTitleOverflow = $refs.scrollTitle.offsetWidth < $refs.scrollTitle.scrollWidth isTitleOverflow = $refs.scrollTitle.offsetWidth < $refs.scrollTitle.scrollWidth
}) })
" "
@@ -63,7 +66,7 @@
</body> </body>
<script> <script>
const get_metadata = async () => { const getMetadata = async () => {
return Object.fromEntries( return Object.fromEntries(
await (await fetch("/status.json")).json() await (await fetch("/status.json")).json()
) )

View File

@@ -43,7 +43,7 @@ body {
transform: translateX(0); transform: translateX(0);
} }
100% { 100% {
transform: translateX(-100%); transform: translateX(-150%);
} }
} }