mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-22 21:52:11 -03:00
feat: enhance model version context with file metadata
- Rename `preview_overrides` to `version_context` to better reflect expanded purpose - Add file_path and file_name fields to version serialization - Update method names and parameter signatures for consistency - Include file metadata from cache in version context building - Maintain backward compatibility with existing preview URL functionality The changes provide more comprehensive version information including file details while maintaining existing preview override behavior.
This commit is contained in:
@@ -9,7 +9,8 @@ import { translate } from '../../utils/i18nHelpers.js';
|
||||
/**
|
||||
* Set up tab switching functionality
|
||||
*/
|
||||
export function setupTabSwitching() {
|
||||
export function setupTabSwitching(options = {}) {
|
||||
const { onTabChange } = options;
|
||||
const tabButtons = document.querySelectorAll('.showcase-tabs .tab-btn');
|
||||
|
||||
tabButtons.forEach(button => {
|
||||
@@ -31,6 +32,14 @@ export function setupTabSwitching() {
|
||||
if (button.dataset.tab === 'description') {
|
||||
await loadModelDescription();
|
||||
}
|
||||
|
||||
if (typeof onTabChange === 'function') {
|
||||
try {
|
||||
await onTabChange(button.dataset.tab);
|
||||
} catch (error) {
|
||||
console.error('Error handling tab change:', error);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -176,4 +185,4 @@ export async function setupModelDescriptionEditing(filePath) {
|
||||
descContainer.classList.remove('editing');
|
||||
editBtn.classList.remove('visible');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user