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