mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
Refactor state management to support hierarchical structure and page-specific states
- Introduced a new hierarchical state structure to manage global and page-specific states, enhancing organization and maintainability. - Updated various managers and components to utilize the new state structure, ensuring consistent access to page-specific data. - Removed the initSettings function and replaced it with initPageState for better initialization of page-specific states. - Adjusted imports across multiple files to accommodate the new state management approach, improving code clarity.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Core application functionality
|
||||
import { state, initSettings } from './state/index.js';
|
||||
import { state } from './state/index.js';
|
||||
import { LoadingManager } from './managers/LoadingManager.js';
|
||||
import { modalManager } from './managers/ModalManager.js';
|
||||
import { updateService } from './managers/UpdateService.js';
|
||||
@@ -18,9 +18,6 @@ export class AppCore {
|
||||
async initialize() {
|
||||
if (this.initialized) return;
|
||||
|
||||
// Initialize settings
|
||||
initSettings();
|
||||
|
||||
// Initialize managers
|
||||
state.loadingManager = new LoadingManager();
|
||||
modalManager.initialize();
|
||||
@@ -80,4 +77,4 @@ export class AppCore {
|
||||
export const appCore = new AppCore();
|
||||
|
||||
// Export common utilities for global use
|
||||
export { showToast, modalManager, state, lazyLoadImages, initializeInfiniteScroll };
|
||||
export { showToast, lazyLoadImages, initializeInfiniteScroll };
|
||||
Reference in New Issue
Block a user