misc: remove progress bar for instant navigations
This commit is contained in:
1 parent
49a0e983df
commit
4b730ab415
2 files changed
+6
-4
No files matched your search
@@ -143,9 +143,9 @@
|
|||||||
<li
|
<li
|
||||||
in:fly|global={{
|
in:fly|global={{
|
||||||
y: -8,
|
y: -8,
|
||||||
duration: 500,
|
duration: 300,
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
delay: 100 + index * 20,
|
delay: 50 + index * 20,
|
||||||
}}
|
}}
|
||||||
bind:this={virtualItemEls[index]}
|
bind:this={virtualItemEls[index]}
|
||||||
data-index={row.index}
|
data-index={row.index}
|
||||||
|
|||||||
@@ -32,17 +32,19 @@
|
|||||||
nProgress.configure({
|
nProgress.configure({
|
||||||
minimum: 0.4,
|
minimum: 0.4,
|
||||||
trickleSpeed: 200,
|
trickleSpeed: 200,
|
||||||
showSpinner: false,
|
|
||||||
easing: 'ease-out',
|
easing: 'ease-out',
|
||||||
speed: 300,
|
speed: 300,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let barTimeout: any = 0
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
if (browser) {
|
if (browser) {
|
||||||
if ($navigating) {
|
if ($navigating) {
|
||||||
nProgress.start()
|
barTimeout = setTimeout(() => nProgress.start(), 100)
|
||||||
}
|
}
|
||||||
if (!$navigating) {
|
if (!$navigating) {
|
||||||
|
clearTimeout(barTimeout)
|
||||||
nProgress.done()
|
nProgress.done()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user