feat: profile/settings (rest timer toggle)
Settings infrastructure + one working preference: - New user_settings table (JSON blob per user, so adding future keys needs no migration). - db.get_settings / update_settings helpers (merge semantics). - GET/PUT /api/settings endpoints. - New Settings tab in the Mini App with a rest-timer on/off toggle. Setting is loaded on init and written through on change; the rest-timer display now respects it. Units (kg/lb) and language are intentionally left unwired for now — each needs end-to-end display/input changes and deserve focused passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9636d6870e
commit
6d1de53b2e
6 changed files with 181 additions and 2 deletions
|
|
@ -486,6 +486,37 @@ details[open] .raw-toggle::before {
|
|||
opacity: 1;
|
||||
}
|
||||
|
||||
/* ── Settings view ───────────────────────────────────────────── */
|
||||
|
||||
.settings-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.settings-row-label { flex: 1; }
|
||||
|
||||
.settings-row-title {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--tg-theme-text-color, #000);
|
||||
}
|
||||
|
||||
.settings-row-hint {
|
||||
font-size: 12px;
|
||||
color: var(--tg-theme-hint-color, #999);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.settings-toggle {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
cursor: pointer;
|
||||
accent-color: var(--tg-theme-button-color, #2481cc);
|
||||
}
|
||||
|
||||
/* ── Footer / version badge ──────────────────────────────────── */
|
||||
|
||||
#app-footer {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue