mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
Add CivitAI re-linking functionality and related UI components. Fixes #216
- Implemented new API endpoints for re-linking models to CivitAI. - Added context menu options for re-linking in both Lora and Checkpoint context menus. - Created a modal for user confirmation and input for CivitAI model URL. - Updated styles for the new modal and context menu items. - Enhanced error handling and user feedback during the re-linking process.
This commit is contained in:
@@ -571,4 +571,34 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Re-link to Civitai Modal -->
|
||||
<div id="relinkCivitaiModal" class="modal">
|
||||
<div class="modal-content">
|
||||
<button class="close" onclick="modalManager.closeModal('relinkCivitaiModal')">×</button>
|
||||
<h2>Re-link to Civitai</h2>
|
||||
<div class="warning-box">
|
||||
<i class="fas fa-exclamation-triangle"></i>
|
||||
<p><strong>Warning:</strong> This is a potentially destructive operation. Re-linking will:</p>
|
||||
<ul>
|
||||
<li>Override existing metadata</li>
|
||||
<li>Potentially modify the model hash</li>
|
||||
<li>May have other unintended consequences</li>
|
||||
</ul>
|
||||
<p>Only proceed if you're sure this is what you want.</p>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label for="civitaiModelUrl">Civitai Model URL:</label>
|
||||
<input type="text" id="civitaiModelUrl" placeholder="https://civitai.com/models/1098030?modelVersionId=1233411" />
|
||||
<div class="input-error" id="civitaiModelUrlError"></div>
|
||||
<div class="input-help">
|
||||
The URL must include the modelVersionId parameter.
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-actions">
|
||||
<button class="cancel-btn" onclick="modalManager.closeModal('relinkCivitaiModal')">Cancel</button>
|
||||
<button class="confirm-btn" id="confirmRelinkBtn">Confirm Re-link</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user