Compare commits
No commits in common. "77c77ff9db1dae5b8e420d7557284e666cb61d8c" and "9a66c82db6e51d13cb0014c23ccb31e4022b583d" have entirely different histories.
77c77ff9db
...
9a66c82db6
|
|
@ -1031,15 +1031,10 @@ export type PhotoWallUploadMeta = {
|
|||
export type PhotoWallPresentData = {
|
||||
eventId: string;
|
||||
eventName: string;
|
||||
event?: PhotoWallPublicEvent | null;
|
||||
eventHeader?: PhotoWallEventHeaderDisplay | null;
|
||||
photosPerRow: number;
|
||||
maxPhotoWidth: number;
|
||||
maxPhotoHeight: number;
|
||||
gapPx: number;
|
||||
presentMarginTopPx?: number;
|
||||
presentMarginLeftPx?: number;
|
||||
presentMarginRightPx?: number;
|
||||
showUploaderNameOnWall?: boolean;
|
||||
frameEnabled?: boolean;
|
||||
frameCanvasWidth?: number;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
import { getPhotoWallPresent, type PhotoWallPresentData } from "../lib/api";
|
||||
import { PhotoWallEventHeader } from "../components/PhotoWallEventHeader";
|
||||
|
||||
const POLL_MS = 4000;
|
||||
|
||||
|
|
@ -52,9 +51,6 @@ export function PhotoWallPresentPage() {
|
|||
const maxW = data.maxPhotoWidth || 320;
|
||||
const maxH = data.maxPhotoHeight || 320;
|
||||
const gap = data.gapPx ?? 8;
|
||||
const marginTop = Math.max(0, data.presentMarginTopPx ?? 0);
|
||||
const marginLeft = Math.max(0, data.presentMarginLeftPx ?? 0);
|
||||
const marginRight = Math.max(0, data.presentMarginRightPx ?? 0);
|
||||
const showNames = Boolean(data.showUploaderNameOnWall);
|
||||
const frameEnabled = Boolean(data.frameEnabled);
|
||||
const frameW = data.frameCanvasWidth || 1080;
|
||||
|
|
@ -63,22 +59,12 @@ export function PhotoWallPresentPage() {
|
|||
|
||||
return (
|
||||
<div className="eb-gradient-auth min-h-dvh text-white">
|
||||
{data.event ? (
|
||||
<div className="px-4 pb-3 pt-4">
|
||||
<div className="card-bg mx-auto mb-3 max-w-[400px] rounded-lg p-4 shadow-sm [&:not(:has(header))]:hidden">
|
||||
<PhotoWallEventHeader
|
||||
event={data.event}
|
||||
display={data.eventHeader || null}
|
||||
eyebrow={data.eventHeader?.showTitle === false ? null : "Photo Wall"}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="card-bg mx-auto mb-3 max-w-[400px] rounded-lg px-4 pb-3 pt-4 text-center shadow-sm">
|
||||
<p className="text-xs uppercase tracking-[0.2em] text-[var(--theme-card-text-color)]/70">Photo Wall</p>
|
||||
<h1 className="text-xl font-semibold text-[var(--theme-card-text-color)] sm:text-2xl">{data.eventName}</h1>
|
||||
</div>
|
||||
)}
|
||||
<div className="px-4 pb-3 pt-4 text-center card-bg rounded-lg shadow-sm max-w-[720px] mx-auto mb-3">
|
||||
<p className="text-xs uppercase tracking-[0.2em] text-[var(--theme-card-text-color)]/70 mb-1">Photo Wall</p>
|
||||
<h1 className="text-lg font-semibold sm:text-xl text-[var(--theme-card-text-color)]">
|
||||
{data.eventName}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
{data.photos.length === 0 ? (
|
||||
<div className="flex min-h-[60dvh] items-center justify-center px-6 text-center text-white/80">
|
||||
|
|
@ -86,28 +72,25 @@ export function PhotoWallPresentPage() {
|
|||
</div>
|
||||
) : (
|
||||
<div
|
||||
className="mx-auto w-full max-w-[100vw] pb-6"
|
||||
className="mx-auto w-full max-w-[100vw] px-3 pb-6 "
|
||||
style={{
|
||||
display: "grid",
|
||||
gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`,
|
||||
gap: `${gap}px`,
|
||||
justifyItems: "center",
|
||||
alignItems: "start",
|
||||
paddingTop: `${marginTop}px`,
|
||||
paddingLeft: `${marginLeft}px`,
|
||||
paddingRight: `${marginRight}px`,
|
||||
}}
|
||||
>
|
||||
{data.photos.map((p) => (
|
||||
<div
|
||||
key={p._id}
|
||||
className="flex w-full flex-col items-center rounded-xl bg-[var(--theme-card-color)]/50"
|
||||
className="flex w-full flex-col items-center bg-[var(--theme-card-color)]/50 rounded-xl"
|
||||
style={{ maxWidth: maxW }}
|
||||
>
|
||||
<img
|
||||
src={p.url}
|
||||
alt={p.displayName || "Photo Wall"}
|
||||
className="relative z-1 w-full object-cover shadow-lg"
|
||||
alt={`${p.displayName || 'Photo Wall'}`}
|
||||
className={`w-full object-cover shadow-lg relative z-1`}
|
||||
style={{
|
||||
maxWidth: maxW,
|
||||
maxHeight: maxH,
|
||||
|
|
@ -117,7 +100,7 @@ export function PhotoWallPresentPage() {
|
|||
/>
|
||||
{showNames && p.displayName ? (
|
||||
<p
|
||||
className="mt-1 w-full truncate rounded-md p-2 text-center text-sm font-bold text-[var(--theme-card-text-color)]/90"
|
||||
className="w-full truncate text-center text-sm font-bold text-[var(--theme-card-text-color)]/90 rounded-md p-2"
|
||||
title={p.displayName}
|
||||
>
|
||||
{p.displayName}
|
||||
|
|
|
|||
Loading…
Reference in New Issue