fix: postform crash
This commit is contained in:
1 parent
2b27e99784
commit
3ebb46e37d
3 files changed
+17
-21
No files matched your search
+12
-16
@@ -48,22 +48,6 @@
|
||||
showSpinner: false,
|
||||
})
|
||||
|
||||
let barTimeout: any = $state(0)
|
||||
|
||||
run(() => {
|
||||
if (browser) {
|
||||
if ($navigating) {
|
||||
document.body.classList.toggle('wait', true)
|
||||
barTimeout = setTimeout(() => nProgress.start(), 100)
|
||||
}
|
||||
if (!$navigating) {
|
||||
document.body.classList.toggle('wait', false)
|
||||
clearTimeout(barTimeout)
|
||||
nProgress.done()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
onMount(() => {
|
||||
if (browser) {
|
||||
if (window.location.hash == 'main') {
|
||||
@@ -81,6 +65,7 @@
|
||||
})
|
||||
|
||||
if (browser) {
|
||||
let barTimeout: number = $state(0)
|
||||
$effect(() => {
|
||||
if (settings) {
|
||||
document.body.classList.remove(
|
||||
@@ -101,6 +86,17 @@
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
navigating.subscribe((value) => {
|
||||
if (value) {
|
||||
document.body.classList.toggle('wait', true)
|
||||
barTimeout = setTimeout(() => nProgress.start(), 100)
|
||||
} else {
|
||||
document.body.classList.toggle('wait', false)
|
||||
clearTimeout(barTimeout)
|
||||
nProgress.done()
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user