Settings sync between the dashboard and the app
- Dashboard (settingsync.py): the plugins' settings go into a synced settings.db, one row per setting (the row id is the setting's key, so the phone and the dashboard edit the same row; the later change wins) plus each field as the plugin declares it. Fields marked "local" (addresses, paths on one machine) and the plugins' on / off stay out. Values set on another device are checked as the Settings page does before they're saved; a refused one is written back with the dashboard's value. - App 1.1.7: a Settings page (the gear on every tab) built from those fields, synced both ways. Food targets, the cycle, the work day and the body profile read the synced values; with a dashboard that doesn't sync settings yet, they still come from its Health summaries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
98b110dd56
commit
820aca7d92
25 changed files with 606 additions and 41 deletions
|
|
@ -47,13 +47,13 @@ class _BodyPageState extends State<BodyPage> {
|
|||
backgroundColor: accent,
|
||||
foregroundColor: bg,
|
||||
tooltip: 'Add measurements',
|
||||
onPressed: () => _edit(BodyView(widget.sync.store, profileOf(widget.sync.store)), null),
|
||||
onPressed: () => _edit(BodyView(widget.sync.store, Profile.of(widget.sync.store)), null),
|
||||
child: const Icon(Icons.add),
|
||||
),
|
||||
body: ListenableBuilder(
|
||||
listenable: Listenable.merge([widget.sync, widget.range]),
|
||||
builder: (context, _) {
|
||||
final v = BodyView(widget.sync.store, profileOf(widget.sync.store));
|
||||
final v = BodyView(widget.sync.store, Profile.of(widget.sync.store));
|
||||
if (v.rows.isEmpty) {
|
||||
return const Center(child: Text('No measurements yet — + to add the first.', style: TextStyle(color: muted)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue