feat(webapp): +/- sign toggle on weight input (feedback #9)

iOS numeric keypad has no minus key, so users couldn't enter
negative weights for assisted bodyweight exercises (e.g. -20 kg
assisted pull-ups).

Added a small +/- button next to the weight input that flips the
sign of whatever's there (or seeds a lone "-" when the field is
empty so the user can type digits after it). Active state lights
up the button so you can see at a glance that the value is
negative. Parses and stores as a negative REAL in SQLite; existing
display code (fmtWeight) already handles negative numbers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Danny 2026-04-23 15:36:21 +02:00
parent a127cc8f82
commit 9673bcbb7c
3 changed files with 49 additions and 0 deletions

View file

@ -42,6 +42,7 @@
<input type="text" id="inp-reps" class="input input-small" placeholder="Reps" inputmode="numeric" pattern="[0-9]*" />
<span class="set-separator">x</span>
<input type="text" id="inp-weight" class="input input-small" placeholder="kg" inputmode="decimal" />
<button id="btn-weight-sign" class="btn-sign" title="Flip sign (for assisted exercises)" type="button">&plusmn;</button>
<button id="btn-add-set" class="btn-icon" title="Add set">+</button>
</div>
</div>