Move ConfigManager modal HTML to template element #12

Closed
opened 2026-02-15 05:31:35 -08:00 by kyle · 0 comments
Owner

Problem: ConfigManager.createConfigModal() contained a 100-line HTML template literal with interpolated config values, making it hard to read, debug, and maintain.

Solution: Moved the static modal HTML to a template element in index.html. ConfigManager now clones the template and populates dynamic values (orientation, dark mode, background settings, sites) programmatically after cloning.

Files changed:

  • index.html - Added template id=config-modal-template
  • public/js/components/ConfigManager.js - Clone template instead of innerHTML
Problem: ConfigManager.createConfigModal() contained a 100-line HTML template literal with interpolated config values, making it hard to read, debug, and maintain. Solution: Moved the static modal HTML to a template element in index.html. ConfigManager now clones the template and populates dynamic values (orientation, dark mode, background settings, sites) programmatically after cloning. Files changed: - index.html - Added template id=config-modal-template - public/js/components/ConfigManager.js - Clone template instead of innerHTML
kyle closed this issue 2026-02-15 05:32:06 -08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kyle/SignageHTML#12