278 行
17 KiB
HTML
278 行
17 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
|
<title>BizGaze Connect — Home</title>
|
||
|
|
<style>
|
||
|
|
:root{ --brand:#FFC708; --brand-d:#E0AC00; --blue:#1F3B73; --blue-d:#16294f; --blue-soft:#EAF0FB; --ink:#1f2430; --muted:#6b7280; --bg:#f6f8fb; --card:#fff; --line:#e6e9ef; --green:#16a34a; --red:#b91c1c; }
|
||
|
|
*{box-sizing:border-box;}
|
||
|
|
html,body{height:100%;}
|
||
|
|
body{font-family:'Segoe UI',system-ui,sans-serif;background:var(--bg);color:var(--ink);margin:0;display:flex;flex-direction:column;height:100vh;overflow:hidden;}
|
||
|
|
|
||
|
|
/* ---- Top bar (matches console.html) ---- */
|
||
|
|
header{background:var(--blue);padding:.75rem 1.5rem;display:flex;justify-content:space-between;align-items:center;flex:0 0 auto;}
|
||
|
|
.brandrow{display:flex;align-items:center;gap:.6rem;cursor:pointer;}
|
||
|
|
.logo{width:30px;height:30px;border-radius:8px;background:var(--brand);display:grid;place-items:center;font-weight:800;color:var(--blue);}
|
||
|
|
.brand{font-weight:700;color:#fff;font-size:1.05rem;} .brand span.y{color:var(--brand);font-weight:700;}
|
||
|
|
.brand span.tag{color:#8ea3cf;font-weight:500;font-size:.85rem;}
|
||
|
|
|
||
|
|
/* ---- Profile dropdown (from console.html) ---- */
|
||
|
|
.profile{position:relative}
|
||
|
|
.profile .pbtn{display:flex;align-items:center;gap:.5rem;background:rgba(255,255,255,.14);color:#fff;border:1px solid #46598c;border-radius:10px;padding:.4rem .85rem .4rem .5rem;font-weight:600;font-size:.88rem;cursor:pointer}
|
||
|
|
.profile .pbtn:hover{background:rgba(255,255,255,.24)}
|
||
|
|
.profile .pbtn .pav{width:28px;height:28px;border-radius:50%;background:var(--brand);color:var(--blue);display:grid;place-items:center;font-weight:800;font-size:.78rem}
|
||
|
|
.profile .pmenu{position:absolute;right:0;top:calc(100% + 6px);background:#fff;border:1px solid #e6e9ef;border-radius:10px;box-shadow:0 10px 28px rgba(0,0,0,.18);min-width:210px;overflow:hidden;z-index:5000;display:none}
|
||
|
|
.profile .pmenu.open{display:block}
|
||
|
|
.profile .pmenu .phead{padding:.7rem .9rem;border-bottom:1px solid #eef1f6}
|
||
|
|
.profile .pmenu .phead .n{font-weight:700;font-size:.9rem}
|
||
|
|
.profile .pmenu .phead .e{color:var(--muted);font-size:.78rem}
|
||
|
|
.profile .pmenu a{display:block;padding:.6rem .9rem;color:#1f2430;text-decoration:none;font-size:.9rem;cursor:pointer}
|
||
|
|
.profile .pmenu a:hover{background:#f1f5f9}
|
||
|
|
.profile .pmenu a.danger{color:#b91c1c;border-top:1px solid #eef1f6}
|
||
|
|
|
||
|
|
/* ---- Shell ---- */
|
||
|
|
.shell{flex:1 1 auto;display:flex;min-height:0;}
|
||
|
|
|
||
|
|
/* ---- Sidebar ---- */
|
||
|
|
.sidebar{width:320px;flex:0 0 320px;background:var(--card);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;}
|
||
|
|
.side-head{padding:1rem 1rem .75rem;border-bottom:1px solid var(--line);}
|
||
|
|
.side-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:.7rem;}
|
||
|
|
.side-title h2{font-size:.95rem;margin:0;color:var(--blue);}
|
||
|
|
.newchat{width:30px;height:30px;border-radius:9px;border:none;background:var(--blue-soft);color:var(--blue);font-size:1.2rem;line-height:1;cursor:pointer;font-weight:700;display:grid;place-items:center;padding:0;}
|
||
|
|
.newchat:hover{background:#dbe6fb;}
|
||
|
|
.search{position:relative;}
|
||
|
|
.search svg{position:absolute;left:.65rem;top:50%;transform:translateY(-50%);color:var(--muted);}
|
||
|
|
.search input{width:100%;padding:.55rem .7rem .55rem 2.1rem;border-radius:10px;border:2px solid var(--line);background:#fbfcfe;color:var(--ink);font-size:.9rem;}
|
||
|
|
.search input:focus{outline:none;border-color:var(--brand);}
|
||
|
|
|
||
|
|
.chatlist{overflow-y:auto;flex:1 1 auto;padding:.4rem;}
|
||
|
|
.chat-row{display:flex;gap:.7rem;align-items:center;padding:.6rem .65rem;border-radius:12px;cursor:pointer;position:relative;}
|
||
|
|
.chat-row:hover{background:#f3f6fb;}
|
||
|
|
.chat-row.active{background:var(--blue-soft);}
|
||
|
|
.chat-row.active::before{content:"";position:absolute;left:0;top:.7rem;bottom:.7rem;width:3px;border-radius:3px;background:var(--blue);}
|
||
|
|
.avatar{width:42px;height:42px;flex:0 0 42px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700;font-size:.92rem;position:relative;}
|
||
|
|
.avatar .dot{position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;border:2px solid #fff;background:#cbd2dd;}
|
||
|
|
.avatar .dot.on{background:var(--green);}
|
||
|
|
.chat-main{flex:1 1 auto;min-width:0;}
|
||
|
|
.chat-top{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem;}
|
||
|
|
.chat-name{font-weight:600;font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
||
|
|
.chat-time{color:var(--muted);font-size:.72rem;flex:0 0 auto;}
|
||
|
|
.chat-bottom{display:flex;justify-content:space-between;align-items:center;gap:.5rem;margin-top:.15rem;}
|
||
|
|
.chat-prev{color:var(--muted);font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;}
|
||
|
|
.chat-row.unread .chat-prev{color:var(--ink);font-weight:500;}
|
||
|
|
.chat-row.unread .chat-name{font-weight:700;}
|
||
|
|
.badge{flex:0 0 auto;background:var(--blue);color:#fff;font-size:.7rem;font-weight:700;min-width:19px;height:19px;border-radius:99px;padding:0 .35rem;display:grid;place-items:center;}
|
||
|
|
.no-results{padding:2rem 1rem;text-align:center;color:var(--muted);font-size:.85rem;}
|
||
|
|
|
||
|
|
/* ---- Main content ---- */
|
||
|
|
.content{flex:1 1 auto;display:flex;flex-direction:column;min-width:0;min-height:0;}
|
||
|
|
.tabs{display:flex;gap:.4rem;padding:1rem 1.5rem 0;border-bottom:1px solid var(--line);background:var(--card);}
|
||
|
|
.tabs button{background:transparent;color:var(--muted);font-weight:600;font-size:.92rem;border:none;border-bottom:3px solid transparent;padding:.6rem .9rem .8rem;cursor:pointer;display:flex;align-items:center;gap:.45rem;border-radius:8px 8px 0 0;}
|
||
|
|
.tabs button:hover{color:var(--blue);background:#f6f8fb;}
|
||
|
|
.tabs button.active{color:var(--blue);border-bottom-color:var(--brand);}
|
||
|
|
.panel-wrap{flex:1 1 auto;overflow-y:auto;padding:2rem 1.5rem;display:flex;}
|
||
|
|
.panel{display:none;margin:auto;width:100%;max-width:560px;}
|
||
|
|
.panel.active{display:block;}
|
||
|
|
|
||
|
|
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:2.2rem;box-shadow:0 6px 18px rgba(20,30,60,.05);text-align:center;}
|
||
|
|
.feat-icon{width:72px;height:72px;border-radius:20px;display:grid;place-items:center;margin:0 auto 1.2rem;}
|
||
|
|
.feat-icon.blue{background:var(--blue-soft);color:var(--blue);}
|
||
|
|
.feat-icon.yellow{background:#fff6d8;color:var(--brand-d);}
|
||
|
|
.card h1{font-size:1.45rem;margin:0 0 .5rem;color:var(--blue);}
|
||
|
|
.card p{color:var(--muted);font-size:.95rem;line-height:1.55;margin:0 auto 1.6rem;max-width:400px;}
|
||
|
|
.btn{display:inline-flex;align-items:center;gap:.5rem;text-decoration:none;padding:.8rem 1.6rem;background:var(--brand);color:var(--ink);border:none;border-radius:11px;font-weight:700;font-size:.95rem;cursor:pointer;}
|
||
|
|
.btn:hover{background:var(--brand-d);}
|
||
|
|
.pill-soon{display:inline-block;background:#fff6d8;color:var(--brand-d);font-size:.74rem;font-weight:700;padding:.25rem .7rem;border-radius:99px;letter-spacing:.03em;margin-bottom:1.2rem;}
|
||
|
|
.hint{margin-top:1.4rem;font-size:.8rem;color:var(--muted);}
|
||
|
|
|
||
|
|
@media (max-width:760px){
|
||
|
|
.sidebar{width:108px;flex:0 0 108px;}
|
||
|
|
.side-title h2,.search,.chat-main{display:none;}
|
||
|
|
.chat-row{justify-content:center;}
|
||
|
|
.side-head{padding:.8rem .5rem;}
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<header>
|
||
|
|
<div class="brandrow" id="brandrow">
|
||
|
|
<img src="/logo.png" alt="" style="height:46px;width:auto;max-width:190px;border-radius:8px;object-fit:contain;background:#fff;padding:5px 12px;image-rendering:-webkit-optimize-contrast" onerror="this.replaceWith(Object.assign(document.createElement('div'),{className:'logo',textContent:'B'}))">
|
||
|
|
<div class="brand">BizGaze <span class="y">Connect</span> <span class="tag">· Home</span></div>
|
||
|
|
</div>
|
||
|
|
<div id="hdrRight"></div>
|
||
|
|
</header>
|
||
|
|
|
||
|
|
<div class="shell">
|
||
|
|
<!-- ---------- Sidebar ---------- -->
|
||
|
|
<aside class="sidebar">
|
||
|
|
<div class="side-head">
|
||
|
|
<div class="side-title">
|
||
|
|
<h2>Chats</h2>
|
||
|
|
<button class="newchat" title="New chat" aria-label="New chat">+</button>
|
||
|
|
</div>
|
||
|
|
<div class="search">
|
||
|
|
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
||
|
|
<input id="chatSearch" placeholder="Search chats" autocomplete="off">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="chatlist" id="chatlist"></div>
|
||
|
|
</aside>
|
||
|
|
|
||
|
|
<!-- ---------- Main ---------- -->
|
||
|
|
<section class="content">
|
||
|
|
<div class="tabs">
|
||
|
|
<button data-tab="meeting" class="active">
|
||
|
|
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>
|
||
|
|
Meeting
|
||
|
|
</button>
|
||
|
|
<button data-tab="share">
|
||
|
|
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>
|
||
|
|
Share Screen
|
||
|
|
</button>
|
||
|
|
<button data-tab="connect">
|
||
|
|
<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.55a11 11 0 0 1 14.08 0"/><path d="M1.42 9a16 16 0 0 1 21.16 0"/><path d="M8.53 16.11a6 6 0 0 1 6.95 0"/><line x1="12" y1="20" x2="12.01" y2="20"/></svg>
|
||
|
|
Connect Screen
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="panel-wrap">
|
||
|
|
<!-- Meeting -->
|
||
|
|
<div class="panel active" data-panel="meeting">
|
||
|
|
<div class="card">
|
||
|
|
<div class="feat-icon yellow">
|
||
|
|
<svg viewBox="0 0 24 24" width="34" height="34" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>
|
||
|
|
</div>
|
||
|
|
<span class="pill-soon">COMING SOON</span>
|
||
|
|
<h1>Meetings are on the way</h1>
|
||
|
|
<p>Soon you'll be able to host multi-party video meetings with your BizGaze team and customers — right here, no install needed. We're putting on the finishing touches.</p>
|
||
|
|
<button class="btn" id="notifyBtn">🔔 Notify me when it's ready</button>
|
||
|
|
<div class="hint">In the meantime, use <b>Share Screen</b> or <b>Connect Screen</b> to start a session.</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Share Screen -->
|
||
|
|
<div class="panel" data-panel="share">
|
||
|
|
<div class="card">
|
||
|
|
<div class="feat-icon blue">
|
||
|
|
<svg viewBox="0 0 24 24" width="34" height="34" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>
|
||
|
|
</div>
|
||
|
|
<h1>Share your screen</h1>
|
||
|
|
<p>Let a teammate or customer see your screen instantly. You'll get a 6-digit code to share — they enter it to connect. No download, works right in the browser.</p>
|
||
|
|
<a class="btn" href="/share">Start sharing →</a>
|
||
|
|
<div class="hint">Desktop browsers only — phones can't share their screen yet.</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Connect Screen -->
|
||
|
|
<div class="panel" data-panel="connect">
|
||
|
|
<div class="card">
|
||
|
|
<div class="feat-icon blue">
|
||
|
|
<svg viewBox="0 0 24 24" width="34" height="34" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.55a11 11 0 0 1 14.08 0"/><path d="M1.42 9a16 16 0 0 1 21.16 0"/><path d="M8.53 16.11a6 6 0 0 1 6.95 0"/><line x1="12" y1="20" x2="12.01" y2="20"/></svg>
|
||
|
|
</div>
|
||
|
|
<h1>Connect to a screen</h1>
|
||
|
|
<p>Helping someone out? Enter the 6-digit code they give you to view their screen and provide live support — with two-way voice and chat built in.</p>
|
||
|
|
<a class="btn" href="/connect">Open connect page →</a>
|
||
|
|
<div class="hint">The other person taps <b>Allow</b> before you can see anything.</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
// ---------- Helpers (reused patterns from console.html) ----------
|
||
|
|
function pEsc(s){return String(s==null?'':s).replace(/[&<>"]/g,c=>({'&':'&','<':'<','>':'>','"':'"'}[c]));}
|
||
|
|
function initials(name){return name.trim().split(/\s+/).slice(0,2).map(w=>w[0]).join('').toUpperCase();}
|
||
|
|
|
||
|
|
// Stable avatar color from a name
|
||
|
|
const AV_COLORS=['#1F3B73','#2563eb','#0e7490','#7c3aed','#be185d','#b45309','#15803d','#9d174d'];
|
||
|
|
function avColor(name){let h=0;for(const c of name)h=(h*31+c.charCodeAt(0))>>>0;return AV_COLORS[h%AV_COLORS.length];}
|
||
|
|
|
||
|
|
// Profile dropdown (mirrors profileHTML()/wireProfile() from console.html)
|
||
|
|
const SAMPLE_USER={name:'Sravan Mareddy',email:'sravanm@bizgaze.com',role:'admin'};
|
||
|
|
function profileHTML(u){
|
||
|
|
return '<div class="profile"><button class="pbtn" id="pbtn">'
|
||
|
|
+ '<span class="pav">'+pEsc(initials(u.name))+'</span>'
|
||
|
|
+ pEsc(u.name)+' <span style="font-size:.65rem">▾</span></button>'
|
||
|
|
+ '<div class="pmenu" id="pmenu">'
|
||
|
|
+ '<div class="phead"><div class="n">'+pEsc(u.name)+'</div><div class="e">'+pEsc(u.email)+' · '+pEsc(u.role)+'</div></div>'
|
||
|
|
+ '<a href="/console">Console / Dashboard</a>'
|
||
|
|
+ '<a href="#">Settings</a>'
|
||
|
|
+ '<a class="danger" id="plogout">Logout</a>'
|
||
|
|
+ '</div></div>';
|
||
|
|
}
|
||
|
|
function wireProfile(){
|
||
|
|
const btn=document.getElementById('pbtn'),menu=document.getElementById('pmenu');
|
||
|
|
if(!btn)return;
|
||
|
|
btn.onclick=(e)=>{e.stopPropagation();menu.classList.toggle('open');};
|
||
|
|
document.addEventListener('click',()=>menu.classList.remove('open'));
|
||
|
|
const lo=document.getElementById('plogout');
|
||
|
|
if(lo)lo.onclick=(e)=>{e.preventDefault();alert('Mockup — logout would sign you out and return to /.');};
|
||
|
|
}
|
||
|
|
document.getElementById('hdrRight').innerHTML=profileHTML(SAMPLE_USER);
|
||
|
|
wireProfile();
|
||
|
|
document.getElementById('brandrow').onclick=()=>{location.href='/';};
|
||
|
|
|
||
|
|
// ---------- Mock chat data ----------
|
||
|
|
const CHATS=[
|
||
|
|
{name:'Anwi Systems', msg:"Perfect, the screen share worked great. Thanks!", time:'9:42 AM', unread:0, online:true, active:true},
|
||
|
|
{name:'Priya Sharma', msg:"Can you connect to my screen at 3pm?", time:'9:15 AM', unread:2, online:true},
|
||
|
|
{name:'GAPL Group', msg:"You: I've shared the 6-digit code with you", time:'Yesterday', unread:0, online:false},
|
||
|
|
{name:'Battery Doctors', msg:"The invoice module is throwing an error again", time:'Yesterday', unread:5, online:true},
|
||
|
|
{name:'Ramesh Marketing', msg:"You: Let me know once you're at your desk", time:'Mon', unread:0, online:false},
|
||
|
|
{name:'STC Support', msg:"Typing…", time:'Mon', unread:1, online:true},
|
||
|
|
{name:'Samruddhi Traders',msg:"Thanks for the help earlier 👍", time:'Sun', unread:0, online:false},
|
||
|
|
{name:'DMS 3.0 Team', msg:"You: Closing the ticket, all resolved", time:'Fri', unread:0, online:false},
|
||
|
|
];
|
||
|
|
|
||
|
|
const listEl=document.getElementById('chatlist');
|
||
|
|
function chatRowHTML(c,i){
|
||
|
|
const cls=['chat-row'];
|
||
|
|
if(c.active)cls.push('active');
|
||
|
|
if(c.unread>0)cls.push('unread');
|
||
|
|
return '<div class="'+cls.join(' ')+'" data-i="'+i+'">'
|
||
|
|
+ '<div class="avatar" style="background:'+avColor(c.name)+'">'+pEsc(initials(c.name))
|
||
|
|
+ '<span class="dot'+(c.online?' on':'')+'"></span></div>'
|
||
|
|
+ '<div class="chat-main">'
|
||
|
|
+ '<div class="chat-top"><span class="chat-name">'+pEsc(c.name)+'</span><span class="chat-time">'+pEsc(c.time)+'</span></div>'
|
||
|
|
+ '<div class="chat-bottom"><span class="chat-prev">'+pEsc(c.msg)+'</span>'
|
||
|
|
+ (c.unread>0?'<span class="badge">'+c.unread+'</span>':'')+'</div>'
|
||
|
|
+ '</div></div>';
|
||
|
|
}
|
||
|
|
function renderChats(filter){
|
||
|
|
const q=(filter||'').trim().toLowerCase();
|
||
|
|
const rows=CHATS.map((c,i)=>({c,i})).filter(({c})=>!q||c.name.toLowerCase().includes(q)||c.msg.toLowerCase().includes(q));
|
||
|
|
listEl.innerHTML = rows.length
|
||
|
|
? rows.map(({c,i})=>chatRowHTML(c,i)).join('')
|
||
|
|
: '<div class="no-results">No chats match “'+pEsc(filter)+'”.</div>';
|
||
|
|
listEl.querySelectorAll('.chat-row').forEach(row=>{
|
||
|
|
row.onclick=()=>{
|
||
|
|
CHATS.forEach(c=>c.active=false);
|
||
|
|
CHATS[+row.dataset.i].active=true;
|
||
|
|
CHATS[+row.dataset.i].unread=0;
|
||
|
|
renderChats(document.getElementById('chatSearch').value);
|
||
|
|
};
|
||
|
|
});
|
||
|
|
}
|
||
|
|
renderChats('');
|
||
|
|
document.getElementById('chatSearch').addEventListener('input',e=>renderChats(e.target.value));
|
||
|
|
|
||
|
|
// ---------- Tab switching ----------
|
||
|
|
const tabBtns=document.querySelectorAll('.tabs button');
|
||
|
|
const panels=document.querySelectorAll('.panel');
|
||
|
|
tabBtns.forEach(btn=>{
|
||
|
|
btn.onclick=()=>{
|
||
|
|
const tab=btn.dataset.tab;
|
||
|
|
tabBtns.forEach(b=>b.classList.toggle('active',b===btn));
|
||
|
|
panels.forEach(p=>p.classList.toggle('active',p.dataset.panel===tab));
|
||
|
|
};
|
||
|
|
});
|
||
|
|
|
||
|
|
// Mockup-only stubs
|
||
|
|
document.querySelector('.newchat').onclick=()=>alert('Mockup — “New chat” would open the contact picker.');
|
||
|
|
document.getElementById('notifyBtn').onclick=()=>alert("Thanks! We'll let you know when Meetings launches.");
|
||
|
|
</script>
|
||
|
|
</body>
|
||
|
|
</html>
|