Spaces:
Paused
Paused
CBV01 commited on
Commit ·
58b4a42
1
Parent(s): 028f096
UI: Refined and compacted MonetizationOverlay modal for better UX
Browse files
frontend/src/components/MonetizationOverlay.tsx
CHANGED
|
@@ -91,28 +91,27 @@ export const MonetizationOverlay: React.FC<MonetizationOverlayProps> = ({ childr
|
|
| 91 |
{children}
|
| 92 |
|
| 93 |
{isLocked && (
|
| 94 |
-
<div className="absolute inset-0 z-50 flex items-center justify-center p-
|
| 95 |
{/* Glass Backdrop */}
|
| 96 |
-
<div className="absolute inset-0 bg-background/
|
| 97 |
|
| 98 |
-
{/*
|
| 99 |
-
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[
|
| 100 |
-
<div className="absolute top-1/4 right-1/4 w-[300px] h-[300px] bg-red-500/5 rounded-full blur-[100px]" />
|
| 101 |
|
| 102 |
-
<div className="relative w-full max-w-
|
| 103 |
<div className="relative">
|
| 104 |
-
<div className="absolute inset-0 bg-indigo-500 blur-
|
| 105 |
-
<div className="relative w-
|
| 106 |
-
<Lock size={
|
| 107 |
</div>
|
| 108 |
</div>
|
| 109 |
|
| 110 |
-
<div className="space-y-
|
| 111 |
-
<h2 className="text-
|
| 112 |
-
|
| 113 |
</h2>
|
| 114 |
-
<p className="text-foreground/
|
| 115 |
-
|
| 116 |
</p>
|
| 117 |
</div>
|
| 118 |
|
|
@@ -121,89 +120,89 @@ export const MonetizationOverlay: React.FC<MonetizationOverlayProps> = ({ childr
|
|
| 121 |
<>
|
| 122 |
{!showProofForm ? (
|
| 123 |
<>
|
| 124 |
-
<div className="bg-white/5 border border-white/5 p-
|
| 125 |
-
<div className="flex items-center justify-between text-
|
| 126 |
-
<span className="text-foreground/
|
| 127 |
-
<span className="text-
|
| 128 |
</div>
|
| 129 |
<button
|
| 130 |
onClick={() => {
|
| 131 |
-
|
|
|
|
| 132 |
setShowProofForm(true);
|
| 133 |
}}
|
| 134 |
-
className="w-full bg-
|
| 135 |
>
|
| 136 |
-
<CreditCard size={
|
| 137 |
</button>
|
| 138 |
-
<p className="text-[10px] text-foreground/30 font-medium">Safe & Secure payment via Paystack. Automated unlock available.</p>
|
| 139 |
</div>
|
| 140 |
|
| 141 |
-
<div className="flex items-center gap-
|
| 142 |
<div className="h-px flex-1 bg-white/5" />
|
| 143 |
-
<span className="text-[
|
| 144 |
<div className="h-px flex-1 bg-white/5" />
|
| 145 |
</div>
|
| 146 |
|
| 147 |
<div className="flex gap-2">
|
| 148 |
<div className="relative flex-1">
|
| 149 |
-
<Ticket className="absolute left-
|
| 150 |
<input
|
| 151 |
type="text"
|
| 152 |
-
placeholder="
|
| 153 |
value={couponCode}
|
| 154 |
onChange={(e) => setCouponCode(e.target.value.toUpperCase())}
|
| 155 |
-
className="w-full bg-white/5 border border-white/10 rounded-
|
| 156 |
/>
|
| 157 |
</div>
|
| 158 |
<button
|
| 159 |
onClick={applyCoupon}
|
| 160 |
disabled={applying || !couponCode}
|
| 161 |
-
className="px-
|
| 162 |
>
|
| 163 |
{applying ? '...' : 'Apply'}
|
| 164 |
</button>
|
| 165 |
</div>
|
| 166 |
</>
|
| 167 |
) : (
|
| 168 |
-
<div className="bg-white/5 border border-white/10 p-
|
| 169 |
-
<div className="flex items-center justify-between">
|
| 170 |
-
<h3 className="font-bold text-
|
| 171 |
-
<button onClick={() => setShowProofForm(false)} className="text-foreground/40 hover:text-foreground"><X size={
|
| 172 |
</div>
|
| 173 |
-
<div className="space-y-
|
| 174 |
<input
|
| 175 |
placeholder="Account Name Used"
|
| 176 |
-
className="w-full bg-black/
|
| 177 |
onChange={(e) => setProof({...proof, name: e.target.value})}
|
| 178 |
/>
|
| 179 |
<input
|
| 180 |
-
placeholder="Bank Name"
|
| 181 |
-
className="w-full bg-black/
|
| 182 |
onChange={(e) => setProof({...proof, bank: e.target.value})}
|
| 183 |
/>
|
| 184 |
</div>
|
| 185 |
<button
|
| 186 |
onClick={submitProof}
|
| 187 |
-
className="w-full bg-
|
| 188 |
>
|
| 189 |
-
|
| 190 |
</button>
|
| 191 |
</div>
|
| 192 |
)}
|
| 193 |
</>
|
| 194 |
) : (
|
| 195 |
-
<div className="bg-emerald-500/5 border border-emerald-500/10 p-
|
| 196 |
-
<div className="w-
|
| 197 |
-
<CheckCircle2 size={
|
| 198 |
</div>
|
| 199 |
-
<p className="font-bold text-
|
| 200 |
-
<p className="text-[
|
| 201 |
</div>
|
| 202 |
)}
|
| 203 |
|
| 204 |
{msg.text && (
|
| 205 |
-
<div className={`flex items-center gap-2 p-3 rounded-xl text-[
|
| 206 |
-
{msg.type === 'error' ? <AlertCircle size={
|
| 207 |
{msg.text}
|
| 208 |
</div>
|
| 209 |
)}
|
|
|
|
| 91 |
{children}
|
| 92 |
|
| 93 |
{isLocked && (
|
| 94 |
+
<div className="absolute inset-0 z-50 flex items-center justify-center p-4 overflow-hidden rounded-[inherit]">
|
| 95 |
{/* Glass Backdrop */}
|
| 96 |
+
<div className="absolute inset-0 bg-background/60 backdrop-blur-xl" />
|
| 97 |
|
| 98 |
+
{/* Subtle Glows */}
|
| 99 |
+
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[400px] h-[400px] bg-indigo-500/10 rounded-full blur-[100px]" />
|
|
|
|
| 100 |
|
| 101 |
+
<div className="relative w-full max-w-[400px] bg-card/80 border border-white/10 p-8 rounded-[40px] shadow-2xl flex flex-col items-center text-center space-y-6 animate-in zoom-in-95 duration-500">
|
| 102 |
<div className="relative">
|
| 103 |
+
<div className="absolute inset-0 bg-indigo-500 blur-xl opacity-20 animate-pulse" />
|
| 104 |
+
<div className="relative w-16 h-16 rounded-3xl bg-gradient-to-br from-indigo-600 to-indigo-400 flex items-center justify-center text-white shadow-xl">
|
| 105 |
+
<Lock size={28} />
|
| 106 |
</div>
|
| 107 |
</div>
|
| 108 |
|
| 109 |
+
<div className="space-y-2">
|
| 110 |
+
<h2 className="text-2xl font-black tracking-tight leading-none text-white">
|
| 111 |
+
Arkitel <span className="text-indigo-400">Premium Vault</span>
|
| 112 |
</h2>
|
| 113 |
+
<p className="text-foreground/40 text-[10px] font-bold uppercase tracking-[0.2em] px-4">
|
| 114 |
+
Exclusive Access Only
|
| 115 |
</p>
|
| 116 |
</div>
|
| 117 |
|
|
|
|
| 120 |
<>
|
| 121 |
{!showProofForm ? (
|
| 122 |
<>
|
| 123 |
+
<div className="bg-white/5 border border-white/5 p-4 rounded-2xl space-y-3">
|
| 124 |
+
<div className="flex items-center justify-between text-xs font-bold">
|
| 125 |
+
<span className="text-foreground/30 uppercase tracking-widest text-[9px]">LIFETIME ACCESS</span>
|
| 126 |
+
<span className="text-lg tabular-nums">#5,000.00</span>
|
| 127 |
</div>
|
| 128 |
<button
|
| 129 |
onClick={() => {
|
| 130 |
+
const url = 'https://paystack.com/pay/arkitel-premium';
|
| 131 |
+
window.open(url, '_blank');
|
| 132 |
setShowProofForm(true);
|
| 133 |
}}
|
| 134 |
+
className="w-full bg-indigo-500 hover:bg-indigo-400 text-white font-bold py-3.5 rounded-xl transition-all flex items-center justify-center gap-2 text-sm shadow-lg shadow-indigo-500/20 active:scale-95"
|
| 135 |
>
|
| 136 |
+
<CreditCard size={16} /> Pay with Paystack
|
| 137 |
</button>
|
|
|
|
| 138 |
</div>
|
| 139 |
|
| 140 |
+
<div className="flex items-center gap-3 px-2">
|
| 141 |
<div className="h-px flex-1 bg-white/5" />
|
| 142 |
+
<span className="text-[9px] font-bold text-foreground/20 uppercase tracking-widest whitespace-nowrap">Redeem Code</span>
|
| 143 |
<div className="h-px flex-1 bg-white/5" />
|
| 144 |
</div>
|
| 145 |
|
| 146 |
<div className="flex gap-2">
|
| 147 |
<div className="relative flex-1">
|
| 148 |
+
<Ticket className="absolute left-3 top-1/2 -translate-y-1/2 text-foreground/30" size={14} />
|
| 149 |
<input
|
| 150 |
type="text"
|
| 151 |
+
placeholder="Voucher..."
|
| 152 |
value={couponCode}
|
| 153 |
onChange={(e) => setCouponCode(e.target.value.toUpperCase())}
|
| 154 |
+
className="w-full bg-white/5 border border-white/10 rounded-xl pl-9 pr-3 py-3 text-xs font-bold focus:ring-1 focus:ring-indigo-500/50 outline-none"
|
| 155 |
/>
|
| 156 |
</div>
|
| 157 |
<button
|
| 158 |
onClick={applyCoupon}
|
| 159 |
disabled={applying || !couponCode}
|
| 160 |
+
className="px-4 rounded-xl bg-white/5 border border-white/5 text-foreground/60 text-xs font-bold hover:bg-indigo-500 hover:text-white transition-all disabled:opacity-30 active:scale-95"
|
| 161 |
>
|
| 162 |
{applying ? '...' : 'Apply'}
|
| 163 |
</button>
|
| 164 |
</div>
|
| 165 |
</>
|
| 166 |
) : (
|
| 167 |
+
<div className="bg-white/5 border border-white/10 p-5 rounded-3xl space-y-4 animate-in slide-in-from-bottom-2 duration-300">
|
| 168 |
+
<div className="flex items-center justify-between px-1">
|
| 169 |
+
<h3 className="font-bold text-xs uppercase tracking-widest text-foreground/40">Proof Submission</h3>
|
| 170 |
+
<button onClick={() => setShowProofForm(false)} className="text-foreground/40 hover:text-foreground"><X size={14} /></button>
|
| 171 |
</div>
|
| 172 |
+
<div className="space-y-2">
|
| 173 |
<input
|
| 174 |
placeholder="Account Name Used"
|
| 175 |
+
className="w-full bg-black/40 border border-white/5 rounded-xl px-4 py-3 text-xs outline-none focus:border-indigo-500/50"
|
| 176 |
onChange={(e) => setProof({...proof, name: e.target.value})}
|
| 177 |
/>
|
| 178 |
<input
|
| 179 |
+
placeholder="Your Bank Name"
|
| 180 |
+
className="w-full bg-black/40 border border-white/5 rounded-xl px-4 py-3 text-xs outline-none focus:border-indigo-500/50"
|
| 181 |
onChange={(e) => setProof({...proof, bank: e.target.value})}
|
| 182 |
/>
|
| 183 |
</div>
|
| 184 |
<button
|
| 185 |
onClick={submitProof}
|
| 186 |
+
className="w-full bg-emerald-500 hover:bg-emerald-400 text-black font-bold py-3 rounded-xl transition-all text-xs shadow-lg shadow-emerald-500/20 active:scale-95"
|
| 187 |
>
|
| 188 |
+
Confirm Deposit
|
| 189 |
</button>
|
| 190 |
</div>
|
| 191 |
)}
|
| 192 |
</>
|
| 193 |
) : (
|
| 194 |
+
<div className="bg-emerald-500/5 border border-emerald-500/10 p-6 rounded-3xl flex flex-col items-center space-y-3">
|
| 195 |
+
<div className="w-10 h-10 rounded-full bg-emerald-500/10 flex items-center justify-center text-emerald-500">
|
| 196 |
+
<CheckCircle2 size={20} />
|
| 197 |
</div>
|
| 198 |
+
<p className="font-bold text-xs text-emerald-400">Verifying Payment</p>
|
| 199 |
+
<p className="text-[9px] text-foreground/30 max-w-[200px] uppercase tracking-widest font-bold">Profile update in progress. Please wait 5-10 minutes for manual verification.</p>
|
| 200 |
</div>
|
| 201 |
)}
|
| 202 |
|
| 203 |
{msg.text && (
|
| 204 |
+
<div className={`flex items-center justify-center gap-2 p-3 rounded-xl text-[10px] font-bold ${msg.type === 'error' ? 'bg-red-500/10 text-red-500' : 'bg-emerald-500/10 text-emerald-400'}`}>
|
| 205 |
+
{msg.type === 'error' ? <AlertCircle size={12} /> : <CheckCircle2 size={12} />}
|
| 206 |
{msg.text}
|
| 207 |
</div>
|
| 208 |
)}
|