From b7c7decfd0f2818b65861699336d6221ba0e0ae2 Mon Sep 17 00:00:00 2001 From: Fringg Date: Sat, 7 Mar 2026 04:56:12 +0300 Subject: [PATCH] fix: adapt admin landings list for mobile layout - Badges (active/inactive, gift) now wrap on narrow screens - Action buttons move to a separate row on mobile (hidden/shown via sm:) - Delete button pushed to the right on mobile for safety - Reduced padding and gaps on small screens - Desktop layout unchanged --- src/pages/AdminLandings.tsx | 223 +++++++++++++++++++++++------------- 1 file changed, 141 insertions(+), 82 deletions(-) diff --git a/src/pages/AdminLandings.tsx b/src/pages/AdminLandings.tsx index dcc0746..24211c8 100644 --- a/src/pages/AdminLandings.tsx +++ b/src/pages/AdminLandings.tsx @@ -115,7 +115,7 @@ function SortableLandingCard({ ref={setNodeRef} style={style} className={cn( - 'rounded-xl border bg-dark-800 p-4 transition-colors', + 'rounded-xl border bg-dark-800 p-3 transition-colors sm:p-4', isDragging ? 'border-accent-500/50 shadow-xl shadow-accent-500/20' : landing.is_active @@ -123,100 +123,159 @@ function SortableLandingCard({ : 'border-dark-700/50 opacity-60', )} > -
+
{/* Drag handle */} - {/* Content */} + {/* Content + Actions wrapper */}
-
-

- {resolveLocaleDisplay(landing.title)} -

- - {landing.slug} - - {landing.is_active ? ( - - {t('admin.landings.active')} - - ) : ( - - {t('admin.landings.inactive')} - - )} - {landing.gift_enabled && ( - - - - )} + {/* Top row: title/slug + actions (desktop) */} +
+
+
+

+ {resolveLocaleDisplay(landing.title)} +

+ + {landing.slug} + + {landing.is_active ? ( + + {t('admin.landings.active')} + + ) : ( + + {t('admin.landings.inactive')} + + )} + {landing.gift_enabled && ( + + + + )} +
+
+ + {landing.purchase_stats.total} {t('admin.landings.purchases')} + +
+
+ + {/* Actions: hidden on mobile, shown on desktop */} +
+ + + + +
-
- - {landing.purchase_stats.total} {t('admin.landings.purchases')} - + + {/* Actions: shown on mobile only */} +
+ + + +
+
- - {/* Actions */} -
- - - - - - - -
);