- Render welcome_message in gallery view for all non-fullpage layouts (grid, masonry, carousel, timeline, mosaic) as a centered banner - Add /api prefix to thumbnail/photo URLs in adminGuests.js and adminPhotos.js so they route correctly through Nginx proxy
This commit is contained in:
@@ -138,8 +138,8 @@ router.get(
|
|||||||
id: p.id,
|
id: p.id,
|
||||||
filename: p.filename,
|
filename: p.filename,
|
||||||
original_filename: p.original_filename,
|
original_filename: p.original_filename,
|
||||||
url: `/admin/photos/${eventId}/photo/${p.id}`,
|
url: `/api/admin/photos/${eventId}/photo/${p.id}`,
|
||||||
thumbnail_url: `/admin/photos/${eventId}/thumbnail/${p.id}`,
|
thumbnail_url: `/api/admin/photos/${eventId}/thumbnail/${p.id}`,
|
||||||
picker_count: parseInt(p.picker_count, 10),
|
picker_count: parseInt(p.picker_count, 10),
|
||||||
})),
|
})),
|
||||||
});
|
});
|
||||||
@@ -418,8 +418,8 @@ router.get(
|
|||||||
filename: row.filename,
|
filename: row.filename,
|
||||||
original_filename: row.original_filename,
|
original_filename: row.original_filename,
|
||||||
type: row.type,
|
type: row.type,
|
||||||
url: `/admin/photos/${eventId}/photo/${row.photo_id}`,
|
url: `/api/admin/photos/${eventId}/photo/${row.photo_id}`,
|
||||||
thumbnail_url: `/admin/photos/${eventId}/thumbnail/${row.photo_id}`,
|
thumbnail_url: `/api/admin/photos/${eventId}/thumbnail/${row.photo_id}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
const selections = {
|
const selections = {
|
||||||
|
|||||||
@@ -922,9 +922,9 @@ router.get('/:eventId/photos', adminAuth, requirePermission('photos.view'), requ
|
|||||||
filename: photo.filename,
|
filename: photo.filename,
|
||||||
original_filename: photo.original_filename || null,
|
original_filename: photo.original_filename || null,
|
||||||
// Use the correct admin photos router base for serving images
|
// Use the correct admin photos router base for serving images
|
||||||
url: `/admin/photos/${eventId}/photo/${photo.id}`,
|
url: `/api/admin/photos/${eventId}/photo/${photo.id}`,
|
||||||
// Always expose a thumbnail URL; backend will generate on demand if missing
|
// Always expose a thumbnail URL; backend will generate on demand if missing
|
||||||
thumbnail_url: `/admin/photos/${eventId}/thumbnail/${photo.id}`,
|
thumbnail_url: `/api/admin/photos/${eventId}/thumbnail/${photo.id}`,
|
||||||
type: photo.type,
|
type: photo.type,
|
||||||
category_id: photo.category_id || photo.type,
|
category_id: photo.category_id || photo.type,
|
||||||
category_name: photo.pc_name || (photo.type === 'individual' ? 'Individual Photos' : 'Collages'),
|
category_name: photo.pc_name || (photo.type === 'individual' ? 'Individual Photos' : 'Collages'),
|
||||||
|
|||||||
@@ -295,6 +295,13 @@ export const PhotoGridWithLayouts: React.FC<PhotoGridWithLayoutsProps> = ({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Welcome Message - shown for non-fullpage layouts when set */}
|
||||||
|
{!isFullPageLayout && welcomeMessage && (
|
||||||
|
<div className="mb-6 px-4 py-3 rounded-lg bg-card-theme/50 border border-border-theme text-center">
|
||||||
|
<p className="text-sm text-muted-theme whitespace-pre-line">{welcomeMessage}</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Selection Mode Controls - Not shown for carousel, full-page layouts, or when controls are hidden */}
|
{/* Selection Mode Controls - Not shown for carousel, full-page layouts, or when controls are hidden */}
|
||||||
{showSelectionControls && photos.length > 1 && galleryLayout !== 'carousel' && !isFullPageLayout && (
|
{showSelectionControls && photos.length > 1 && galleryLayout !== 'carousel' && !isFullPageLayout && (
|
||||||
<div className="mb-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
|
<div className="mb-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user