feat: Move LoRA related components to shared directory for consistency

- Added PresetTags.js to handle LoRA model preset parameter tags.
- Introduced RecipeTab.js for managing recipes associated with LoRA models.
- Created TriggerWords.js to manage trigger word functionality for LoRA models.
- Implemented utility functions in utils.js for general model modal operations.
This commit is contained in:
Will Miao
2025-07-22 16:00:04 +08:00
parent 67b403f8ca
commit fcfc868e57
26 changed files with 1240 additions and 2673 deletions

View File

@@ -12,25 +12,12 @@ export class ModalManager {
this.boundHandleEscape = this.handleEscape.bind(this);
// Register all modals - only if they exist in the current page
const loraModal = document.getElementById('loraModal');
if (loraModal) {
this.registerModal('loraModal', {
element: loraModal,
const modelModal = document.getElementById('modelModal');
if (modelModal) {
this.registerModal('modelModal', {
element: modelModal,
onClose: () => {
this.getModal('loraModal').element.style.display = 'none';
document.body.classList.remove('modal-open');
},
closeOnOutsideClick: true
});
}
// Add checkpointModal registration
const checkpointModal = document.getElementById('checkpointModal');
if (checkpointModal) {
this.registerModal('checkpointModal', {
element: checkpointModal,
onClose: () => {
this.getModal('checkpointModal').element.style.display = 'none';
this.getModal('modelModal').element.style.display = 'none';
document.body.classList.remove('modal-open');
},
closeOnOutsideClick: true