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:
@@ -221,6 +221,19 @@ export class ModalManager {
|
||||
});
|
||||
}
|
||||
|
||||
// Add relinkCivitaiModal registration
|
||||
const relinkCivitaiModal = document.getElementById('relinkCivitaiModal');
|
||||
if (relinkCivitaiModal) {
|
||||
this.registerModal('relinkCivitaiModal', {
|
||||
element: relinkCivitaiModal,
|
||||
onClose: () => {
|
||||
this.getModal('relinkCivitaiModal').element.style.display = 'none';
|
||||
document.body.classList.remove('modal-open');
|
||||
},
|
||||
closeOnOutsideClick: true
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', this.boundHandleEscape);
|
||||
this.initialized = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user