Fix SVG markup in select options, add missing name placeholders

Remove SVG icon function calls from <option> textContent — native
select elements render markup as literal text. Capture template options
now show "name (engine_type)", source options show just the name.

Add i18n placeholders to automation and scene editor name inputs.
Rename HAOS Scenes device from "{server_name} Scenes" to "Scenes".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-28 20:08:06 +03:00
parent 252db09145
commit 175a2c6c10
10 changed files with 15 additions and 9 deletions

View File

@@ -282,7 +282,7 @@ async function loadAvailableEngines() {
availableEngines.forEach(engine => {
const option = document.createElement('option');
option.value = engine.type;
option.textContent = `${getEngineIcon(engine.type)} ${engine.name}`;
option.textContent = engine.name;
if (!engine.available) {
option.disabled = true;
option.textContent += ` (${t('templates.engine.unavailable')})`;
@@ -1563,7 +1563,7 @@ async function populateStreamModalDropdowns() {
opt.value = tmpl.id;
opt.dataset.name = tmpl.name;
opt.dataset.engineType = tmpl.engine_type;
opt.textContent = `${getEngineIcon(tmpl.engine_type)} ${tmpl.name}`;
opt.textContent = `${tmpl.name} (${tmpl.engine_type})`;
templateSelect.appendChild(opt);
});
}
@@ -1581,7 +1581,7 @@ async function populateStreamModalDropdowns() {
const opt = document.createElement('option');
opt.value = s.id;
opt.dataset.name = s.name;
opt.textContent = `${getPictureSourceIcon(s.stream_type)} ${s.name}`;
opt.textContent = s.name;
sourceSelect.appendChild(opt);
});
}