mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
feat: Recipe Timeline Images (#2444)
* refactored recipe image paths/service * added routes for updating/fetching timeline images * make generate * added event image upload and rendering * switched update to patch to preserve timestamp * added tests * tweaked order of requests * always reload events when opening the timeline * re-arranged elements to make them look nicer * delete files when timeline event is deleted
This commit is contained in:
parent
06962cf865
commit
dfe4942451
16 changed files with 355 additions and 92 deletions
|
@ -30,6 +30,18 @@ export const useStaticRoutes = () => {
|
|||
)}`;
|
||||
}
|
||||
|
||||
function recipeTimelineEventImage(recipeId: string, timelineEventId: string) {
|
||||
return `${fullBase}/media/recipes/${recipeId}/images/timeline/${timelineEventId}/original.webp`;
|
||||
}
|
||||
|
||||
function recipeTimelineEventSmallImage(recipeId: string, timelineEventId: string) {
|
||||
return `${fullBase}/media/recipes/${recipeId}/images/timeline/${timelineEventId}/min-original.webp`;
|
||||
}
|
||||
|
||||
function recipeTimelineEventTinyImage(recipeId: string, timelineEventId: string) {
|
||||
return `${fullBase}/media/recipes/${recipeId}/images/timeline/${timelineEventId}/tiny-original.webp`;
|
||||
}
|
||||
|
||||
function recipeAssetPath(recipeId: string, assetName: string) {
|
||||
return `${fullBase}/media/recipes/${recipeId}/assets/${assetName}`;
|
||||
}
|
||||
|
@ -38,6 +50,9 @@ export const useStaticRoutes = () => {
|
|||
recipeImage,
|
||||
recipeSmallImage,
|
||||
recipeTinyImage,
|
||||
recipeTimelineEventImage,
|
||||
recipeTimelineEventSmallImage,
|
||||
recipeTimelineEventTinyImage,
|
||||
recipeAssetPath,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue