From a6ed93ddbf009b5ea83708729ee0f81d56ec6800 Mon Sep 17 00:00:00 2001 From: DiTus Date: Wed, 25 Feb 2026 22:36:43 +0100 Subject: [PATCH] Fix syntax error in showPresets function Fixed nested template literal syntax error by escaping properly and using string concatenation instead of nested template literals to avoid interpolation conflicts. --- .../static/js/ui/indicators-panel-new.js | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/api/dashboard/static/js/ui/indicators-panel-new.js b/src/api/dashboard/static/js/ui/indicators-panel-new.js index e888e31..e29d812 100644 --- a/src/api/dashboard/static/js/ui/indicators-panel-new.js +++ b/src/api/dashboard/static/js/ui/indicators-panel-new.js @@ -590,16 +590,22 @@ window.showPresets = function(indicatorName) { } const menu = window.open('', '_blank', 'width=400,height=500'); - menu.document.write(` - Presets - ${indicatorName} -

${indicatorName} Presets

- ${presets.map(p => `
${p.name}
`).join('')} - - `; + + let htmlContent = + 'Presets - ' + indicatorName + '' + + '

' + indicatorName + ' Presets

'; + + presets.forEach(p => { + htmlContent += '
' + p.name + '
'; + }); + + htmlContent += ''; + + menu.document.write(htmlContent); }; window.applyPresetFromWindow = function(presetId) {