Spaces:
Sleeping
Sleeping
Nathan commited on
Commit ·
c4dff8a
1
Parent(s): 59ea1b6
Dashboard: Added Setup Tutorial video and removed latest video banner
Browse filesFiles changed (2)
- dashboard/index.html+23-32
- server.js+1
2 unmodified lines345667894 unmodified lines1415161717181927 unmodified lines474849515051525317 unmodified lines71727375767478757677788279808182838485868788868990913 unmodified lines9596979697989910010110214 unmodified lines1171181191181191201201211211221231241261271281291301311321251261273 unmodified lines1311321331341351361371381391401411426 unmodified lines14915015115415215315415537 unmodified lines19319419519819920019619719819924 unmodified lines22422522622722822923323423523623723823023123215 unmodified lines2482492502602512522532542 unmodified lines<head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <title>ViralFlow AI — Live Dashboard</title> <title>ViralFlow AI — Dashboard</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800;900&family=Plus+Jakarta+Sans:wght@300;400;600;700&display=swap" rel="stylesheet">4 unmodified lines --bg: #020617; --surface: rgba(15, 23, 42, 0.4); --accent: #6366f1; --accent-glow: rgba(99, 102, 241, 0.4); --success: #10b981; --danger: #ef4444; --text: #f8fafc;27 unmodified lines .logo-text { font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 900; color: #fff; letter-spacing: -1.5px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 25px; } .stat-card { padding: 25px; position: relative; overflow: hidden; } .stat-card { padding: 25px; position: relative; } .stat-label { font-size: 0.75rem; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; } .stat-value { font-size: 2.2rem; font-weight: 900; font-family: 'Outfit', sans-serif; margin-top: 5px; }
17 unmodified lines padding: 18px; border-radius: 18px; color: #fff; font-size: 1rem; outline: none; }
#latest-video-panel { border: 1px solid var(--success); margin-bottom: 20px; padding: 25px; display: none; }
.log-container { background: rgba(0,0,0,0.5); border-radius: 28px; padding: 25px; height: 500px; overflow-y: auto; background: rgba(0,0,0,0.5); border-radius: 28px; padding: 25px; height: 600px; overflow-y: auto; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; border: 1px solid var(--glass-border); } .log-item { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.03); display: flex; gap: 15px; } .log-time { color: var(--accent); font-weight: 800; font-size: 0.8rem; } .log-time { color: var(--accent); font-weight: 800; }
.tutorial-video { width: 100%; border-radius: 20px; border: 1px solid var(--accent); background: #000; margin-bottom: 20px; overflow: hidden; box-shadow: 0 0 30px var(--accent-glow); }
.auth-overlay { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 2000; } .auth-card { padding: 50px; width: 450px; text-align: center; } .tag { background: rgba(99, 102, 241, 0.2); color: var(--accent-light); padding: 6px 14px; border-radius: 15px; font-size: 0.75rem; font-weight: 900; border: 1px solid var(--accent); } </style></head>3 unmodified lines <div class="auth-card glass-panel"> <div id="login-form"> <h1 style="font-family: 'Outfit', sans-serif; font-size: 2.2rem; margin-bottom: 30px;">ViralFlow AI</h1> <div class="input-group"><label>Email</label><input type="email" id="login-email" placeholder="agent@viralflow.ai"></div> <div class="input-group"><label>Password</label><input type="password" id="login-pass" placeholder="••••••••"></div> <div class="input-group"><label>Email</label><input type="email" id="login-email"></div> <div class="input-group"><label>Password</label><input type="password" id="login-pass"></div> <button class="btn-primary btn-full" onclick="login()">Enter Dashboard</button> <p onclick="toggleAuth()" style="cursor:pointer; margin-top:25px; color:var(--text-dim);">Need Access? <span style="color:var(--accent)">Register</span></p> </div>14 unmodified lines <div class="tag" id="user-plan" style="margin-left: 15px;">🛡️ FREE</div> </div> <div style="display:flex; gap:20px; align-items:center;"> <div style="text-align: right;"> <div id="user-email" style="font-weight: 800; font-size: 0.9rem;"></div> <div id="user-email" style="font-weight: 800; font-size: 0.9rem;"></div> <div style="font-size: 0.7rem; color: var(--success); font-weight: 800;">System Active</div> </div> <button class="btn-primary" style="background: rgba(239, 68, 68, 0.1); color: var(--danger);" onclick="logout()">Logout</button> </div> </header>
<div id="latest-video-panel" class="glass-panel"> <div style="display:flex; align-items:center; justify-content:space-between; flex-wrap: wrap; gap: 20px;"> <div style="font-weight:900; font-size:1.1rem;" id="latest-video-title">Latest Video Ready! 🎬</div> <a id="latest-video-link" href="#" target="_blank" class="btn-primary" style="background:var(--success);">Watch Now</a> </div> </div>
<div class="stats-grid"> <div class="stat-card glass-panel"><div class="stat-label">Videos</div><div class="stat-value" id="stat-generated">0</div></div> <div class="stat-card glass-panel"><div class="stat-label">System</div><div class="stat-value" style="color:var(--success);">LIVE</div></div>3 unmodified lines <div class="main-grid"> <div class="left-col"> <div class="panel glass-panel"> <h3 class="panel-title"><i data-lucide="help-circle"></i> Setup Tutorial</h3> <video class="tutorial-video" controls> <source src="/video/Screen Recording 2026-05-05 224144.mp4" type="video/mp4"> Your browser does not support the video tag. </video>
<h3 class="panel-title">Automation Vault</h3> <div style="display:flex; gap:15px; margin-bottom:30px;"> <button class="btn-primary" style="flex:1;" onclick="saveSettings(this)">Save</button>6 unmodified lines <div style="display:flex; gap:10px;"><input type="time" id="new-time" style="flex:1;"><button class="btn-primary" onclick="addTimeSlot()">+</button></div> </div> <div style="padding:20px; background:rgba(0,0,0,0.2); border-radius:20px; margin-bottom:20px;"> <label>Google Keys</label> <label>Google API Credentials</label> <input type="text" id="setting-client-id" placeholder="Client ID" style="margin-bottom:10px;"> <input type="password" id="setting-client-secret" placeholder="Secret"> </div>37 unmodified lines authToken = d.token; document.documentElement.classList.add('is-authed'); await checkAuth(); } else { alert("Login Error: " + (d.error || "Invalid Credentials")); } } else { alert("Login Error: " + (d.error || "Invalid Credentials")); } } catch(e) { alert("Network Error"); } }
24 unmodified lines <div class="log-item"> <span class="log-time">${new Date(l.time).toLocaleTimeString()}</span> <span>${l.msg}</span> ${l.metadata?.url ? `<a href="${l.metadata.url}" target="_blank" style="margin-left:auto; color:var(--success); font-weight:800;">WATCH ↗</a>` : ''} </div> `).join(''); const lastVid = logs.find(l => l.type === 'VIDEO_PUBLISHED'); if (lastVid) { document.getElementById('latest-video-panel').style.display = 'block'; document.getElementById('latest-video-title').innerText = lastVid.msg; document.getElementById('latest-video-link').href = lastVid.metadata?.url || '#'; } } catch (e) { console.error(e); } }
15 unmodified lines list.innerHTML = ''; if (yt.connected && yt.channels) { yt.channels.forEach(c => { list.innerHTML += `<div style="background:rgba(16, 185, 129, 0.1); color:var(--success); padding:15px; border-radius:15px; border:1px solid var(--success); font-weight:800; margin-bottom:10px;">✅ ${c.channel_name}</div>`; }); if (yt.channels.length >= (userPlan === 'ultra' ? 999 : 1)) { connectBtn.innerHTML = `Slot Full`; connectBtn.disabled = true; connectBtn.style.opacity = '0.5'; } if (yt.channels.length >= (userPlan === 'ultra' ? 999 : 1)) { connectBtn.innerHTML = `Channel Connected`; connectBtn.disabled = true; connectBtn.style.opacity = '0.5'; } } } catch(e) { console.error(e); } }27 unmodified lines2829303132333427 unmodified lines
app.use(express.json());app.use(express.static(path.join(__dirname, 'dashboard')));app.use('/video', express.static(path.join(__dirname, 'video')));
// JWT Middleware// Admin Authentication Middlewaredashboard/index.html+23-32
server.js+1