Spaces:
Sleeping
Sleeping
Nathan commited on
Commit ·
129ae24
1
Parent(s): fbda58b
Upgrade: God Mode (Ultra) now has 999 channel limit
Browse filesFiles changed (2)
- dashboard/index.html+1-2
- server.js+3-2
423 unmodified lines424425426427428427428429430423 unmodified lines document.getElementById('stat-subs').innerText = totalS.toLocaleString();
// Show "Add Another" button if limit not reached const isPaid = (userPlan === 'premium' || userPlan === 'ultra'); const limit = isPaid ? 5 : 2; const limit = (userPlan === 'ultra') ? 999 : (userPlan === 'premium' ? 5 : 2); if (yt.count < limit) { const addBtn = document.createElement('button'); addBtn.className = "btn-primary btn-full";497 unmodified lines498499500501502501502503504505506497 unmodified lines const { data: user } = await db.from('users').select('plan, role').eq('id', userId).single(); const { data: existingChannels, count: currentChannels } = await db.from('channels').select('*', { count: 'exact' }).eq('user_id', userId); const isPaid = user?.plan === 'premium' || user?.plan === 'ultra' || user?.role === 'admin'; const limit = isPaid ? 5 : 2; // Increased Free limit to 2, Paid to 5 const isAdmin = user?.role === 'admin' || user?.plan === 'ultra'; const isPremium = user?.plan === 'premium'; const limit = isAdmin ? 999 : (isPremium ? 5 : 2);
// 5. Check if this specific channel is already connected to this user const hasThisChannel = existingChannels?.find(c => c.channel_id === channel.id);dashboard/index.html+1-2
server.js+3-2