Sponsor chat entry: move off the bottom-right FAB into the left sidebar
The bottom-right bubble is the site's AI support chat — only one belongs there. Sponsor/downline messaging now lives in the lower sidebar under Team → Messages (unread badge on the link), opening the same threads drawer. Removed the FAB. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -1339,7 +1339,7 @@
|
||||
let CHAT_ME = null, CHAT_OTHER = null, CHAT_LASTID = 0, CHAT_POLL = null, CHAT_CANMUTE = false, CHAT_IMUTE = false;
|
||||
function chatSync(d) {
|
||||
CHAT_ME = d.email || CHAT_ME;
|
||||
const fab = $('chatFab'); if (fab) fab.hidden = !d.email;
|
||||
const link = $('chatMenuBtn'); if (link && link.closest('.bo-links')) link.closest('.bo-links').hidden = !d.email;
|
||||
setChatBadge(d.chatUnread || 0);
|
||||
const tog = $('chatAvailToggle'); if (tog) tog.checked = d.chatAvailable !== false;
|
||||
const qs = $('qaMsgSponsor');
|
||||
@@ -1348,7 +1348,7 @@
|
||||
else qs.hidden = true;
|
||||
}
|
||||
}
|
||||
function setChatBadge(n) { const b = $('chatFabBadge'); if (b) { b.hidden = !n; b.textContent = n > 9 ? '9+' : n; } }
|
||||
function setChatBadge(n) { const b = $('chatNavBadge'); if (b) { b.hidden = !n; b.textContent = n > 9 ? '9+' : n; } }
|
||||
function stopPoll() { if (CHAT_POLL) { clearInterval(CHAT_POLL); CHAT_POLL = null; } }
|
||||
function startPoll() { stopPoll(); CHAT_POLL = setInterval(() => pullThread(false), 4000); }
|
||||
function autoGrow(el) { el.style.height = 'auto'; el.style.height = Math.min(120, el.scrollHeight) + 'px'; }
|
||||
@@ -1445,7 +1445,7 @@
|
||||
(function chatInit() {
|
||||
if (!$('chatDrawer')) return;
|
||||
const on = (id, ev, fn) => { const el = $(id); if (el) el.addEventListener(ev, fn); };
|
||||
on('chatFab', 'click', openThreads);
|
||||
on('chatMenuBtn', 'click', e => { if (e && e.preventDefault) e.preventDefault(); openThreads(); });
|
||||
on('chatClose', 'click', closeDrawer);
|
||||
on('chatBack', 'click', openThreads);
|
||||
on('chatMute', 'click', toggleMute);
|
||||
|
||||
@@ -513,12 +513,9 @@ img{max-width:100%}
|
||||
}
|
||||
|
||||
/* ── Sponsor chat: FAB, slide-in drawer, threads, bubbles, presence ── */
|
||||
.chat-fab{position:fixed;right:20px;bottom:20px;z-index:60;width:56px;height:56px;border-radius:50%;
|
||||
border:1px solid var(--line-strong);background:var(--mint);color:var(--mint-ink);display:grid;place-items:center;
|
||||
cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,.4);transition:transform .12s ease}
|
||||
.chat-fab:hover{transform:translateY(-2px)}
|
||||
.chat-fab-badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;
|
||||
background:var(--bad);color:#2a0d08;font:700 12px/20px var(--disp);text-align:center}
|
||||
.bo-chat{display:flex;align-items:center}
|
||||
.bo-chat .pill{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--mint);
|
||||
color:var(--mint-ink);font:700 12px/20px var(--disp);text-align:center}
|
||||
.chat-drawer{position:fixed;right:0;top:0;bottom:0;width:380px;max-width:92vw;z-index:70;display:flex;flex-direction:column;
|
||||
background:var(--panel-solid);border-left:1px solid var(--line-strong);box-shadow:-16px 0 40px rgba(0,0,0,.45);
|
||||
transform:translateX(0);animation:chatIn .16s ease}
|
||||
|
||||
Reference in New Issue
Block a user