Skip to content

Commit b26c535

Browse files
committed
feat(ui/admin): overhaul clientele tracking, implement responsive catalog sizing
- Refactored /admin/users/page.tsx to isolate strictly paid customers, mapping guest checkout metrics seamlessly while filtering pending carts. Implemented split mobile-card grid. - Refactored images globally to use object-contain and object-center (rather than object-cover) to preserve absolute bounding box precision on random-sized media uploads without clipping.
1 parent e741c02 commit b26c535

File tree

13 files changed

+352
-214
lines changed

13 files changed

+352
-214
lines changed

app/admin/media/MediaLibraryClient.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ export default function MediaLibraryClient({ initialFiles, bucketBase, contentBl
483483
src={file.url}
484484
alt={file.name}
485485
fill
486-
className="object-cover transition-transform duration-300 group-hover:scale-105"
486+
className="object-contain object-center transition-transform duration-300 group-hover:scale-105"
487487
sizes="(max-width: 640px) 50vw, (max-width: 1024px) 25vw, 16vw"
488488
unoptimized
489489
/>
@@ -562,7 +562,7 @@ export default function MediaLibraryClient({ initialFiles, bucketBase, contentBl
562562
<td className="p-4">
563563
<div className="flex items-center gap-3">
564564
<div className="w-10 h-10 rounded overflow-hidden bg-[#121214] flex-shrink-0">
565-
<Image src={file.url} alt={file.name} width={40} height={40} className="object-cover w-full h-full" unoptimized />
565+
<Image src={file.url} alt={file.name} width={40} height={40} className="object-contain object-center w-full h-full" unoptimized />
566566
</div>
567567
<div>
568568
<p className="text-xs text-white font-medium truncate max-w-[200px]">{file.name}</p>

app/admin/orders/OrderList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function OrderDetailModal({ order, onClose, onStatusUpdate, onFulfill }: {
122122
<img
123123
src={item.product_variants.products.images[0]}
124124
alt={productName}
125-
className="w-full h-full object-cover"
125+
className="w-full h-full object-contain object-center"
126126
/>
127127
) : (
128128
<div className="w-full h-full flex items-center justify-center text-white/10">

app/admin/products/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default async function AdminProductsPage() {
125125
<div className="flex items-start gap-4">
126126
<div className="w-16 h-16 bg-black/40 border border-white/10 rounded overflow-hidden shadow-soft flex-shrink-0">
127127
{product.images?.[0] ? (
128-
<img src={product.images[0]} alt={product.title} className="w-full h-full object-cover opacity-80" />
128+
<img src={product.images[0]} alt={product.title} className="w-full h-full object-contain object-center opacity-80" />
129129
) : (
130130
<div className="w-full h-full flex items-center justify-center text-white/10 bg-[#0B0B0D]/5">
131131
<Package size={20} />
@@ -213,7 +213,7 @@ export default async function AdminProductsPage() {
213213
<div className="flex items-center gap-4">
214214
<div className="w-12 h-12 bg-black/40 border border-white/10 rounded overflow-hidden shadow-soft flex-shrink-0 group-hover:border-gold/30 transition-colors">
215215
{product.images?.[0] ? (
216-
<img src={product.images[0]} alt={product.title} className="w-full h-full object-cover opacity-80 group-hover:opacity-100 transition-opacity" />
216+
<img src={product.images[0]} alt={product.title} className="w-full h-full object-contain object-center opacity-80 group-hover:opacity-100 transition-opacity" />
217217
) : (
218218
<div className="w-full h-full flex items-center justify-center text-white/10 bg-[#0B0B0D]/5">
219219
<Package size={16} />

0 commit comments

Comments
 (0)