Support multiple photos per event
photoId now holds one or more photo UUIDs, comma-separated. The server never interprets the field (photos are uploaded and served individually by UUID), so no schema change is needed and legacy single-photo events are already valid one-element lists. Both dialogs let you keep adding photos, previewed as thumbnails with a per-photo remove button; the file input allows multi-select and no longer forces the camera, so the gallery is available too. History rows show every photo, each opening in the lightbox.
This commit is contained in:
1 parent
3a829161e3
commit
a202f3e929
5 files changed
+133
-96
No files matched your search
+1
-1
@@ -28,7 +28,7 @@ type Event struct {
|
||||
Type string `json:"type"`
|
||||
At int64 `json:"at"`
|
||||
Note string `json:"note"`
|
||||
PhotoID string `json:"photoId,omitempty"`
|
||||
PhotoID string `json:"photoId,omitempty"` // photo UUIDs, comma-separated (legacy events hold one)
|
||||
Weight float64 `json:"weight,omitempty"` // kilograms, for "weight" events
|
||||
Grams float64 `json:"grams,omitempty"` // food eaten, for "eat" events
|
||||
ExerciseID string `json:"exerciseId,omitempty"` // for "training" events
|
||||
|
||||
Reference in new issue
Block a user