From e6ebd993dc0c4b71612635f15937862f55662c42 Mon Sep 17 00:00:00 2001 From: axel7083 <42176370+axel7083@users.noreply.github.com> Date: Thu, 4 Jul 2024 17:00:43 +0200 Subject: [PATCH] chore(frontend): adopt status icon component from ui (#1332) Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com> --- packages/frontend/package.json | 2 +- .../frontend/src/lib/RecipeDetails.svelte | 3 +- packages/frontend/src/lib/StatusIcon.svelte | 35 ----------------- packages/frontend/src/lib/StatusIcon.ts | 19 --------- .../lib/table/application/ColumnStatus.svelte | 3 +- .../lib/table/model/ModelColumnIcon.svelte | 4 +- .../lib/table/service/ServiceStatus.svelte | 3 +- packages/frontend/src/pages/Playground.svelte | 3 +- packages/frontend/src/pages/applications.ts | 5 +-- yarn.lock | 39 ++++--------------- 10 files changed, 17 insertions(+), 99 deletions(-) delete mode 100644 packages/frontend/src/lib/StatusIcon.svelte delete mode 100644 packages/frontend/src/lib/StatusIcon.ts diff --git a/packages/frontend/package.json b/packages/frontend/package.json index b5dad8a34..24cb99b08 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -12,7 +12,7 @@ "watch": "vite --mode development build -w" }, "dependencies": { - "@podman-desktop/ui-svelte": "1.12.0-202407021227-4f9d4c6", + "@podman-desktop/ui-svelte": "1.12.0-202407040932-c24ce23", "tinro": "^0.6.12" }, "devDependencies": { diff --git a/packages/frontend/src/lib/RecipeDetails.svelte b/packages/frontend/src/lib/RecipeDetails.svelte index 5576a5e09..ad07c2525 100644 --- a/packages/frontend/src/lib/RecipeDetails.svelte +++ b/packages/frontend/src/lib/RecipeDetails.svelte @@ -16,9 +16,8 @@ import { findLocalRepositoryByRecipeId } from '/@/utils/localRepositoriesUtils'; import { tasks } from '/@/stores/tasks'; import { filterByLabel } from '/@/utils/taskUtils'; import PodIcon from '/@/lib/images/PodIcon.svelte'; -import StatusIcon from '/@/lib/StatusIcon.svelte'; import { getApplicationStatus, getApplicationStatusText } from '../pages/applications'; -import { Button, Spinner } from '@podman-desktop/ui-svelte'; +import { Button, Spinner, StatusIcon } 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 deleted file mode 100644 index 8c04410c3..000000000 --- a/packages/frontend/src/lib/StatusIcon.svelte +++ /dev/null @@ -1,35 +0,0 @@ - - -
-
- {#if status === 'DELETING'} - - {:else if typeof icon === 'string'} - - {:else} - - {/if} -
-
diff --git a/packages/frontend/src/lib/StatusIcon.ts b/packages/frontend/src/lib/StatusIcon.ts deleted file mode 100644 index 0e92b8219..000000000 --- a/packages/frontend/src/lib/StatusIcon.ts +++ /dev/null @@ -1,19 +0,0 @@ -/********************************************************************** - * Copyright (C) 2024 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - ***********************************************************************/ - -export type KnownStatus = 'RUNNING' | 'STARTING' | 'USED' | 'CREATED' | 'DELETING' | 'DEGRADED'; diff --git a/packages/frontend/src/lib/table/application/ColumnStatus.svelte b/packages/frontend/src/lib/table/application/ColumnStatus.svelte index 773ec439c..8703c1a68 100644 --- a/packages/frontend/src/lib/table/application/ColumnStatus.svelte +++ b/packages/frontend/src/lib/table/application/ColumnStatus.svelte @@ -1,9 +1,8 @@