Skip to content

Commit 2430bc8

Browse files
makerjackieclaude
andcommitted
feat(events): add download button to photo preview
- Add download button at bottom center of lightbox - Use semi-transparent backdrop with hover effect - Prevent click propagation to avoid closing lightbox Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3201784 commit 2430bc8

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

  • apps/web/src/app/(main)/(public)/events/[eventId]/photos

‎apps/web/src/app/(main)/(public)/events/[eventId]/photos/page.tsx‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
useQuery,
88
useQueryClient,
99
} from "@tanstack/react-query";
10-
import { Loader2, Grid3x3, User, Upload, Share2 } from "lucide-react";
10+
import { Loader2, Grid3x3, User, Upload, Share2, Download } from "lucide-react";
1111
import { Checkbox } from "@community/ui/ui/checkbox";
1212
import { Button } from "@community/ui/ui/button";
1313
import {
@@ -1412,6 +1412,15 @@ export default function EventPhotosPage() {
14121412
alt="Preview"
14131413
className="max-w-full max-h-full object-contain"
14141414
/>
1415+
<a
1416+
href={selectedImage}
1417+
download
1418+
onClick={(e) => e.stopPropagation()}
1419+
className="absolute bottom-6 left-1/2 -translate-x-1/2 flex items-center gap-2 px-4 py-2 bg-white/10 hover:bg-white/20 backdrop-blur-sm rounded-full text-white text-sm font-medium transition-colors"
1420+
>
1421+
<Download className="h-4 w-4" />
1422+
下载照片
1423+
</a>
14151424
</div>
14161425
)}
14171426
</div>

0 commit comments

Comments
 (0)