Skip to content

Commit

Permalink
fix: clean Recipe.svelte (#266)
Browse files Browse the repository at this point in the history
Signed-off-by: lstocchi <[email protected]>
  • Loading branch information
lstocchi authored Feb 12, 2024
1 parent 97fb6d5 commit f30794d
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions packages/frontend/src/pages/Recipe.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,20 @@ import MarkdownRenderer from '/@/lib/markdown/MarkdownRenderer.svelte';
import { getIcon } from '/@/utils/categoriesUtils';
import RecipeModels from './RecipeModels.svelte';
import { catalog } from '/@/stores/catalog';
import { recipes } from '/@/stores/recipe';
import RecipeDetails from '/@/lib/RecipeDetails.svelte';
export let recipeId: string;
// The recipe model provided
$: recipe = $catalog.recipes.find(r => r.id === recipeId);
$: categories = $catalog.categories;
$: recipeStatus = $recipes.get(recipeId);
// this will be selected by the user, init with the default model (the first in the catalog recipe?)
$: selectedModelId = recipe?.models?.[0];
$: model = $catalog.models.find(m => m.id === selectedModelId);
// Send recipe info to telemetry
let recipeTelemetry: string | undefined = undefined;
$: if (recipe && recipe.id !== recipeTelemetry) {
recipeTelemetry = recipe.id;
studioClient.telemetryLogUsage('recipe.open', { 'recipe.id': recipe.id, 'recipe.name': recipe.name });
}
const onPullingRequest = async () => {
await studioClient.pullApplication(recipeId);
}
const onClickRepository = () => {
if (recipe) {
studioClient.openURL(recipe.repository);
}
}
$: applicationDetailsPanel = 'block';
$: applicationDetailsPanelToggle = 'hidden';
function toggleApplicationDetailsPanel() {
if (applicationDetailsPanel === 'block') {
applicationDetailsPanel = 'hidden';
applicationDetailsPanelToggle = 'block';
} else {
applicationDetailsPanel = 'block';
applicationDetailsPanelToggle = 'hidden';
}
}
</script>

<NavPage title="{recipe?.name || ''}" icon="{getIcon(recipe?.icon)}" searchEnabled="{false}" contentBackground='bg-charcoal-500'>
Expand Down

0 comments on commit f30794d

Please sign in to comment.