feat(power): add setting to show current status instead of action
Reddit report: the header power toggle switches correctly but displays "backwards" - the button shows the action a click would perform (e.g. "Aus" while the printer is on), not the printer's actual current state, which some users find counterintuitive. Both readings are legitimate, so this adds a per-printer opt-in (Settings -> Power Switch -> "Aktuellen Status statt Aktion anzeigen") rather than flipping the default for everyone. power_status_inverted=0 (default) keeps today's behavior; =1 mirrors the actual on/off state instead. The backend's power-status parsing is untouched - only _applyHeaderPowerState() picks which state to display, so the click handler still always toggles the real state regardless of display mode.
This commit is contained in:
@ -566,6 +566,10 @@
|
||||
<input type="text" id="s-power-status-url" placeholder="http://192.168.x.x/cm?cmnd=Power">
|
||||
<small id="lbl-power-hint" style="color:var(--txt2)"></small>
|
||||
</div>
|
||||
<div class="modal-field" style="flex-direction:row;align-items:center;gap:10px">
|
||||
<input type="checkbox" id="s-power-status-inverted" style="width:auto;margin:0">
|
||||
<label id="lbl-power-status-inverted" style="margin:0;cursor:pointer" for="s-power-status-inverted">Aktuellen Status statt Aktion anzeigen</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user