diff --git a/packages/ui/src/components/AppLoading.svelte b/packages/ui/src/components/AppLoading.svelte new file mode 100644 index 00000000000..ae385761e1f --- /dev/null +++ b/packages/ui/src/components/AppLoading.svelte @@ -0,0 +1,53 @@ + + + +
+
+ + +
+
+ + diff --git a/packages/ui/src/components/Component.svelte b/packages/ui/src/components/Component.svelte index d7f8ce17e8e..7569fd62a86 100644 --- a/packages/ui/src/components/Component.svelte +++ b/packages/ui/src/components/Component.svelte @@ -19,6 +19,7 @@ import type { AnyComponent, AnySvelteComponent } from '../types' import ErrorPresenter from './ErrorPresenter.svelte' import Loading from './Loading.svelte' + import AppLoading from './AppLoading.svelte' import ErrorBoundary from './internal/ErrorBoundary' import { clone } from '@hcengineering/core' @@ -30,6 +31,7 @@ export let showLoading = true export let inline: boolean = false export let disabled: boolean = false + export let appLoading: boolean = false let _is: AnyComponent | AnySvelteComponent = is @@ -105,7 +107,11 @@ {#if _is != null} {#if loading} {#if showLoading} - + {#if appLoading} + + {:else} + + {/if} {/if} {:else if Ctor != null} diff --git a/packages/ui/src/components/icons/SquareSpinner.svelte b/packages/ui/src/components/icons/SquareSpinner.svelte new file mode 100644 index 00000000000..bfecb0b46ca --- /dev/null +++ b/packages/ui/src/components/icons/SquareSpinner.svelte @@ -0,0 +1,367 @@ + + + +
+
+
+ + diff --git a/packages/ui/src/components/internal/Root.svelte b/packages/ui/src/components/internal/Root.svelte index 0c59cac7ad1..3ef85713c2f 100644 --- a/packages/ui/src/components/internal/Root.svelte +++ b/packages/ui/src/components/internal/Root.svelte @@ -299,7 +299,7 @@
{#if application} - + {:else}
Application not found: {application} diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts index a20b1632c3c..5dd99ead294 100644 --- a/packages/ui/src/index.ts +++ b/packages/ui/src/index.ts @@ -288,6 +288,7 @@ export { default as EmbeddedPDF } from './components/EmbeddedPDF.svelte' export { default as NestedMenu } from './components/NestedMenu.svelte' export { default as NestedDropdown } from './components/NestedDropdown.svelte' export { default as StatusBarButton } from './components/StatusBarButton.svelte' +export { default as AppLoading } from './components/AppLoading.svelte' export { default as Blurhash } from './components/Blurhash.svelte' export { default as Dock } from './components/Dock.svelte' diff --git a/plugins/workbench-resources/src/components/WorkbenchApp.svelte b/plugins/workbench-resources/src/components/WorkbenchApp.svelte index 5ee4f23125f..dec1cacb98d 100644 --- a/plugins/workbench-resources/src/components/WorkbenchApp.svelte +++ b/plugins/workbench-resources/src/components/WorkbenchApp.svelte @@ -18,8 +18,8 @@ import { Button, Component, + AppLoading, Label, - Loading, Notifications, deviceOptionsStore, fetchMetadataLocalStorage, @@ -56,7 +56,7 @@ {:else} {#key $location.path[1]} {#await connect(getMetadata(workbenchRes.metadata.PlatformTitle) ?? 'Platform')} - + {#if ($workspaceCreating ?? -1) >= 0}
{/if} -
+ {:then client} {#if $versionError}