PageSourceSearch

https://echomarket.ai/assets/AdminOverview-DRST0XEl.js

js echomarket.ai collected 2026-10-05 16:37:07 UTC 4,617 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-wallet-w5428b3d.js";import{A as M}from"./AdminLayout-Dsp6DHYv.js";import{r as l}from"./vendor-charts-DWDwqT3S.js";import{C as x,a as g,b as _,c as F}from"./card-Bij-69Iv.js";import{P as O}from"./progress-rLdQq8ot.js";import{L as B,B as H,w as U,I as W}from"./index-DflTlzs8.js";import{u as q,a as z}from"./useCampaignReview-H2vFxqVO.js";import{S as I}from"./ScoringHealthPanel-agdYNwpT.js";import{u as Q,a as $}from"./usePlatformAdmin-OMmF_K3G.js";import{U as D}from"./users-DWOqZOMy.js";import"./arrow-left-BuBveCNL.js";import"./settings-D7uEnGMc.js";import"./useMutation-Nq2ufup6.js";import"./badge-Zd1_vrrR.js";import"./table-DIiLcnjN.js";import"./select-BTPYZK_o.js";import"./index-CT2RcYJF.js";import"./chevron-down-asb_MeJk.js";import"./circle-check-BfurKFTs.js";import"./activity-CRJaJMDE.js";import"./refresh-cw-CoGfyn8W.js";import"./download-Dqj97O_C.js";const G=()=>{const{data:t,refetch:a}=q(),d=z(),[s,R]=l.useState(null),[o,T]=l.useState(!1),[i,h]=l.useState(null),m=l.useRef(!1),j=!!t&&t.remaining>0,u=(s==null?void 0:s.remaining)??(t==null?void 0:t.remaining)??0,b=(s==null?void 0:s.filled)??(t==null?void 0:t.filled)??0,w=(s==null?void 0:s.upstream_null)??(t==null?void 0:t.upstream_null)??0,y=(s==null?void 0:s.unreadable)??(t==null?void 0:t.unreadable)??0,N=(s==null?void 0:s.failed)??(t==null?void 0:t.failed)??0,p=b+w+y+N,f=p+u;if(l.useEffect(()=>{if(!j||o||i||m.current)return;let n=!1;return m.current=!0,(async()=>{var S,C,L,v;let c=0;for(;!n;)try{const r=await d.mutateAsync({batch:5});if(n)break;if(c=0,R({remaining:r.remaining,filled:((S=r.totals)==null?void 0:S.filled)??0,upstream_null:((C=r.totals)==null?void 0:C.upstream_null)??0,unreadable:((L=r.totals)==null?void 0:L.unreadable)??0,failed:((v=r.totals)==null?void 0:v.failed)??0}),r.done||r.remaining===0){await a();break}}catch{if(c++,c>=5){h("The refill keeps failing. Press Resume to try again.");break}const P=await a();if(P.data&&P.data.remaining===0)break;await new Promise(E=>setTimeout(E,2e3*c))}m.current=!1})(),()=>{n=!0}},[j,o,i]),!t||t.remaining===0&&u===0)return null;const A=f>0?Math.round(p/f*100):0;return e.jsx(x,{className:"mb-6",children:e.jsxs(g,{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-medium flex items-center gap-2",children:[!o&&!i&&e.jsx(B,{className:"h-4 w-4 animate-spin text-primary"}),"Filling in content and media type"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[p.toLocaleString()," of ",f.toLocaleString()," posts handled · ",u.toLocaleString()," left ·"," ",b.toLocaleString()," filled in · ",w.toLocaleString()," still empty from the service ·"," ",y.toLocaleString()," post not readable · ",N.toLocaleString()," failed."]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Only text / image / video is written, plus a category where one was missing."})]}),e.jsx(H,{size:"sm",variant:"ghost",onClick:()=>{h(null),T(n=>!n)},children:o||i?"Resume":"Pause"})]}),e.jsx(O,{value:A}),i&&e.jsx("p",{className:"text-xs text-destructive",children:i})]})})},k=({icon:t,label:a,value:d,to:s})=>e.jsx(W,{to:s,children:e.jsx(x,{className:"hover:border-primary/50 transition-colors",children:e.jsxs(g,{className:"p-4 flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-lg bg-primary/10 flex items-center justify-center",children:e.jsx(t,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:a}),e.jsx("p",{className:"text-xl font-bold",children:d})]})]})})}),ge=()=>{const{data:t}=Q(),{data:a}=$();return e.jsxs(M,{title:"Overview",children:[e.jsx(G,{}),e.jsx(I,{}),e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-3 mb-6",children:[e.jsx(k,{icon:D,label:"Total Clubs",value:(t==null?void 0:t.length)??0,to:"/admin/clubs"}),e.jsx(k,{icon:U,label:"Club Projects",value:(a==null?void 0:a.length)??0,to:"/admin/club-projects"})]}),e.jsxs(x,{children:[e.jsx(_,{children:e.jsx(F,{children:"Welcome, Master"})}),e.jsxs(g,{className:"text-sm text-muted-foreground space-y-2",children:[e.jsx("p",{children:"The sidebar is grouped: Campaigns (campaigns and who can create them), Projects (registry and points programs), Clubs, Tokens (chains and retention), Rewards, Finance and Settings (quest policy and dev tools)."}),e.jsx("p",{children:"$EP is a 30-day rolling leaderboard score. Quest rewards land automatically when verified posts cross the weekly threshold."})]})]})]})};export{ge as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.