From 1e3d320716298918376bab948f6d6b8bab3c0904 Mon Sep 17 00:00:00 2001 From: dwindown Date: Sat, 11 Oct 2025 21:59:13 +0700 Subject: [PATCH] feat: complete redesign of admin plan cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Major UI Overhaul: ✨ Modern card design with gradients ✨ Hover effects: lift up + shadow ✨ Inline layout: grip icon + title + badge ✨ No wasted vertical space ✨ Larger price display (text-4xl) ✨ Gradient price section with border ✨ 2-column stats grid with cards ✨ Animated pulse dot for active status ✨ Full-width visibility button + icon actions ✨ Indonesian text throughout Layout Changes: - Grip icon inline with title (left side) - Badge inline with title text - Trial badge inline with duration - Stats in grid layout - Action buttons with hover fills Design Elements: - rounded-2xl cards - Gradient backgrounds - Border color changes on hover - Smooth transitions (300ms) - Better spacing and typography - Consistent card heights --- .../src/components/admin/pages/AdminPlans.tsx | 221 ++++++++++-------- 1 file changed, 122 insertions(+), 99 deletions(-) diff --git a/apps/web/src/components/admin/pages/AdminPlans.tsx b/apps/web/src/components/admin/pages/AdminPlans.tsx index 666c09d..164cc2a 100644 --- a/apps/web/src/components/admin/pages/AdminPlans.tsx +++ b/apps/web/src/components/admin/pages/AdminPlans.tsx @@ -125,114 +125,137 @@ export function AdminPlans() { {plans.map((plan) => (
- {/* Header */} -
-
-
- -

- {plan.name} -

+ {/* Content */} +
+ {/* Header: Drag Icon + Title/Description + Badge */} +
+ {/* Drag Handle */} +
+
- {plan.badge && ( - - {plan.badge} + + {/* Title & Description */} +
+ {/* Plan Name + Badge */} +
+

+ {plan.name} +

+ {plan.badge && ( + + {plan.badge} + + )} +
+ + {/* Description */} +

+ {plan.description} +

+
+
+ + {/* Price - Hero Section */} +
+
+ + {formatPrice(plan.price, plan.currency)} - )} -
-

- {plan.description} -

-
- - {/* Price */} -
-
- {formatPrice(plan.price, plan.currency)} -
-
- {plan.durationType === 'lifetime' - ? 'Lifetime access' - : plan.durationType === 'monthly' - ? 'per month' - : plan.durationType === 'yearly' - ? 'per year' - : plan.durationType} -
- {plan.trialDays > 0 && ( -
- {plan.trialDays} days free trial
- )} -
- - {/* Stats */} -
-
- - Subscriptions: - - - {plan._count.subscriptions} - -
-
- Status: -
- {plan.isActive && ( - - Active +
+

+ {plan.durationType === 'lifetime' + ? 'Akses Selamanya' + : plan.durationType === 'monthly' + ? 'per bulan' + : plan.durationType === 'yearly' + ? 'per tahun' + : plan.durationType} +

+ {plan.trialDays > 0 && ( + + 🎁 {plan.trialDays} hari gratis )} - {plan.isVisible ? ( - - ) : ( - - )}
-
- {/* Actions */} -
- - - + {/* Stats Grid */} +
+
+
Subscribers
+
+ {plan._count.subscriptions} +
+
+
+
Status
+
+ {plan.isActive ? ( + <> +
+ Active + + ) : ( + <> +
+ Inactive + + )} +
+
+
+ + {/* Action Buttons */} +
+ + + +
))}