From 7331eac244baf660955d07a9d9a53e5418998db5 Mon Sep 17 00:00:00 2001 From: martbost Date: Sat, 5 Sep 2026 06:09:37 -0500 Subject: [PATCH] Back-office polish: Overview command center, quick actions, pane motion Overview gains a recent-activity mini-feed (chain events + line joins) and a quick-actions card jumping straight to buy/earn/campaigns plus one-tap invite copy. Panes fade in (reduced-motion safe). First slice of the back-office polish pass. Assets v=20260905f. Co-Authored-By: Claude Fable 5 --- public/assets/my.js | 31 +++++++++++++++++++++++++++++++ public/assets/site.css | 10 ++++++++++ public/contract.html | 8 ++++---- public/index.html | 10 +++++----- public/ledger.html | 8 ++++---- public/my.html | 30 ++++++++++++++++++++---------- 6 files changed, 74 insertions(+), 23 deletions(-) diff --git a/public/assets/my.js b/public/assets/my.js index 148e57c..4771e15 100644 --- a/public/assets/my.js +++ b/public/assets/my.js @@ -50,6 +50,28 @@ + '' + r.status + '').join(''); wrap.appendChild(t); } + // overview recent-activity widget: chain events + line joins, newest first + try { + const c = await IAP.getConfig(); + const ov = $('ovFeed'); + const rows = []; + if (d.memberId) { + const a = await (await fetch('/api/my/activity')).json(); + for (const ev of [...(a.earnings || []), ...(a.purchases || [])] + .sort((x, y) => y.block - x.block).slice(0, 5)) rows.push(IAP.feedRow(ev, c)); + } + for (const r of (d.referrals || []).slice(0, 3)) { + const div = document.createElement('div'); + div.className = 'row'; + div.innerHTML = '๐Ÿค ' + r.email + ' joined your line' + + new Date(r.joined).toLocaleDateString() + ''; + rows.push(div); + } + if (rows.length) { + ov.innerHTML = ''; + rows.slice(0, 6).forEach(r => ov.appendChild(r)); + } + } catch (e) {} // ready-to-send share message const link = location.origin + '/join/' + (d.refCode || d.memberId || ''); if (d.refCode || d.memberId) { @@ -85,6 +107,15 @@ } document.querySelectorAll('.bo-menu [data-pane]').forEach(b => b.addEventListener('click', () => setPane(b.dataset.pane))); + document.querySelectorAll('.qa [data-goto]').forEach(b => + b.addEventListener('click', () => setPane(b.dataset.goto))); + const qaCopy = document.getElementById('qaCopyInvite'); + if (qaCopy) qaCopy.addEventListener('click', async () => { + const link = document.getElementById('inviteLine').textContent; + if (!link || !link.startsWith('http')) { setPane('line'); return; } + try { await navigator.clipboard.writeText(link); IAP.status('Invite link copied.', 'ok'); } + catch (e) { setPane('line'); } + }); window.addEventListener('hashchange', () => setPane(location.hash.slice(1))); if ($('boBurger')) $('boBurger').addEventListener('click', () => document.getElementById('memberArea').classList.toggle('side-open')); diff --git a/public/assets/site.css b/public/assets/site.css index bdeec56..083fe1d 100644 --- a/public/assets/site.css +++ b/public/assets/site.css @@ -257,6 +257,16 @@ input:focus,select:focus{border-color:var(--mint)} #boBurger{display:block} .bo-content{padding:18px} } +/* back-office polish: pane transitions, quick actions */ +@media(prefers-reduced-motion:no-preference){ + .pane:not([hidden]){animation:panein .25s ease} + @keyframes panein{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}} +} +.qa{display:flex;flex-direction:column;gap:8px} +.qa button{display:flex;align-items:center;gap:10px;background:rgba(67,232,195,.05);border:1px solid var(--line); + color:var(--ink);font:600 14px var(--disp);padding:11px 14px;border-radius:11px;cursor:pointer;text-align:left; + transition:border-color .15s ease,background .15s ease} +.qa button:hover{border-color:var(--mint);background:rgba(67,232,195,.1)} /* member sub-navigation */ .subnav{display:flex;gap:6px;flex-wrap:wrap;background:rgba(16,28,24,.7);border:1px solid var(--line); border-radius:999px;padding:6px 8px;width:fit-content;margin:0 0 22px} diff --git a/public/contract.html b/public/contract.html index 7230098..e4da309 100644 --- a/public/contract.html +++ b/public/contract.html @@ -5,7 +5,7 @@ The contract | InstantAdPay - +
@@ -129,8 +129,8 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.
- - - + + + diff --git a/public/index.html b/public/index.html index bcf6230..64f1fba 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ InstantAdPay: advertise and earn, locked in code - + @@ -399,9 +399,9 @@ - - - - + + + + diff --git a/public/ledger.html b/public/ledger.html index 1b8d674..3d554ca 100644 --- a/public/ledger.html +++ b/public/ledger.html @@ -5,7 +5,7 @@ Live ledger | InstantAdPay - +
@@ -25,8 +25,8 @@
InstantAdPay ยท how it works ยท contract source โ†—
- - - + + + diff --git a/public/my.html b/public/my.html index 83f444f..fe345af 100644 --- a/public/my.html +++ b/public/my.html @@ -4,7 +4,7 @@ Member area | InstantAdPay - + @@ -98,12 +98,22 @@
-

Earning levels

-

โ€ฆ

-

Buy ad packages

-

The full ladder with live pricing is on the home page. - Purchases from your linked wallet automatically credit this account.

+

Recent activity

+
Your line's joins, buys, and payouts land here.
+
+
+
+

Quick actions

+
+ + + + +
+
+

Earning levels

+

โ€ฆ

@@ -240,9 +250,9 @@ - - - - + + + +