Add Pause to the browser client's Sud controls
Mirrors client/brewpi_gui.py's actionPause: btn-sud-pause sends
{"Sud": {"Pause": true}} and is only enabled while actually running
(not idle, not already paused), matching update_sud_actions()'s
enabled/disabled logic - Start already doubles as Resume while paused,
so no separate Resume control is needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0189FkmyJkY77HqsNomr1DwV
This commit is contained in:
@@ -304,6 +304,7 @@ function updateSudActions() {
|
||||
const running = canRun && RUNNING_STATES.has(sudState);
|
||||
const paused = canRun && sudState === PAUSED_STATE;
|
||||
document.getElementById('btn-sud-start').disabled = !(canRun && !running);
|
||||
document.getElementById('btn-sud-pause').disabled = !running;
|
||||
document.getElementById('btn-sud-stop').disabled = !(running || paused);
|
||||
}
|
||||
|
||||
@@ -671,6 +672,9 @@ document.getElementById('btn-sud-save').addEventListener('click', () => {
|
||||
document.getElementById('btn-sud-start').addEventListener('click', () => {
|
||||
sendMsg('Sud', {Start: true});
|
||||
});
|
||||
document.getElementById('btn-sud-pause').addEventListener('click', () => {
|
||||
sendMsg('Sud', {Pause: true});
|
||||
});
|
||||
document.getElementById('btn-sud-stop').addEventListener('click', () => {
|
||||
sendMsg('Sud', {Stop: true});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user