Live members-area updates: SSE toasts + cha-ching/pop sounds, no refresh needed

- The members area subscribes to the chain event stream (/api/feed/live) and
  reacts to anything relevant to the member: a payout received (cha-ching + toast
  + auto-refresh), a referral qualifying, a passed-up payout (missed), a settled
  purchase, a new activation in the line. No page refresh required.
- New chat message -> "pop" sound + toast + badge; ping heartbeat (20s) now
  returns chatUnread and pops on an increase.
- Sounds are synthesized via Web Audio (no asset files, CSP-safe).
- Surge badge: nudge the name down (ribbonY .779 -> .805) to center on its ribbon.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-07 07:36:47 -05:00
parent 7fbf9add37
commit 958bd5ac20
3 changed files with 70 additions and 9 deletions
+4 -4
View File
@@ -4,7 +4,7 @@
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<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="/assets/site.css?v=20260907j">
<link rel="stylesheet" href="/assets/site.css?v=20260907k">
</head>
<body class="bo-body">
@@ -641,9 +641,9 @@
</div>
</div>
</div>
<script src="/assets/common.js?v=20260907j"></script>
<script src="/assets/common.js?v=20260907k"></script>
<script src="/assets/wallet.js?v=20260907f"></script>
<script src="/assets/my.js?v=20260907j"></script>
<script src="/assets/chat.js?v=20260907j"></script>
<script src="/assets/my.js?v=20260907k"></script>
<script src="/assets/chat.js?v=20260907k"></script>
</body>
</html>