Fix: Make photo management modal responsive on mobile

This commit is contained in:
gpt-engineer-app[bot]
2025-10-02 13:49:30 +00:00
parent 49955d48e4
commit 60c6fa8be5
2 changed files with 10 additions and 10 deletions

View File

@@ -220,7 +220,7 @@ export function PhotoManagementDialog({
if (editingPhoto) {
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="max-w-2xl">
<DialogContent className="max-w-[95vw] sm:max-w-2xl">
<DialogHeader>
<DialogTitle>Edit Photo</DialogTitle>
<DialogDescription>Update photo details</DialogDescription>
@@ -274,7 +274,7 @@ export function PhotoManagementDialog({
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="max-w-4xl max-h-[80vh] overflow-y-auto">
<DialogContent className="max-w-[95vw] sm:max-w-2xl lg:max-w-4xl max-h-[80vh] overflow-y-auto p-3 sm:p-6">
<DialogHeader>
<DialogTitle>Manage Photos</DialogTitle>
<DialogDescription>
@@ -294,9 +294,9 @@ export function PhotoManagementDialog({
<div className="space-y-4">
{photos.map((photo, index) => (
<Card key={photo.id}>
<CardContent className="p-4">
<div className="flex gap-4">
<div className="w-32 h-32 flex-shrink-0 overflow-hidden rounded-lg">
<CardContent className="p-2 sm:p-4">
<div className="flex gap-2 sm:gap-4">
<div className="w-20 h-20 sm:w-32 sm:h-32 flex-shrink-0 overflow-hidden rounded-lg">
<img
src={photo.cloudflare_image_url}
alt={photo.title || 'Photo'}
@@ -307,23 +307,23 @@ export function PhotoManagementDialog({
<div className="flex-1 space-y-2">
<div className="flex items-start justify-between">
<div>
<h4 className="font-semibold">
<h4 className="font-semibold text-sm sm:text-base">
{photo.title || 'Untitled'}
</h4>
{photo.caption && (
<p className="text-sm text-muted-foreground">
<p className="text-xs sm:text-sm text-muted-foreground">
{photo.caption}
</p>
)}
</div>
{photo.is_featured && (
<span className="text-xs bg-primary text-primary-foreground px-2 py-1 rounded">
<span className="text-[10px] sm:text-xs bg-primary text-primary-foreground px-2 py-1 rounded">
Featured
</span>
)}
</div>
<div className="flex items-center gap-2">
<div className="flex items-center flex-wrap gap-1 sm:gap-2">
<Button
size="sm"
variant="outline"