Admin Member content pane: every page, link, source, zone, ad, postback, upload, profile, broadcast, audience and video members made, in one list

- GET /api/admin/content?type=&q=&from=&to=&flagged=1&page=&per=&fresh=1 (admin only, read-only): content.js normalizes
  rows from each module's own adminAll() (new one-pass accessors in pages, rotator, sources, zones, postbacks,
  audiences, messages.adminBroadcasts, videomaker.adminJobs) plus ads.adminList and accounts.listAll; owner shown as
  @username, email and member #; created in Central time; totals per type; busiest hosts in the current view
- Flags: open member reports on an ad, dead or parked destinations, burned link domains, failing postbacks,
  admin-paused zones, home-page demo links. No deny list exists yet
- Row actions only reuse existing moderation routes (campaign pause/resume, zone pause/resume); "Open member" jumps
  to the member card; page Preview works for drafts and is never counted (admin allowed on ?preview=1)
- Uploads: /uploads files now recorded with their uploader in uploads-index.json; older files get the owner from
  whatever uses them (campaign creative, profile, wall offer)
- Credits > Your purchases: buys made from linked positions are included, labelled "Position N"
- Cache tags: admin.css 20261018a, admin.js 20261018b, credits-screen.js 20261018b

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-18 07:01:58 -05:00
parent f4b3058a58
commit afede88c4a
15 changed files with 464 additions and 16 deletions
+1 -1
View File
@@ -121,7 +121,7 @@
$('buysMeta').textContent = buys.length + (buys.length === 1 ? ' purchase' : ' purchases') + ' · every row links to the transaction';
$('buyRows').innerHTML = buys.length ? buys.slice(0, 50).map(x => {
const ts = Number(x.ts || x.time || 0); const when = ts ? new Date(ts * (ts > 1e12 ? 1 : 1000)).toLocaleString() : '';
const pkg = x.priceCents ? usd(x.priceCents) : (x.package || x.product || ('#' + (x.productId || '')));
const pkg = (x.priceCents ? usd(x.priceCents) : (x.package || x.product || ('#' + (x.productId || '')))) + (x.position ? ' · Position ' + x.position : ''); // bought from a linked position (2026-10-18)
const paid = x.amountWei || x.valueWei || x.paidWei ? pol(x.amountWei || x.valueWei || x.paidWei) + ' POL' : '';
const tx = x.tx || x.hash || '';
return '<div class="rw"><span class="mono muted" style="font-size:12px">' + esc(when) + '</span><span class="num">' + esc(String(pkg)) + '</span><span class="mono">' + esc(paid) + '</span><span>' + (tx ? '<a class="mono" href="' + esc((CFG && CFG.explorer) || 'https://polygonscan.com') + '/tx/' + esc(tx) + '" target="_blank" rel="noopener">' + esc(tx.slice(0, 10)) + '…' + esc(tx.slice(-6)) + '</a>' : '') + '</span></div>';