feat(recipes): show a has-workflow badge on recipe cards

This commit is contained in:
Will Miao
2026-10-10 09:02:48 +08:00
parent e1b102fc64
commit 377a1337db
16 changed files with 201 additions and 14 deletions
+7 -1
View File
@@ -133,7 +133,13 @@ class RecipeCard {
`<button class="toggle-blur-btn" title="Toggle blur">
<i class="fas fa-eye"></i>
</button>` : ''}
<span class="base-model-label ${shouldBlur ? 'with-toggle' : ''}" title="${baseModelLabel}">${baseModelDisplay}</span>
<div class="card-header-info">
<span class="base-model-label ${shouldBlur ? 'with-toggle' : ''}" title="${baseModelLabel}">${baseModelDisplay}</span>
${this.recipe.has_workflow === true ? `
<span class="workflow-badge" title="${translate('recipes.workflow.hasWorkflow', {}, 'Contains a ComfyUI workflow')}">
<i class="fas fa-diagram-project"></i>
</span>` : ''}
</div>
<div class="card-actions">
<i class="${isFavorite ? 'fas fa-star favorite-active' : 'far fa-star'}" title="${isFavorite ? 'Remove from Favorites' : 'Add to Favorites'}"></i>
<i class="fas fa-share-alt" title="Share Recipe"></i>
+2 -2
View File
@@ -835,8 +835,8 @@ class RecipeModal {
const workflowBtn = document.createElement('button');
workflowBtn.className = 'recipe-source-url-btn';
workflowBtn.id = 'sendWorkflowBtn';
workflowBtn.title = 'Send Workflow to ComfyUI';
workflowBtn.innerHTML = '<i class="fas fa-project-diagram"></i> Send Workflow to ComfyUI';
workflowBtn.title = translate('recipes.workflow.sendWorkflow', {}, 'Send Workflow to ComfyUI');
workflowBtn.innerHTML = `<i class="fas fa-diagram-project"></i> ${workflowBtn.title}`;
workflowBtn.addEventListener('click', () => {
this.sendWorkflowToComfyUI();
});