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 lines424425426427428429430431423 unmodified linesdocument.getElementById('stat-subs').innerText = totalS.toLocaleString();// Show "Add Another" button if limit not reachedconst isPaid = (userPlan === 'premium' || userPlan === 'ultra');const limit = isPaid ? 5 : 2;if (yt.count < limit) {const addBtn = document.createElement('button');addBtn.className = "btn-primary btn-full";423 unmodified lines424425426427428429430423 unmodified linesdocument.getElementById('stat-subs').innerText = totalS.toLocaleString();// Show "Add Another" button if limit not reachedconst 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 lines498499500501502503504505497 unmodified linesconst { 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// 5. Check if this specific channel is already connected to this userconst hasThisChannel = existingChannels?.find(c => c.channel_id === channel.id);497 unmodified lines498499500501502503504505506497 unmodified linesconst { 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 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 userconst hasThisChannel = existingChannels?.find(c => c.channel_id === channel.id);
dashboard/index.html+1-2
server.js+3-2