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();
|
||||
|
||||
@@ -632,6 +632,22 @@ h2 {
|
||||
0 8px 18px rgba(109, 126, 132, 0.08);
|
||||
}
|
||||
|
||||
.rumble_btn {
|
||||
grid-column: span 2;
|
||||
min-height: auto !important;
|
||||
padding: 0.45rem 0.9rem;
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.75;
|
||||
color: #fff;
|
||||
background: rgba(255,255,255,0.12);
|
||||
border: 1px solid rgba(255,255,255,0.2);
|
||||
}
|
||||
|
||||
.rumble_btn:hover {
|
||||
opacity: 1;
|
||||
background: rgba(255,255,255,0.2);
|
||||
}
|
||||
|
||||
.delay_control {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user