PageSourceSearch

https://hantavirusmap.com/assets/x9k2-console.content.index-vpLLir_l.js

js hantavirusmap.com collected 2026-10-02 23:21:10 UTC 3,229 bytes, 1 lines download raw bytes

1import{bg as h,W as g,r as a,j as e,L as l,bh as j,bi as N}from"./main-BZn_dPrE.js";function b(){const c=h({from:"/x9k2-console/content/"}),x=g(),s=c.kind??"page",[n,i]=a.useState([]),[p,d]=a.useState(!0),r=async()=>{d(!0);try{const t=await j({data:{kind:s}});i(t)}finally{d(!1)}};a.useEffect(()=>{r()},[s]);const m=async t=>{confirm(`Delete this ${s}?`)&&(await N({data:{id:t}}),r())},o=({kind:t,label:u})=>e.jsx("button",{onClick:()=>x({to:"/x9k2-console/content",search:{kind:t}}),className:`rounded-md px-3 py-1.5 text-sm font-medium ${s===t?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/70"}`,children:u});return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"text-xl font-semibold",children:"Content"}),e.jsxs("div",{className:"ml-3 flex gap-1",children:[e.jsx(o,{kind:"page",label:"Pages"}),e.jsx(o,{kind:"post",label:"Blog posts"})]})]}),e.jsx(l,{to:"/x9k2-console/content/$id",params:{id:"new"},search:{kind:s},className:"rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary/90",children:s==="post"?"New post":"New page"})]}),p?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}):n.length===0?e.jsxs("p",{className:"text-sm text-muted-foreground",children:["No ",s==="post"?"posts":"pages"," yet. Create your first one."]}):e.jsx("div",{className:"overflow-x-auto rounded-md border border-border",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-muted/40 text-left text-xs uppercase text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2",children:"Slug"}),e.jsx("th",{className:"px-3 py-2",children:"Locale"}),e.jsx("th",{className:"px-3 py-2",children:"Title"}),e.jsx("th",{className:"px-3 py-2",children:"Status"}),s==="post"&&e.jsx("th",{className:"px-3 py-2",children:"Published"}),e.jsx("th",{className:"px-3 py-2",children:"Updated"}),e.jsx("th",{className:"px-3 py-2"})]})}),e.jsx("tbody",{children:n.map(t=>e.jsxs("tr",{className:"border-t border-border",children:[e.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:t.slug}),e.jsx("td",{className:"px-3 py-2",children:t.locale}),e.jsx("td",{className:"px-3 py-2",children:t.title}),e.jsx("td",{className:"px-3 py-2",children:e.jsx("span",{className:t.status==="published"?"rounded bg-green-500/15 px-1.5 py-0.5 text-xs text-green-400":"rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",children:t.status})}),s==="post"&&e.jsx("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:t.published_at?new Date(t.published_at).toLocaleDateString():"—"}),e.jsx("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:new Date(t.updated_at).toLocaleString()}),e.jsxs("td",{className:"px-3 py-2 text-right",children:[e.jsx(l,{to:"/x9k2-console/content/$id",params:{id:t.id},className:"mr-3 text-primary hover:underline",children:"Edit"}),e.jsx("button",{onClick:()=>m(t.id),className:"text-destructive hover:underline",children:"Delete"})]})]},t.id))})]})})]})}export{b as component};

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.