mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Trending-pattern clone ranked by sats from kind-9735 receipts: - js/zapTotals.js: per-pointer receipt aggregation. The feed's metric getter returns the cached total and schedules a batched fetch (#a/#e chunks via the L1 SubscriptionManager) for unknown/stale pointers; amounts parse via nip57 bolt11 with the zap request's amount tag as fallback; receipts are deduped by id so re-fetches never double-count; zero-receipt answers are cached (2-min TTL). - sorters.js: shared count-ranked sorter (metric desc, recency tie-break, author spread, trusted-muted sink); Trending delegates unchanged, Most Zapped ranks on runtime.getZapTotal. - Full wiring: feed definition, view + info popover, change-signal re-rank (order settles as receipts stream in), sidebar link, viewManager registry, feedCoordinator case/loader, FEED_TYPES.MOST_ZAPPED, and a FEATURE_MOST_ZAPPED_FEED flag (default on; off hides the tab). Co-Authored-By: Claude Fable 5 <[email protected]>
41 lines
1.3 KiB
HTML
41 lines
1.3 KiB
HTML
<!-- views/most-zapped.html -->
|
|
<section data-ds="new">
|
|
<div class="flex items-center gap-2 mb-4">
|
|
<h2 class="text-xl font-semibold text-text">Most Zapped</h2>
|
|
<button
|
|
type="button"
|
|
id="mostZappedInfoTrigger"
|
|
class="text-muted hover:text-text focus:outline-none transition-colors"
|
|
aria-label="How is this feed sorted?"
|
|
>
|
|
<svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
stroke-width="2"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
class="w-5 h-5"
|
|
aria-hidden="true"
|
|
>
|
|
<circle cx="12" cy="12" r="10"></circle>
|
|
<line x1="12" y1="16" x2="12" y2="12"></line>
|
|
<line x1="12" y1="8" x2="12.01" y2="8"></line>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
<div id="videoListTags" class="mb-4" hidden></div>
|
|
<div id="videoList" class="bv-grid-video" data-testid="video-list">
|
|
<div class="sidebar-loading-wrapper" role="status" aria-live="polite">
|
|
<div class="sidebar-loading-indicator">
|
|
<span
|
|
class="status-spinner status-spinner--inline"
|
|
aria-hidden="true"
|
|
></span>
|
|
<span class="sidebar-loading-text">Loading most zapped…</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|