From d96d1ca7eb4d23c1b732fe2d766ad4618238f8c7 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 8 Nov 2022 00:20:53 +0100 Subject: [PATCH 1/3] feat: add progress bar --- src/lib/layout/index.ts | 1 + src/lib/layout/progress.svelte | 83 ++++++++++++++++++++++++++++++++++ src/routes/+layout.svelte | 6 ++- 3 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 src/lib/layout/progress.svelte diff --git a/src/lib/layout/index.ts b/src/lib/layout/index.ts index 629bd3588..71d340ea2 100644 --- a/src/lib/layout/index.ts +++ b/src/lib/layout/index.ts @@ -14,3 +14,4 @@ export { default as Breadcrumbs } from './breadcrumbs.svelte'; export { default as Unauthenticated } from './unauthenticated.svelte'; export { default as Usage, type UsagePeriods } from './usage.svelte'; export { default as Activity } from './activity.svelte'; +export { default as Progress } from './progress.svelte'; diff --git a/src/lib/layout/progress.svelte b/src/lib/layout/progress.svelte new file mode 100644 index 000000000..bda2f5a7d --- /dev/null +++ b/src/lib/layout/progress.svelte @@ -0,0 +1,83 @@ + + + + +{#if width} +
+{/if} + + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 95e06dab7..790b7efa1 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -8,9 +8,9 @@ import { base } from '$app/paths'; import { browser, dev } from '$app/environment'; import { app } from '$lib/stores/app'; - import Notifications from '$lib/layout/notifications.svelte'; - import Loading from './loading.svelte'; + import { Progress, Notifications } from '$lib/layout'; import { loading } from './store'; + import Loading from './loading.svelte'; if (browser) { window.VERCEL_ANALYTICS_ID = import.meta.env.VERCEL_ANALYTICS_ID?.toString() ?? false; @@ -95,6 +95,8 @@ {/if} + +