diff --git a/contexts/frontend.md b/contexts/frontend.md index 6b7f7a9..11dad8f 100644 --- a/contexts/frontend.md +++ b/contexts/frontend.md @@ -55,6 +55,19 @@ Add hint text to both `en.json` and `ru.json` locale files using a `.hint` suffi Do **not** add placeholder options like `-- Select something --`. Populate the `` dropdowns should be enhanced with visual selectors depending on the data type: diff --git a/server/src/wled_controller/static/js/features/color-strips.js b/server/src/wled_controller/static/js/features/color-strips.js index a1933eb..62c5c03 100644 --- a/server/src/wled_controller/static/js/features/color-strips.js +++ b/server/src/wled_controller/static/js/features/color-strips.js @@ -222,7 +222,7 @@ export function onCSSTypeChange() { function _populateClockDropdown(selectedId) { const sel = document.getElementById('css-editor-clock'); const prev = selectedId !== undefined ? selectedId : sel.value; - sel.innerHTML = `` + + sel.innerHTML = `` + _cachedSyncClocks.map(c => ``).join(''); sel.value = prev || ''; @@ -238,7 +238,7 @@ function _populateClockDropdown(selectedId) { })), placeholder: t('palette.search'), allowNone: true, - noneLabel: t('common.none'), + noneLabel: t('common.none_own_speed'), }); } @@ -253,7 +253,7 @@ function _populateProcessedSelectors() { const inputSources = allSources.filter(s => s.id !== editingId && s.source_type !== 'processed'); const inputSel = document.getElementById('css-editor-processed-input'); const prevInput = inputSel.value; - inputSel.innerHTML = '' + + inputSel.innerHTML = `` + inputSources.map(s => ``).join(''); inputSel.value = prevInput || ''; if (_processedInputEntitySelect) _processedInputEntitySelect.destroy(); @@ -270,7 +270,7 @@ function _populateProcessedSelectors() { const templates = csptCache.data || []; const tplSel = document.getElementById('css-editor-processed-template'); const prevTpl = tplSel.value; - tplSel.innerHTML = '' + + tplSel.innerHTML = `` + templates.map(tp => ``).join(''); tplSel.value = prevTpl || ''; if (_processedTemplateEntitySelect) _processedTemplateEntitySelect.destroy(); @@ -644,7 +644,7 @@ function _compositeRenderList() { `` ).join(''); const csptList = _cachedCSPTemplates || []; - const csptOptions = `` + + const csptOptions = `` + csptList.map(tmpl => `` ).join(''); @@ -734,7 +734,7 @@ function _compositeRenderList() { getItems: _getCompositeCSPTItems, placeholder: t('palette.search'), allowNone: true, - noneLabel: t('common.none'), + noneLabel: t('common.none_no_cspt'), })); }); } diff --git a/server/src/wled_controller/static/js/features/device-discovery.js b/server/src/wled_controller/static/js/features/device-discovery.js index 7e9d6be..4fdbee8 100644 --- a/server/src/wled_controller/static/js/features/device-discovery.js +++ b/server/src/wled_controller/static/js/features/device-discovery.js @@ -70,7 +70,7 @@ function _ensureCsptEntitySelect() { if (!sel) return; const templates = csptCache.data || []; // Populate native