mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-25 12:31:15 -03:00
- Add genParamsMapper.js: sampler/scheduler display→internal mapping, combined-name parsing, widget matching - Add sendGenParamsToWorkflow() in uiHelpers.js: resolves sampler, fetches registry by send_gen_params marker, sends via update-node-widget - Add send-params-btn UI in showcase hover panel and recipe modal - Add flashWidget() in workflow_registry.js: text-color visual cue on updated widget values (Vue: inline style + CSS, canvas: property shadow) - Add silent option to sendWidgetValueToNodes for consolidated toast - Normalize param display labels (cfg_scale→CFG, etc.) in recipe modal - Add 33 tests for genParamsMapper; update existing test assertions
134 lines
7.4 KiB
HTML
134 lines
7.4 KiB
HTML
<div id="recipeModal" class="modal">
|
|
<div class="modal-content">
|
|
<button class="close" onclick="modalManager.closeModal('recipeModal')">×</button>
|
|
|
|
<header class="recipe-modal-header">
|
|
<h2 id="recipeModalTitle">Recipe Details</h2>
|
|
<!-- Header Actions: populated dynamically in RecipeModal.js -->
|
|
<div class="recipe-header-actions" id="recipeHeaderActions"></div>
|
|
<!-- Recipe Tags Container (rendered by renderCompactTags) -->
|
|
<div id="recipeTagsContainer"></div>
|
|
</header>
|
|
|
|
<div class="modal-body">
|
|
<!-- Top Section: Preview and Generation Parameters -->
|
|
<div class="recipe-top-section">
|
|
<div class="recipe-preview-container" id="recipePreviewContainer">
|
|
<img id="recipeModalImage" src="" alt="Recipe Preview" class="recipe-preview-media">
|
|
<!-- Source URL elements are now added dynamically in RecipeModal.js -->
|
|
</div>
|
|
|
|
<div class="info-section recipe-gen-params">
|
|
<div class="gen-params-header-row">
|
|
<h3>Generation Parameters</h3>
|
|
<label class="inline-toggle-container lora-strip-toggle" title="When enabled, <lora:...> tags are removed from prompt text when copying">
|
|
<span class="inline-toggle-label">Strip <lora:></span>
|
|
<div class="toggle-switch">
|
|
<input type="checkbox" id="stripLoraOnCopyToggle">
|
|
<span class="toggle-slider"></span>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="gen-params-container">
|
|
<!-- Prompt -->
|
|
<div class="param-group info-item">
|
|
<div class="param-header">
|
|
<label>Prompt</label>
|
|
<div class="param-actions">
|
|
<button class="copy-btn" id="sendPromptBtn" title="Send Prompt to Workflow">
|
|
<i class="fas fa-paper-plane"></i>
|
|
</button>
|
|
<button class="copy-btn" id="copyPromptBtn" title="Copy Prompt">
|
|
<i class="fas fa-copy"></i>
|
|
</button>
|
|
<button class="edit-btn" id="editPromptBtn" title="Edit Prompt">
|
|
<i class="fas fa-pencil-alt"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="param-content" id="recipePrompt"></div>
|
|
<div class="param-editor" id="recipePromptEditor">
|
|
<textarea
|
|
class="param-textarea"
|
|
id="recipePromptInput"
|
|
placeholder="Enter prompt"
|
|
></textarea>
|
|
<div class="param-editor-hint">
|
|
{{ t('toast.recipes.promptEditorHint') }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Negative Prompt -->
|
|
<div class="param-group info-item">
|
|
<div class="param-header">
|
|
<label>Negative Prompt</label>
|
|
<div class="param-actions">
|
|
<button class="copy-btn" id="sendNegativePromptBtn" title="Send Negative Prompt to Workflow">
|
|
<i class="fas fa-paper-plane"></i>
|
|
</button>
|
|
<button class="copy-btn" id="copyNegativePromptBtn" title="Copy Negative Prompt">
|
|
<i class="fas fa-copy"></i>
|
|
</button>
|
|
<button class="edit-btn" id="editNegativePromptBtn" title="Edit Negative Prompt">
|
|
<i class="fas fa-pencil-alt"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="param-content" id="recipeNegativePrompt"></div>
|
|
<div class="param-editor" id="recipeNegativePromptEditor">
|
|
<textarea
|
|
class="param-textarea"
|
|
id="recipeNegativePromptInput"
|
|
placeholder="Enter negative prompt"
|
|
></textarea>
|
|
<div class="param-editor-hint">
|
|
{{ t('toast.recipes.promptEditorHint') }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Other Parameters -->
|
|
<div class="param-group info-item">
|
|
<div class="param-header">
|
|
<label>Params</label>
|
|
<div class="param-actions">
|
|
<button class="copy-btn" id="sendParamsBtn" title="Send Params to Workflow">
|
|
<i class="fas fa-paper-plane"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="other-params" id="recipeOtherParams"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bottom Section: Resources -->
|
|
<div class="info-section recipe-bottom-section">
|
|
<div class="recipe-section-header">
|
|
<h3>Resources</h3>
|
|
<div class="recipe-section-actions">
|
|
<span id="recipeLorasCount"><i class="fas fa-layer-group"></i> 0 LoRAs</span>
|
|
<button class="action-btn view-loras-btn" id="viewRecipeLorasBtn" title="View all LoRAs in this recipe">
|
|
<i class="fas fa-external-link-alt"></i>
|
|
</button>
|
|
<button class="copy-btn" id="copyRecipeSyntaxBtn" title="Copy Recipe Syntax">
|
|
<i class="fas fa-copy"></i>
|
|
</button>
|
|
<button class="action-btn send-recipe-btn" id="sendRecipeBtn" title="Send Recipe to ComfyUI">
|
|
<i class="fas fa-paper-plane"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="recipe-resources-list">
|
|
<div class="recipe-checkpoint-container" id="recipeCheckpoint"></div>
|
|
<div class="version-divider" id="recipeResourceDivider" style="display: none;"></div>
|
|
<div class="recipe-loras-list" id="recipeLorasList"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|