diff --git a/packages/backend/src/managers/catalogManager.ts b/packages/backend/src/managers/catalogManager.ts index 80cdf19ac..b5f591827 100644 --- a/packages/backend/src/managers/catalogManager.ts +++ b/packages/backend/src/managers/catalogManager.ts @@ -37,7 +37,6 @@ export class CatalogManager extends Publisher implements Disposable { super(webview, MSG_NEW_CATALOG_STATE, () => this.getCatalog()); // We start with an empty catalog, for the methods to work before the catalog is loaded this.catalog = { - categories: [], models: [], recipes: [], }; diff --git a/packages/frontend/src/lib/RecipeDetails.spec.ts b/packages/frontend/src/lib/RecipeDetails.spec.ts index 2f41eb7d2..96e6fdc39 100644 --- a/packages/frontend/src/lib/RecipeDetails.spec.ts +++ b/packages/frontend/src/lib/RecipeDetails.spec.ts @@ -77,7 +77,6 @@ vi.mock('../stores/localRepositories', () => ({ })); const initialCatalog: Catalog = { - categories: [], models: [ { id: 'model1', diff --git a/packages/frontend/src/lib/RecipesCard.svelte b/packages/frontend/src/lib/RecipesCard.svelte index 166e41ddc..0a9525534 100644 --- a/packages/frontend/src/lib/RecipesCard.svelte +++ b/packages/frontend/src/lib/RecipesCard.svelte @@ -1,13 +1,9 @@ - +
{#if recipes.length === 0} @@ -31,10 +27,7 @@ export let displayDescription: boolean = true;
{#if displayCategory} {#each recipe.categories as categoryId} - + {/each} {/if} {#if displayDescription} diff --git a/packages/frontend/src/lib/table/application/ColumnModel.spec.ts b/packages/frontend/src/lib/table/application/ColumnModel.spec.ts index 69f97f8d3..042cdc7dd 100644 --- a/packages/frontend/src/lib/table/application/ColumnModel.spec.ts +++ b/packages/frontend/src/lib/table/application/ColumnModel.spec.ts @@ -32,7 +32,6 @@ vi.mock('/@/stores/catalog', async () => { }); const initialCatalog: Catalog = { - categories: [], models: [ { id: 'model1', diff --git a/packages/frontend/src/lib/table/application/ColumnRecipe.spec.ts b/packages/frontend/src/lib/table/application/ColumnRecipe.spec.ts index 47aa961d9..1f5e2b7e2 100644 --- a/packages/frontend/src/lib/table/application/ColumnRecipe.spec.ts +++ b/packages/frontend/src/lib/table/application/ColumnRecipe.spec.ts @@ -47,7 +47,6 @@ vi.mock('/@/utils/client', async () => { }); const initialCatalog: Catalog = { - categories: [], models: [], recipes: [ { diff --git a/packages/frontend/src/pages/Recipe.spec.ts b/packages/frontend/src/pages/Recipe.spec.ts index 18d53e66a..99a7d53f2 100644 --- a/packages/frontend/src/pages/Recipe.spec.ts +++ b/packages/frontend/src/pages/Recipe.spec.ts @@ -80,7 +80,6 @@ vi.mock('/@/stores/catalog', async () => { }); const initialCatalog: Catalog = { - categories: [], models: [ { id: 'model1', @@ -123,7 +122,6 @@ const initialCatalog: Catalog = { }; const updatedCatalog: Catalog = { - categories: [], models: [ { id: 'model1', diff --git a/packages/frontend/src/pages/Recipe.svelte b/packages/frontend/src/pages/Recipe.svelte index 1fed02663..1fc24636b 100644 --- a/packages/frontend/src/pages/Recipe.svelte +++ b/packages/frontend/src/pages/Recipe.svelte @@ -14,7 +14,6 @@ export let recipeId: string; // The recipe model provided $: recipe = $catalog.recipes.find(r => r.id === recipeId); -$: categories = $catalog.categories; let selectedModelId: string; $: selectedModelId = recipe?.models?.[0] ?? ''; @@ -63,9 +62,7 @@ function setSelectedModel(modelId: string) {
{#each recipe?.categories || [] as categoryId} - + {/each}
diff --git a/packages/frontend/src/pages/Recipes.svelte b/packages/frontend/src/pages/Recipes.svelte index 1910b97e8..1accc7938 100644 --- a/packages/frontend/src/pages/Recipes.svelte +++ b/packages/frontend/src/pages/Recipes.svelte @@ -3,28 +3,13 @@ import NavPage from '/@/lib/NavPage.svelte'; import RecipesCard from '/@/lib/RecipesCard.svelte'; import { RECENT_CATEGORY_ID } from '/@/utils/client'; import { catalog } from '/@/stores/catalog'; - -$: categories = $catalog.categories;
- - - - {#each categories as category} - - - {/each} +
diff --git a/packages/shared/src/models/ICatalog.ts b/packages/shared/src/models/ICatalog.ts index 1e4a8aa65..afa96667a 100644 --- a/packages/shared/src/models/ICatalog.ts +++ b/packages/shared/src/models/ICatalog.ts @@ -16,12 +16,10 @@ * SPDX-License-Identifier: Apache-2.0 ***********************************************************************/ -import type { Category } from './ICategory'; import type { ModelInfo } from './IModelInfo'; import type { Recipe } from './IRecipe'; export interface Catalog { recipes: Recipe[]; models: ModelInfo[]; - categories: Category[]; } diff --git a/packages/shared/src/models/ICategory.ts b/packages/shared/src/models/ICategory.ts deleted file mode 100644 index cbe87d47f..000000000 --- a/packages/shared/src/models/ICategory.ts +++ /dev/null @@ -1,23 +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 interface Category { - id: string; - name: string; - description?: string; -}