Add more logging to template config loading for debugging

parent 584643a5
......@@ -134,7 +134,9 @@ class WebOverlayController {
*/
async loadTemplateConfig() {
try {
console.log('[OverlayController] Loading template config...');
const config = await this.apiRequest('/template-config');
console.log('[OverlayController] Template config response:', config);
if (config && config.templates && config.templates.length > 0) {
this.templateSequence = config.templates;
......@@ -149,12 +151,14 @@ class WebOverlayController {
}
}
this.log(`Loaded template config: ${this.templateSequence.length} templates, rotating every ${this.rotatingTime}s`);
console.log(`[OverlayController] Loaded template config: ${this.templateSequence.length} templates, rotating every ${this.rotatingTime}s`);
console.log('[OverlayController] Template sequence:', this.templateSequence.map(t => t.name).join(', '));
// Start template rotation
this.startTemplateRotation();
} else {
this.log('No template sequence configured, using default template');
console.log('[OverlayController] No template sequence configured, using default template');
console.log('[OverlayController] Config:', config);
}
} catch (error) {
console.error('[OverlayController] Failed to load template config:', error);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment