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:
+4
-6
@@ -332,9 +332,8 @@
|
||||
<textarea id="note-input" rows="4" placeholder="e.g. pee was instant, poo took 5min, ate 300g raw food"></textarea>
|
||||
</label>
|
||||
<div class="photo-field">
|
||||
<input type="file" id="note-photo-input" accept="image/*" capture="environment" hidden />
|
||||
<button type="button" id="note-photo-btn" class="ghost">📷 Add photo</button>
|
||||
<button type="button" id="note-photo-clear" class="ghost" hidden>Remove photo</button>
|
||||
<input type="file" id="note-photo-input" accept="image/*" multiple hidden />
|
||||
<button type="button" id="note-photo-btn" class="ghost">📷 Add photos</button>
|
||||
<div id="note-photo-preview" class="photo-preview" hidden></div>
|
||||
</div>
|
||||
<menu>
|
||||
@@ -363,9 +362,8 @@
|
||||
<textarea id="edit-note" rows="4"></textarea>
|
||||
</label>
|
||||
<div class="photo-field">
|
||||
<input type="file" id="edit-photo-input" accept="image/*" capture="environment" hidden />
|
||||
<button type="button" id="edit-photo-btn" class="ghost">📷 Add photo</button>
|
||||
<button type="button" id="edit-photo-clear" class="ghost" hidden>Remove photo</button>
|
||||
<input type="file" id="edit-photo-input" accept="image/*" multiple hidden />
|
||||
<button type="button" id="edit-photo-btn" class="ghost">📷 Add photos</button>
|
||||
<div id="edit-photo-preview" class="photo-preview" hidden></div>
|
||||
</div>
|
||||
<menu>
|
||||
|
||||
Reference in New Issue
Block a user