| void,
}[]
className?: string
buttonClassName?: string
-}) {
+}){
const [isLoading, setIsLoading] = useState(false);
- const itemClass = clsx(
- 'block w-full',
- 'border-none min-h-0 bg-transparent',
- 'text-sm text-main text-left',
- 'px-3 py-1.5 rounded-[3px]',
- 'hover:text-main',
- 'hover:bg-gray-50 active:bg-gray-100',
- 'hover:dark:bg-gray-900/75 active:dark:bg-gray-900',
- 'whitespace-nowrap',
- 'shadow-none',
- isLoading && 'cursor-not-allowed opacity-50',
- );
-
const renderItemContent = (
label: ReactNode,
icon?: ReactNode,
@@ -43,57 +30,77 @@ export default function MoreMenu({
;
return (
-
-
-
+
+
+
);
-}
+};
diff --git a/src/photo/PhotoGrid.tsx b/src/photo/PhotoGrid.tsx
index f24f0e97..cd77b495 100644
--- a/src/photo/PhotoGrid.tsx
+++ b/src/photo/PhotoGrid.tsx
@@ -57,7 +57,7 @@ export default function PhotoGrid({
'aspect-square',
'overflow-hidden',
'[&>*]:flex [&>*]:w-full [&>*]:h-full',
- '[&>*>*]:object-cover [&>*>*]:min-h-full',
+ '[&>*>*]:object-cover',
)
: undefined}
style={{
diff --git a/src/photo/PhotoSmall.tsx b/src/photo/PhotoSmall.tsx
index 810c3a32..b560de25 100644
--- a/src/photo/PhotoSmall.tsx
+++ b/src/photo/PhotoSmall.tsx
@@ -5,6 +5,8 @@ import { clsx } from 'clsx/lite';
import { pathForPhoto } from '@/site/paths';
import { Camera } from '@/camera';
import { FilmSimulation } from '@/simulation';
+import AdminPhotoMenu from '@/admin/AdminPhotoMenu';
+import { Suspense } from 'react';
export default function PhotoSmall({
photo,
@@ -12,21 +14,34 @@ export default function PhotoSmall({
camera,
simulation,
selected,
+ showAdminMenu,
}: {
photo: Photo
tag?: string
camera?: Camera
simulation?: FilmSimulation
selected?: boolean
+ showAdminMenu?: boolean
}) {
return (
+
+ {showAdminMenu &&
+ }
+
? `(${count} ${photoLabelForCount(count)})`
: `${count} ${photoLabelForCount(count)}`;
+export const deleteConfirmationTextForPhoto = (photo: Photo) =>
+ `Are you sure you want to delete "${titleForPhoto(photo)}?"`;
+
export type PhotoDateRange = { start: string, end: string };
export const descriptionForPhotoSet = (