fix(headroom): toggle reflects enabled setting even when proxy is down

Toggle was checked={headroomEnabled && headroomRunning} and disabled when the proxy was down, so a downed proxy showed OFF while headroomEnabled stayed true in the DB. The engine only checks headroomEnabled, so it kept calling /v1/compress. Toggle now reflects the user setting; proxy up/down stays visible via the status chip.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
decolua
2026-08-13 11:27:49 +07:00
parent 15223724c3
commit 71dcdc1053

View File

@@ -529,8 +529,7 @@ export default function TokenSaverClient() {
</p>
</div>
<Toggle
checked={headroomEnabled && headroomRunning}
disabled={!headroomRunning}
checked={headroomEnabled}
onChange={() => handleHeadroomEnabled(!headroomEnabled)}
/>
</div>