/** * RecipesTab - Recipe cards grid component for LoRA models * Features: * - Recipe cards grid layout * - Copy/View actions * - LoRA availability status badges */ import { escapeHtml } from '../shared/utils.js'; import { translate } from '../../utils/i18nHelpers.js'; import { showToast, copyToClipboard } from '../../utils/uiHelpers.js'; import { setSessionItem, removeSessionItem } from '../../utils/storageHelpers.js'; export class RecipesTab { constructor(container) { this.element = container; this.model = null; this.recipes = []; this.isLoading = false; } /** * Render the recipes tab */ async render({ model }) { this.model = model; this.element.innerHTML = this.getLoadingTemplate(); await this.loadRecipes(); } /** * Get loading template */ getLoadingTemplate() { return `
${escapeHtml(message || 'Failed to load recipes. Please try again later.')}
${translate('recipes.noRecipesFound', {}, 'No recipes found that use this LoRA.')}
${loraName ? `Discover workflows crafted for ${escapeHtml(loraName)}.` : 'Discover workflows crafted for this model.'}