PageSourceSearch

https://folksy.com/build/routes/admin.themes/index-XR6OZBNG.js

js folksy.com collected 2026-09-24 08:47:37 UTC 7,867 bytes, 1 lines download raw bytes

1import{a as k}from"/build/_shared/chunk-YWTHP42W.js";import{a as y}from"/build/_shared/chunk-PZBT3ZQB.js";import{a as S}from"/build/_shared/chunk-2REPOOWC.js";import"/build/_shared/chunk-XJ4HQVTL.js";import{f,g as h,k as n,p as g}from"/build/_shared/chunk-6ZIO5V64.js";import{b as I,c as N}from"/build/_shared/chunk-7DS4SBON.js";import{d as r,g as i,h as m,i as c,k as d,l as p}from"/build/_shared/chunk-H4UJXLRU.js";i();m();c();p();d();i();m();c();p();d();var b=r(I()),D=r(k()),O=r(S());var e=r(N());function w(){let{themesConnection:o,currentOptions:a}=g(),[x]=h(),[v,A]=(0,b.useState)(a.nameFilter||""),C=(t,s)=>{let l=new URLSearchParams(x);return s?l.set(t,s):l.delete(t),l.delete("after"),`?${l.toString()}`},u=t=>{let s=new URLSearchParams(x);return s.set("sortKey",t),a.sortKey===t?s.set("sort",a.sort==="ASC"?"DESC":"ASC"):s.set("sortKey",t),s.delete("after"),`?${s.toString()}`};return(0,e.jsx)("div",{className:"min-h-screen bg-neutral-100",children:(0,e.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[(0,e.jsxs)("div",{className:"mb-8",children:[(0,e.jsx)("a",{href:"https://folksy.com/",className:"inline-block mb-4 hover:opacity-80 transition-opacity",children:(0,e.jsx)(y,{})}),(0,e.jsx)("h1",{className:"text-3xl font-bold text-neutral-900",children:"Themes Administration"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-neutral-600",children:"Manage and filter product themes"})]}),(0,e.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-neutral-200 p-6 mb-6",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold text-neutral-900 mb-4",children:"Filters"}),(0,e.jsxs)(f,{method:"get",className:"flex flex-wrap gap-4",children:[(0,e.jsxs)("div",{className:"flex-1 min-w-[200px]",children:[(0,e.jsx)("label",{htmlFor:"nameFilter",className:"block text-sm font-medium text-neutral-700 mb-1",children:"Name Filter"}),(0,e.jsx)("input",{id:"nameFilter",name:"nameFilter",type:"text",value:v,onChange:t=>A(t.target.value),placeholder:"Search themes...",className:"w-full border border-neutral-300 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-secondary-500 focus:border-transparent"})]}),(0,e.jsxs)("div",{className:"flex-1 min-w-[150px]",children:[(0,e.jsx)("label",{htmlFor:"state",className:"block text-sm font-medium text-neutral-700 mb-1",children:"State"}),(0,e.jsxs)("select",{id:"state",name:"state",defaultValue:a.state||"ACTIVE",className:"w-full border border-neutral-300 rounded-md px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-secondary-500 focus:border-transparent",children:[(0,e.jsx)("option",{value:"ALL",children:"All"}),(0,e.jsx)("option",{value:"ACTIVE",children:"Active"})]})]}),(0,e.jsx)("button",{type:"submit",className:"self-end bg-secondary-600 hover:bg-secondary-700 text-white px-6 py-2 rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-secondary-500 focus:ring-offset-2",children:"Apply Filters"})]})]}),(0,e.jsxs)("div",{className:"bg-white rounded-lg shadow-sm border border-neutral-200 overflow-hidden",children:[(0,e.jsx)("div",{className:"overflow-x-auto",children:(0,e.jsxs)("table",{className:"min-w-full divide-y divide-neutral-200",children:[(0,e.jsx)("thead",{className:"bg-neutral-100",children:(0,e.jsxs)("tr",{children:[(0,e.jsx)("th",{className:"px-6 py-2 text-left text-sm font-semibold text-neutral-500 uppercase tracking-wider",children:(0,e.jsxs)(n,{to:u("ID"),className:"flex items-center py-2 hover:text-neutral-700 transition-colors",children:[(0,e.jsx)("span",{children:"ID"}),(0,e.jsx)("span",{className:"ml-1",children:a.sortKey==="ID"&&(a.sort==="ASC"?"\u2191":"\u2193")})]})}),(0,e.jsx)("th",{className:"px-6 py-2 text-left text-sm font-semibold text-neutral-500 uppercase tracking-wider",children:(0,e.jsxs)(n,{to:u("NAME"),className:"flex items-center py-2 hover:text-neutral-700 transition-colors",children:[(0,e.jsx)("span",{children:"Name"}),(0,e.jsx)("span",{className:"ml-1",children:a.sortKey==="NAME"&&(a.sort==="ASC"?"\u2191":"\u2193")})]})}),(0,e.jsx)("th",{className:"px-6 py-2 text-left text-sm font-semibold text-neutral-500 uppercase tracking-wider",children:(0,e.jsxs)(n,{to:u("POSITION"),className:"flex items-center py-2 hover:text-neutral-700 transition-colors",children:[(0,e.jsx)("span",{children:"Position"}),(0,e.jsx)("span",{className:"ml-1",children:a.sortKey==="POSITION"&&(a.sort==="ASC"?"\u2191":"\u2193")})]})}),(0,e.jsx)("th",{className:"px-6 py-2 text-left text-sm font-semibold text-neutral-500 uppercase tracking-wider",children:"Items"}),(0,e.jsx)("th",{className:"px-6 py-2 text-left text-sm font-semibold text-neutral-500 uppercase tracking-wider",children:"Slug"}),(0,e.jsx)("th",{className:"px-6 py-2 text-left text-sm font-semibold text-neutral-500 uppercase tracking-wider",children:"Status"}),(0,e.jsx)("th",{className:"px-6 py-2 text-left text-sm font-semibold text-neutral-500 uppercase tracking-wider",children:"Introduction"}),(0,e.jsx)("th",{className:"px-6 py-2 text-left text-sm font-semibold text-neutral-500 uppercase tracking-wider",children:"Created"}),(0,e.jsx)("th",{className:"px-6 py-2 text-left text-sm font-semibold text-neutral-500 uppercase tracking-wider",children:"Updated"}),(0,e.jsx)("th",{className:"px-6 py-2 text-left text-sm font-semibold text-neutral-500 uppercase tracking-wider sticky right-0 bg-neutral-100",children:"Actions"})]})}),(0,e.jsx)("tbody",{className:"bg-white divide-y divide-neutral-200",children:o.edges.map(({node:t})=>(0,e.jsxs)("tr",{className:"hover:bg-neutral-100 transition-colors",children:[(0,e.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-neutral-900",children:t.id}),(0,e.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-neutral-900",children:(0,e.jsx)("a",{href:`/gift-guides/${t.slug}`,className:"text-secondary-600 hover:text-secondary-800 hover:underline transition-colors",target:"_blank",rel:"noopener noreferrer",children:t.name})}),(0,e.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-neutral-600",children:t.position}),(0,e.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-neutral-600",children:t.itemCount}),(0,e.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-neutral-600",children:t.slug}),(0,e.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,e.jsx)("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${t.active?"bg-green-100 text-green-800":"bg-neutral-150 text-neutral-800"}`,children:t.active?"Active":"Inactive"})}),(0,e.jsx)("td",{className:"px-6 py-4 text-sm text-neutral-600 max-w-xs truncate",children:t.introduction}),(0,e.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-neutral-600",children:new Date(t.createdAt).toLocaleDateString()}),(0,e.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-neutral-600",children:new Date(t.updatedAt).toLocaleDateString()}),(0,e.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm sticky right-0 bg-white",children:(0,e.jsx)("a",{target:"_blank",href:`https://folksy.com/admin/themes/${t.slug}/edit`,className:"text-secondary-600 hover:text-secondary-800 font-medium transition-colors",children:"Edit"})})]},t.id))})]})}),(0,e.jsxs)("div",{className:"px-6 py-4 bg-neutral-100 border-t border-neutral-200 flex items-center justify-between",children:[(0,e.jsxs)("p",{className:"text-sm text-neutral-700",children:["Total Themes:"," ",(0,e.jsx)("span",{className:"font-medium",children:o.totalCount})]}),o.pageInfo.hasNextPage&&(0,e.jsx)(n,{to:C("after",o.pageInfo.lastCursor||""),className:"bg-secondary-600 hover:bg-secondary-700 text-white px-4 py-2 rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-secondary-500 focus:ring-offset-2",children:"Load More"})]})]})]})})}export{w 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.