Files
Azornes-Comfyui-Model-Resolver/web/utils/css_loader.js
T
Dariusz L 5a8e68655f refactor: rename Model Linker to Model Resolver
Replace all link dialog terminology with resolver terminology
throughout the codebase, including module names, CSS classes,
IDs, JS variables, SVG gradient IDs, and log module names.
Remove the old web/linker/ tree and introduce the new web/resolver/
tree with parallel structure. Also replace core/linker.py with
core/resolver.py.
2026-06-05 05:53:39 +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/resolver-shell.css',
'./css/resolver-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();
}