v0.9.14
This commit is contained in:
+7
-6
@@ -255,11 +255,6 @@ $('#haTest').addEventListener('click', async event => {
|
||||
finally { button.disabled = false; button.textContent = idle; }
|
||||
});
|
||||
|
||||
$('#simulationRefresh')?.addEventListener('click', async () => {
|
||||
try { await loadControlPlan(); toast(tr('common.updated')); }
|
||||
catch (error) { toast(error.message, true); }
|
||||
});
|
||||
|
||||
$('#exportSettings').addEventListener('click', async () => {
|
||||
try {
|
||||
const data = await api('/api/settings/export');
|
||||
@@ -327,7 +322,13 @@ $('#flowSharedInputTest')?.addEventListener('click', async event => {
|
||||
if (!form || !resultHost) return;
|
||||
const kind = form.kind.value, config = collectFlowSharedInputConfig(kind);
|
||||
const entityId = String(config.entity_id || '').trim();
|
||||
if (!entityId) return toast(tr('flow.sharedInputTestEntityRequired'), true);
|
||||
if (!entityId) {
|
||||
resultHost.hidden = false;
|
||||
resultHost.classList.remove('pass');
|
||||
resultHost.classList.add('fail');
|
||||
resultHost.innerHTML = `<strong>${esc(tr('flow.sharedInputTestUnavailable'))}</strong><span>${esc(tr('flow.sharedInputTestEntityRequired'))}</span>`;
|
||||
return;
|
||||
}
|
||||
const button = event.currentTarget, idle = button.textContent;
|
||||
button.disabled = true; button.textContent = tr('flow.sharedInputTesting');
|
||||
resultHost.hidden = false; resultHost.innerHTML = `<span>${esc(tr('flow.sharedInputTesting'))}</span>`;
|
||||
|
||||
Reference in New Issue
Block a user