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;
|
let CHAT_ME = null, CHAT_OTHER = null, CHAT_LASTID = 0, CHAT_POLL = null, CHAT_CANMUTE = false, CHAT_IMUTE = false;
|
||||||
function chatSync(d) {
|
function chatSync(d) {
|
||||||
CHAT_ME = d.email || CHAT_ME;
|
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);
|
setChatBadge(d.chatUnread || 0);
|
||||||
const tog = $('chatAvailToggle'); if (tog) tog.checked = d.chatAvailable !== false;
|
const tog = $('chatAvailToggle'); if (tog) tog.checked = d.chatAvailable !== false;
|
||||||
const qs = $('qaMsgSponsor');
|
const qs = $('qaMsgSponsor');
|
||||||
@@ -1348,7 +1348,7 @@
|
|||||||
else qs.hidden = true;
|
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 stopPoll() { if (CHAT_POLL) { clearInterval(CHAT_POLL); CHAT_POLL = null; } }
|
||||||
function startPoll() { stopPoll(); CHAT_POLL = setInterval(() => pullThread(false), 4000); }
|
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'; }
|
function autoGrow(el) { el.style.height = 'auto'; el.style.height = Math.min(120, el.scrollHeight) + 'px'; }
|
||||||
@@ -1445,7 +1445,7 @@
|
|||||||
(function chatInit() {
|
(function chatInit() {
|
||||||
if (!$('chatDrawer')) return;
|
if (!$('chatDrawer')) return;
|
||||||
const on = (id, ev, fn) => { const el = $(id); if (el) el.addEventListener(ev, fn); };
|
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('chatClose', 'click', closeDrawer);
|
||||||
on('chatBack', 'click', openThreads);
|
on('chatBack', 'click', openThreads);
|
||||||
on('chatMute', 'click', toggleMute);
|
on('chatMute', 'click', toggleMute);
|
||||||
|
|||||||
@@ -513,12 +513,9 @@ img{max-width:100%}
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ── Sponsor chat: FAB, slide-in drawer, threads, bubbles, presence ── */
|
/* ── 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%;
|
.bo-chat{display:flex;align-items:center}
|
||||||
border:1px solid var(--line-strong);background:var(--mint);color:var(--mint-ink);display:grid;place-items:center;
|
.bo-chat .pill{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--mint);
|
||||||
cursor:pointer;box-shadow:0 10px 30px rgba(0,0,0,.4);transition:transform .12s ease}
|
color:var(--mint-ink);font:700 12px/20px var(--disp);text-align:center}
|
||||||
.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}
|
|
||||||
.chat-drawer{position:fixed;right:0;top:0;bottom:0;width:380px;max-width:92vw;z-index:70;display:flex;flex-direction:column;
|
.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);
|
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}
|
transform:translateX(0);animation:chatIn .16s ease}
|
||||||
|
|||||||
+9
-10
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<title>Member area | InstantAdPay</title>
|
<title>Member area | InstantAdPay</title>
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
|
||||||
<link rel="stylesheet" href="/assets/site.css?v=20260907a">
|
<link rel="stylesheet" href="/assets/site.css?v=20260907b">
|
||||||
</head>
|
</head>
|
||||||
<body class="bo-body">
|
<body class="bo-body">
|
||||||
|
|
||||||
@@ -108,6 +108,10 @@
|
|||||||
<button data-pane="profile" type="button"><svg viewBox="0 0 24 24"><circle cx="12" cy="8.5" r="3.6"/><path d="M4.5 20c1.6-3.6 4.2-5.2 7.5-5.2s5.9 1.6 7.5 5.2"/></svg>Profile</button>
|
<button data-pane="profile" type="button"><svg viewBox="0 0 24 24"><circle cx="12" cy="8.5" r="3.6"/><path d="M4.5 20c1.6-3.6 4.2-5.2 7.5-5.2s5.9 1.6 7.5 5.2"/></svg>Profile</button>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="bo-links" id="adSlotSide" hidden style="border-top:1px solid var(--line)"></div>
|
<div class="bo-links" id="adSlotSide" hidden style="border-top:1px solid var(--line)"></div>
|
||||||
|
<div class="bo-links">
|
||||||
|
<span class="bo-cap">Team</span>
|
||||||
|
<a href="#" id="chatMenuBtn" class="bo-chat"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" style="vertical-align:-2px;margin-right:7px"><path d="M5 5h14a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H9l-4 4V6a1 1 0 0 1 1-1z"/></svg>Messages<span class="pill" id="chatNavBadge" hidden></span></a>
|
||||||
|
</div>
|
||||||
<div class="bo-links">
|
<div class="bo-links">
|
||||||
<span class="bo-cap">Site</span>
|
<span class="bo-cap">Site</span>
|
||||||
<a href="/">Ad packages</a>
|
<a href="/">Ad packages</a>
|
||||||
@@ -623,14 +627,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button id="chatFab" class="chat-fab" type="button" hidden aria-label="Messages">
|
<script src="/assets/common.js?v=20260907b"></script>
|
||||||
<svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 5h14a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H9l-4 4V6a1 1 0 0 1 1-1z"/></svg>
|
<script src="/assets/wallet.js?v=20260907b"></script>
|
||||||
<span class="chat-fab-badge" id="chatFabBadge" hidden></span>
|
<script src="/assets/my.js?v=20260907b"></script>
|
||||||
</button>
|
<script src="/assets/chat.js?v=20260907b"></script>
|
||||||
|
|
||||||
<script src="/assets/common.js?v=20260907a"></script>
|
|
||||||
<script src="/assets/wallet.js?v=20260907a"></script>
|
|
||||||
<script src="/assets/my.js?v=20260907a"></script>
|
|
||||||
<script src="/assets/chat.js?v=20260907a"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user