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
|
|
@ -13,6 +13,7 @@
|
|||
<button class="tab active" data-view="log">Log</button>
|
||||
<button class="tab" data-view="history">History</button>
|
||||
<button class="tab" data-view="stats">Stats</button>
|
||||
<button class="tab" data-view="settings">Settings</button>
|
||||
</nav>
|
||||
|
||||
<!-- ═══ LOG VIEW ═══ -->
|
||||
|
|
@ -92,6 +93,19 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ═══ SETTINGS VIEW ═══ -->
|
||||
<div id="view-settings" class="view">
|
||||
<div class="card">
|
||||
<label class="settings-row">
|
||||
<div class="settings-row-label">
|
||||
<div class="settings-row-title">Rest timer</div>
|
||||
<div class="settings-row-hint">Show time since the last set was logged.</div>
|
||||
</div>
|
||||
<input type="checkbox" id="setting-rest-timer" class="settings-toggle" checked />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer id="app-footer">
|
||||
<span id="version-badge"></span>
|
||||
</footer>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue