Feature: Tagebuch Cover-Bild (Favorit-Funktion) für diary_media

- Migration: diary_media.is_cover (INTEGER DEFAULT 0)
- Upload: erstes Item eines Eintrags automatisch is_cover=1
- Neuer Endpoint: PATCH /diary/{id}/media/{mid}/cover
- GET-Endpoints geben is_cover + cover_url zurück
- Frontend: Stern-Button () in Gallery-Detail und Edit-Formular
- Timeline-Karte verwendet cover_url als Vorschaubild
- SW by-v212, APP_VER 186
This commit is contained in:
rene 2026-04-18 19:07:37 +02:00
parent 63ab092f5e
commit fa0fcbf8c9
7 changed files with 196 additions and 21 deletions

View file

@ -127,6 +127,9 @@ const API = (() => {
deleteMediaItem(dogId, entryId, mediaId) {
return del(`/dogs/${dogId}/diary/${entryId}/media/${mediaId}`);
},
setCover(dogId, entryId, mediaId) {
return patch(`/dogs/${dogId}/diary/${entryId}/media/${mediaId}/cover`, {});
},
nearby(dogId, lat, lon) {
return get(`/dogs/${dogId}/diary/nearby?lat=${lat}&lon=${lon}`);
},
@ -149,6 +152,12 @@ const API = (() => {
deleteDocument(dogId, id) {
return del(`/dogs/${dogId}/health/${id}/dokument`);
},
uploadMedia(dogId, entryId, formData) {
return upload(`/dogs/${dogId}/health/${entryId}/media`, formData);
},
deleteMedia(dogId, entryId, mediaId) {
return del(`/dogs/${dogId}/health/${entryId}/media/${mediaId}`);
},
kiZusammenfassung(dogId) {
return post(`/dogs/${dogId}/health/ki-zusammenfassung`);
},