Rückmeldung vibration
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
<button class="button buttonDanger" onclick="runAdminAction('restart-container')">ExoMy-Container neu starten</button>
|
||||
<button class="button buttonWarm" onclick="runAdminAction('reboot')">Raspberry Pi neu starten</button>
|
||||
<button class="button buttonDanger" onclick="runAdminAction('shutdown')">Raspberry Pi herunterfahren</button>
|
||||
<button class="button rumble_btn" onclick="runRumble()">Controller vibrieren</button>
|
||||
</div>
|
||||
|
||||
<div class="service_compact">
|
||||
@@ -330,6 +331,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function runRumble() {
|
||||
try {
|
||||
var response = await fetch(adminApiBase + '/api/rumble', { method: 'POST' });
|
||||
var data = await response.json();
|
||||
setAdminStatus(data.status || 'Vibration ausgelöst');
|
||||
window.setTimeout(function() { setAdminStatus('Bereit'); }, 2000);
|
||||
} catch (e) {
|
||||
setAdminStatus('Fehler');
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('load', function () {
|
||||
var input = document.getElementById('auth_input');
|
||||
input.focus();
|
||||
|
||||
Reference in New Issue
Block a user