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

@ -107,6 +107,26 @@ body {
.btn-icon:active { opacity: 0.7; }
.btn-sign {
width: 36px;
height: 44px;
border-radius: 10px;
border: 1px solid var(--tg-theme-hint-color, #999)55;
background: var(--tg-theme-secondary-bg-color, #f0f0f0);
color: var(--tg-theme-text-color, #000);
font-size: 18px;
cursor: pointer;
flex-shrink: 0;
}
.btn-sign:active { opacity: 0.6; }
.btn-sign.active {
background: var(--tg-theme-button-color, #3390ec);
color: var(--tg-theme-button-text-color, #fff);
border-color: var(--tg-theme-button-color, #3390ec);
}
.btn-link {
background: none;
border: none;