asda
This commit is contained in:
@@ -353,11 +353,34 @@
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (consoleNotice) {
|
||||
consoleNotice.textContent = 'Bestehende Konsole kann nicht direkt gesteuert werden – Befehl wird in neuer Konsole ausgeführt.';
|
||||
consoleNotice.style.display = 'block';
|
||||
}
|
||||
submitOpen();
|
||||
const formData = new FormData(consoleForm);
|
||||
if (presetSelect) formData.set('terminal_preset_id', '');
|
||||
const url = new URL(window.location.href);
|
||||
url.searchParams.set('send_active_json', '1');
|
||||
fetch(url.toString(), { method: 'POST', body: formData, cache: 'no-store' })
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
if (data.ok) {
|
||||
if (consoleNotice) {
|
||||
consoleNotice.textContent = data.notice || 'Befehl wurde in der bestehenden Konsole ausgeführt.';
|
||||
consoleNotice.style.display = 'block';
|
||||
}
|
||||
if (consoleError) consoleError.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
if (consoleNotice) {
|
||||
consoleNotice.textContent = data.error || 'Bestehende Konsole nicht verfügbar – Befehl wird in neuer Konsole ausgeführt.';
|
||||
consoleNotice.style.display = 'block';
|
||||
}
|
||||
submitOpen();
|
||||
})
|
||||
.catch(() => {
|
||||
if (consoleNotice) {
|
||||
consoleNotice.textContent = 'Bestehende Konsole nicht verfügbar – Befehl wird in neuer Konsole ausgeführt.';
|
||||
consoleNotice.style.display = 'block';
|
||||
}
|
||||
submitOpen();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user