From 4d699f184131628078a2e2172f546e471e7d1b35 Mon Sep 17 00:00:00 2001 From: Jeff MAURY Date: Wed, 12 Jun 2024 10:31:55 +0200 Subject: [PATCH] chore: adopt Spinner from svelte ui library (#1197) * chore: adopt Spinner from svelte ui library Fixes #963 Signed-off-by: Jeff MAURY --- .../frontend/src/lib/RecipeDetails.svelte | 3 +- packages/frontend/src/lib/StatusIcon.svelte | 2 +- .../frontend/src/lib/button/Spinner.svelte | 53 ------------------- .../lib/table/application/ColumnStatus.svelte | 2 +- .../lib/table/service/ServiceStatus.svelte | 2 +- 5 files changed, 4 insertions(+), 58 deletions(-) delete mode 100644 packages/frontend/src/lib/button/Spinner.svelte diff --git a/packages/frontend/src/lib/RecipeDetails.svelte b/packages/frontend/src/lib/RecipeDetails.svelte index 2f3ece254..af5e2004d 100644 --- a/packages/frontend/src/lib/RecipeDetails.svelte +++ b/packages/frontend/src/lib/RecipeDetails.svelte @@ -19,8 +19,7 @@ import PodIcon from '/@/lib/images/PodIcon.svelte'; import StatusIcon from '/@/lib/StatusIcon.svelte'; import type { ModelInfo } from '@shared/src/models/IModelInfo'; import { getApplicationStatus, getApplicationStatusText } from '../pages/applications'; -import Spinner from './button/Spinner.svelte'; -import { Button } from '@podman-desktop/ui-svelte'; +import { Button, Spinner } from '@podman-desktop/ui-svelte'; export let recipeId: string; export let modelId: string; diff --git a/packages/frontend/src/lib/StatusIcon.svelte b/packages/frontend/src/lib/StatusIcon.svelte index 10091300d..8c04410c3 100644 --- a/packages/frontend/src/lib/StatusIcon.svelte +++ b/packages/frontend/src/lib/StatusIcon.svelte @@ -2,7 +2,7 @@ import type { KnownStatus } from './StatusIcon'; // status: one of RUNNING, STARTING, USED, CREATED, DELETING, or DEGRADED // any other status will result in a standard outlined box -import Spinner from '/@/lib/button/Spinner.svelte'; +import { Spinner } from '@podman-desktop/ui-svelte'; export let status: KnownStatus | string = ''; export let icon: any = undefined; diff --git a/packages/frontend/src/lib/button/Spinner.svelte b/packages/frontend/src/lib/button/Spinner.svelte deleted file mode 100644 index 1bc8cc5f2..000000000 --- a/packages/frontend/src/lib/button/Spinner.svelte +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/frontend/src/lib/table/application/ColumnStatus.svelte b/packages/frontend/src/lib/table/application/ColumnStatus.svelte index 521df419e..773ec439c 100644 --- a/packages/frontend/src/lib/table/application/ColumnStatus.svelte +++ b/packages/frontend/src/lib/table/application/ColumnStatus.svelte @@ -3,7 +3,7 @@ import { getApplicationStatus } from '../../../pages/applications'; import type { ApplicationState } from '@shared/src/models/IApplicationState'; import StatusIcon from '../../StatusIcon.svelte'; import PodIcon from '../../images/PodIcon.svelte'; -import Spinner from '../../button/Spinner.svelte'; +import { Spinner } from '@podman-desktop/ui-svelte'; export let object: ApplicationState; $: status = getApplicationStatus(object); diff --git a/packages/frontend/src/lib/table/service/ServiceStatus.svelte b/packages/frontend/src/lib/table/service/ServiceStatus.svelte index 65e80db9a..fb62c8bb1 100644 --- a/packages/frontend/src/lib/table/service/ServiceStatus.svelte +++ b/packages/frontend/src/lib/table/service/ServiceStatus.svelte @@ -2,7 +2,7 @@ import type { InferenceServer } from '@shared/src/models/IInference'; import StatusIcon from '/@/lib/StatusIcon.svelte'; import { studioClient } from '/@/utils/client'; -import Spinner from '/@/lib/button/Spinner.svelte'; +import { Spinner } from '@podman-desktop/ui-svelte'; import { ContainerIcon } from '@podman-desktop/ui-svelte/icons'; export let object: InferenceServer;