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
All checks were successful
ci / deploy (push) Successful in 2m12s
This commit is contained in:
@@ -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()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user