Spaces:
Sleeping
Sleeping
Nathan commited on
Commit ·
7a3b8d2
1
Parent(s): 7e6933d
UI: Live Real-Time Stats Summing across multi-channel accounts
Browse files284 unmodified lines2852862872882892902912922932942952962972982993003011 unmodified line303304305306307308309310311312313284 unmodified lines const connectBtn = document.getElementById('connect-btn'); list.innerHTML = ''; let totalViews = 0; let totalSubs = 0;
const channelsToShow = yt.channels || []; if (channelsToShow.length > 0) { channelsToShow.forEach(c => { const isLive = c.connected || c.channel_id; if (isLive) { totalViews += (c.totalViews || 0); totalSubs += (c.subscribers || 0); } list.innerHTML += ` <div style="background:rgba(16, 185, 129, 0.05); color:${isLive ? 'var(--success)' : 'var(--text-dim)'}; padding:15px; border-radius:18px; border:1px solid ${isLive ? 'rgba(16, 185, 129, 0.2)' : 'var(--glass-border)'}; font-weight:800; margin-bottom:10px; font-size:0.85rem; display:flex; align-items:center; gap:10px;"> <i data-lucide="${isLive ? 'check-circle' : 'alert-circle'}" style="width:16px;"></i> 1 unmodified line ${isLive ? '' : '<span style="font-size:0.6rem; background:rgba(255,255,255,0.1); padding:2px 6px; border-radius:5px; margin-left:auto;">LINKED</span>'} </div>`; });
// Update Top Stats with Live Summed Data document.getElementById('stat-views').innerText = totalViews.toLocaleString(); document.getElementById('stat-subs').innerText = totalSubs.toLocaleString();
if (channelsToShow.length >= (userPlan === 'ultra' ? 999 : 1)) { connectBtn.innerHTML = `Slot Occupied`; connectBtn.disabled = true; dashboard/index.html+12