mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: progress on wizard popstate
This commit is contained in:
1 parent
9f3a267044
commit
fc739940bd
1 file changed
+6
-5
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { afterNavigate, beforeNavigate } from '$app/navigation';
|
||||
import { navigating } from '$app/stores';
|
||||
|
||||
let width: number;
|
||||
let updater: ReturnType<typeof setTimeout>;
|
||||
@@ -53,14 +53,15 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
beforeNavigate(start);
|
||||
afterNavigate(complete);
|
||||
$: if ($navigating) {
|
||||
start();
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
||||
$: barStyle = (width && width * 100 && `width: ${width * 100}%;`) || '';
|
||||
</script>
|
||||
|
||||
<svelte:head />
|
||||
|
||||
{#if width}
|
||||
<div class="progress-bar" class:progress-bar-hiding={completed} style={barStyle} />
|
||||
{/if}
|
||||
|
||||
Reference in new issue
Block a user