v0.9.14
This commit is contained in:
+2
-3
@@ -243,8 +243,7 @@
|
||||
</div>
|
||||
<div class="simulation-head-actions"><button class="secondary" id="simulationOpenTab"
|
||||
data-i18n="simulation.openTab">Open only simulator in new tab</button><button class="secondary"
|
||||
id="simulationFullscreen" data-i18n="simulation.fullscreen">Full screen</button><button class="secondary"
|
||||
id="simulationRefresh" data-i18n="actions.refresh">Refresh</button></div>
|
||||
id="simulationFullscreen" data-i18n="simulation.fullscreen">Full screen</button></div>
|
||||
</div>
|
||||
<p class="lead" data-i18n="simulation.description">Live preview of the thermostat and automation logic. The flow
|
||||
board shows how sensor readings, schedules, night mode and thermostat decisions become commands sent to each
|
||||
@@ -731,7 +730,7 @@
|
||||
<div id="flowSharedInputTestPanel" class="flow-shared-test-panel" hidden>
|
||||
<div><strong data-i18n="flow.sharedInputTest">Testuj wejście HA</strong><p class="field-note" data-i18n="flow.sharedInputTestHint">Test używa zapisanej konfiguracji połączenia Home Assistant i nie zapisuje tego wejścia.</p></div>
|
||||
<button type="button" class="secondary" id="flowSharedInputTest" data-i18n="flow.sharedInputTest">Testuj wejście HA</button>
|
||||
<div id="flowSharedInputTestResult" class="flow-shared-test-result" hidden></div>
|
||||
<div id="flowSharedInputTestResult" class="flow-shared-test-result" role="status" aria-live="polite" hidden></div>
|
||||
</div>
|
||||
<div class="form-actions"><button type="button" class="secondary" data-close data-i18n="actions.cancel">Anuluj</button><button type="submit" class="primary" data-i18n="actions.save">Zapisz</button></div>
|
||||
</form>
|
||||
|
||||
+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