mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 22:52:12 -03:00
checkpoint
This commit is contained in:
16
static/js/common.js
Normal file
16
static/js/common.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { toggleTheme, initTheme } from './utils/uiHelpers.js';
|
||||
import { modalManager } from './managers/ModalManager.js';
|
||||
import { updateService } from './managers/UpdateService.js';
|
||||
import { SettingsManager } from './managers/SettingsManager.js';
|
||||
|
||||
// Export common functions
|
||||
export function initializeCommonComponents() {
|
||||
modalManager.initialize();
|
||||
updateService.initialize();
|
||||
initTheme();
|
||||
|
||||
// Initialize common controls
|
||||
window.toggleTheme = toggleTheme;
|
||||
window.modalManager = modalManager;
|
||||
window.settingsManager = new SettingsManager();
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
// Recipe manager module
|
||||
import { showToast } from './utils/uiHelpers.js';
|
||||
import { state } from './state/index.js';
|
||||
import { initializeCommonComponents } from './common.js';
|
||||
|
||||
class RecipeManager {
|
||||
constructor() {
|
||||
@@ -199,10 +200,11 @@ class RecipeManager {
|
||||
// - Recipe search and filters
|
||||
}
|
||||
|
||||
// Initialize recipe manager when DOM is loaded
|
||||
// Initialize components
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initializeCommonComponents();
|
||||
window.recipeManager = new RecipeManager();
|
||||
});
|
||||
|
||||
// Export for use in other modules
|
||||
export { RecipeManager };
|
||||
export { RecipeManager };
|
||||
Reference in New Issue
Block a user