Files
Azornes-Comfyui-Model-Resolver/web/utils/css_loader.js
T
Dariusz L 72d084ab64 refactor: rename utils to lowercase_kebab-case and fix import paths; add Missing Models popup integration to linker
- Rename web/utils/{css-loader→css_loader,ErrorHandler→error_handler,IconUtils→icon_utils,ResourceManager→resource_manager} and web/log_system/{LoggerUtils→log_funcs} to lowercase_kebab-case naming convention
- Update all cross-import paths in the recreated utils and linker.js accordingly
- Add removeResolvedFromPopup / markEntryAsResolved to visually mark resolved entries in the ComfyUI Missing Models popup
- Add updateNodesDirectly to update graph node widgets in-place without triggering a full workflow reload
- Add checkAndOpenForMissingModels with isAutoOpenEnabled/setAutoOpenEnabled to auto-open the linker dialog when a workflow with missing models is loaded
- Add helper methods getMissingSearchKey, getSearchState, mergeSearchResults for per-entry search state caching and merging
2026-05-19 07:55:28 +02:00

43 lines
1.1 KiB
JavaScript

/**
* css_loader
* Loads all CSS files for the resolution master components
*/
import { addStylesheet, getUrl } from "./resource_manager.js";
import { createModuleLogger } from "../log_system/log_funcs.js";
const log = createModuleLogger('CSSLoader');
/**
* Loads all CSS files for the application
*/
export function loadAllStyles() {
try {
log.info('Loading CSS files...');
// Load all CSS files using getUrl for proper path resolution
const cssFiles = [
'./css/css-variables.css',
'./css/linker-shell.css',
'./css/linker-main.css',
];
cssFiles.forEach(file => {
addStylesheet(getUrl(file));
log.debug(`Loaded: ${file}`);
});
log.info('All CSS files loaded successfully');
} catch (error) {
log.error('Error loading CSS files:', error);
}
}
/**
* Call this function when the ResolutionMaster node is actually created/used
* to load styles only when needed, preventing global UI interference
*/
export function loadStylesWhenNeeded() {
loadAllStyles();
}