PageSourceSearch

https://wocoz.co/assets/AppReviewGameIndex-CfbpSxxS.js

js wocoz.co collected 2026-10-02 01:20:56 UTC 4,908 bytes, 1 lines download raw bytes

1import{r,j as e,a as _}from"./index-DOq2ievp.js";function A(){return"https://wocoz-server-yos5w4btwq-el.a.run.app".replace(/\/$/,"")}const j="app-review-index-html",E=25;function y(i,v){return i<=7?Array.from({length:i},(s,n)=>n+1):Array.from({length:i},(s,n)=>n+1).filter(s=>s===1||s===i?!0:Math.abs(s-v)<=1).reduce((s,n,g,u)=>{const d=u[g-1];return typeof d=="number"&&n-d>1&&s.push("ellipsis"),s.push(n),s},[])}function L(){const[i,v]=r.useState(null),[m,s]=r.useState(!0),[n,g]=r.useState(null),[u,d]=r.useState(1),[p,f]=r.useState(E),t=i?.games??[],l=Math.max(1,Math.ceil(t.length/p)),c=Math.min(u,l),h=(c-1)*p,b=r.useMemo(()=>t.slice(h,h+p),[t,h,p]),N=t.length===0?0:Math.min(h+p,t.length);return r.useEffect(()=>{d(1)},[p,t.length]),r.useEffect(()=>{u>l&&d(l)},[u,l]),r.useEffect(()=>(document.documentElement.classList.add(j),window.scrollTo(0,0),()=>document.documentElement.classList.remove(j)),[]),r.useEffect(()=>{const a=A();if(!a){g("This page is not configured: set VITE_WOCOZ_API_BASE_URL to your wocoz-server base URL (no trailing slash) and redeploy."),s(!1);return}let o=!1;return(async()=>{try{const x=await fetch(`${a}/api/public/app-review-game-index`,{method:"GET",headers:{Accept:"application/json"}}),w=await x.json();if(!x.ok)throw new Error(w.error||`HTTP ${x.status}`);o||v(w)}catch(x){o||g(x instanceof Error?x.message:"Failed to load index")}finally{o||s(!1)}})(),()=>{o=!0}},[]),e.jsxs("div",{className:"app-review-index-page",children:[e.jsx(_,{title:"App Review — Game index"}),e.jsxs("main",{className:"app-review-index-main",children:[e.jsx("h1",{className:"app-review-index-title",children:"Non-embedded games (Guideline 4.7.4)"}),e.jsxs("p",{className:"app-review-index-lead",children:["This page lists remote games available in the Wocoz app: ",e.jsx("strong",{children:"title"}),","," ",e.jsx("strong",{children:"developer"}),", and ",e.jsx("strong",{children:"URL"}),". Data is loaded live from Wocoz servers. All games listed are developed and owned by Wocoz."]}),e.jsxs("p",{className:"app-review-index-lead",children:["For App Store Review, you can link to this page from ",e.jsx("strong",{children:"App Review Information → Notes"})," ","instead of pasting the full table. Keep your existing demo sign-in, review video, and HTML5 game credentials in Notes as needed."]}),m&&e.jsx("p",{className:"app-review-index-status",children:"Loading…"}),n&&e.jsx("p",{className:"app-review-index-error",role:"alert",children:n}),!m&&!n&&i?.generatedAt&&e.jsxs("p",{className:"app-review-index-meta",children:["Generated: ",e.jsx("time",{dateTime:i.generatedAt,children:new Date(i.generatedAt).toISOString().slice(0,10)})," · ",t.length," game",t.length===1?"":"s",l>1?` · showing ${h+1}–${N}`:""]}),!m&&!n&&t.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"app-review-index-page-size",children:[e.jsx("label",{htmlFor:"app-review-rows-per-page",children:"Rows per page"}),e.jsx("select",{id:"app-review-rows-per-page",className:"app-review-index-page-size__select",value:p,onChange:a=>f(Number(a.target.value)),children:[10,25,50,100].map(a=>e.jsx("option",{value:a,children:a},a))})]}),e.jsx("div",{className:"app-review-index-table-wrap",children:e.jsxs("table",{className:"app-review-index-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"#"}),e.jsx("th",{children:"Title"}),e.jsx("th",{children:"Developer"}),e.jsx("th",{children:"URL"}),e.jsx("th",{children:"Feed ID"}),e.jsx("th",{children:"Note"})]})}),e.jsx("tbody",{children:b.map((a,o)=>e.jsxs("tr",{children:[e.jsx("td",{className:"app-review-index-row-num",children:h+o+1}),e.jsx("td",{children:a.title}),e.jsx("td",{children:a.developer}),e.jsx("td",{className:"app-review-index-url",children:a.url?e.jsx("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",children:a.url}):"—"}),e.jsx("td",{children:e.jsx("code",{children:a.feedId})}),e.jsx("td",{children:a.note||"—"})]},a.feedId))})]})}),l>1&&e.jsxs("nav",{className:"app-review-index-pagination","aria-label":"Game index pagination",children:[e.jsx("button",{type:"button",className:"app-review-index-pagination__btn",disabled:c<=1,onClick:()=>d(a=>Math.max(1,a-1)),children:"← Previous"}),e.jsx("div",{className:"app-review-index-pagination__pages",children:y(l,c).map((a,o)=>a==="ellipsis"?e.jsx("span",{className:"app-review-index-pagination__ellipsis",children:"…"},`ellipsis-${o}`):e.jsx("button",{type:"button",className:`app-review-index-pagination__page${a===c?" app-review-index-pagination__page--active":""}`,onClick:()=>d(a),"aria-current":a===c?"page":void 0,children:a},a))}),e.jsx("button",{type:"button",className:"app-review-index-pagination__btn",disabled:c>=l,onClick:()=>d(a=>Math.min(l,a+1)),children:"Next →"})]})]}),!m&&!n&&t.length===0&&e.jsx("p",{className:"app-review-index-status",children:"No games returned."})]})]})}export{L as AppReviewGameIndex};

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.