PageSourceSearch

https://techwebsound.com/assets/AdminPillowExperiences-DfeJN1ky.js

js techwebsound.com collected 2026-10-02 05:15:52 UTC 4,670 bytes, 1 lines download raw bytes

1import{l as h,f as x,c as p,h as g,j as e,L as u,m as n,v as b}from"./index-DaVPQP0x.js";import{A as f}from"./arrow-left-CTaEgLQE.js";import{L as w}from"./loader-circle-DxAvfFXT.js";import{M as y}from"./monitor-DoprFf5E.js";const j=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],N=h("smartphone",j),r=["lounge","gallery","lightshow","liquidlab","oracle","puzzle","canvas","magic8ball","twostv"],v={lounge:"📻",gallery:"🎨",lightshow:"🌈",liquidlab:"🧪",oracle:"🔮",puzzle:"🧩",canvas:"✨",magic8ball:"🎱",twostv:"📺"};function _(){const{toast:o}=x(),{data:c=[],isLoading:d}=p({queryKey:["/api/pillow-experiences"]}),m=[...c].sort((t,a)=>{const i=r.indexOf(t.slug),s=r.indexOf(a.slug);return(i===-1?999:i)-(s===-1?999:s)}),l=g({mutationFn:async({slug:t,field:a,value:i})=>{const s=await fetch(`/api/pillow-experiences/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:i})});if(!s.ok)throw new Error("Failed to update experience");return s.json()},onSuccess:()=>{b.invalidateQueries({queryKey:["/api/pillow-experiences"]})},onError:t=>{o({title:"Error",description:t.message,variant:"destructive"})}});return e.jsx("div",{className:"min-h-screen bg-[#0a0a0f] text-white p-6",children:e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsxs(u,{href:"/backstage",className:"inline-flex items-center gap-2 text-white/50 hover:text-white/80 mb-6 font-mono text-sm transition-colors","data-testid":"link-back-admin",children:[e.jsx(f,{className:"w-4 h-4"}),"Back to Backstage"]}),e.jsx(n.h1,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"text-3xl font-display mb-2",style:{color:"#ff6699"},"data-testid":"text-page-title",children:"Surrealistic Pillow Experiences"}),e.jsx("p",{className:"text-white/40 font-mono text-sm mb-8","data-testid":"text-page-description",children:"Toggle experiences on or off separately for mobile (phone) and desktop visitors."}),d?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(w,{className:"w-8 h-8 animate-spin text-white/30"})}):e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-[1fr_80px_80px] gap-2 px-4 py-2 text-xs font-mono text-white/30 uppercase tracking-wider",children:[e.jsx("span",{children:"Experience"}),e.jsxs("span",{className:"text-center flex items-center justify-center gap-1",children:[e.jsx(N,{className:"w-3 h-3"})," Mobile"]}),e.jsxs("span",{className:"text-center flex items-center justify-center gap-1",children:[e.jsx(y,{className:"w-3 h-3"})," Desktop"]})]}),m.map(t=>e.jsxs(n.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"grid grid-cols-[1fr_80px_80px] gap-2 items-center px-4 py-3 rounded-lg bg-white/5 border border-white/10 hover:border-white/20 transition-colors","data-testid":`row-experience-${t.slug}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-xl",children:v[t.slug]||"🌀"}),e.jsx("span",{className:"font-mono text-sm text-white/80",children:t.name})]}),e.jsx("div",{className:"flex justify-center",children:e.jsx("button",{onClick:()=>l.mutate({slug:t.slug,field:"mobileEnabled",value:!t.mobileEnabled}),className:`w-12 h-6 rounded-full relative transition-all duration-300 ${t.mobileEnabled?"bg-green-500/60 border-green-400/50":"bg-white/10 border-white/20"} border`,"data-testid":`toggle-mobile-${t.slug}`,children:e.jsx("span",{className:`absolute top-0.5 w-4.5 h-4.5 rounded-full transition-all duration-300 ${t.mobileEnabled?"left-6 bg-green-300":"left-0.5 bg-white/40"}`,style:{width:"18px",height:"18px"}})})}),e.jsx("div",{className:"flex justify-center",children:e.jsx("button",{onClick:()=>l.mutate({slug:t.slug,field:"desktopEnabled",value:!t.desktopEnabled}),className:`w-12 h-6 rounded-full relative transition-all duration-300 ${t.desktopEnabled?"bg-green-500/60 border-green-400/50":"bg-white/10 border-white/20"} border`,"data-testid":`toggle-desktop-${t.slug}`,children:e.jsx("span",{className:`absolute top-0.5 w-4.5 h-4.5 rounded-full transition-all duration-300 ${t.desktopEnabled?"left-6 bg-green-300":"left-0.5 bg-white/40"}`,style:{width:"18px",height:"18px"}})})})]},t.slug))]}),e.jsx("div",{className:"mt-8 p-4 rounded-lg border border-white/10 bg-white/5",children:e.jsxs("p",{className:"text-white/30 font-mono text-xs leading-relaxed",children:[e.jsx("strong",{className:"text-white/50",children:"Note:"})," Mobile means phone-sized screens only (not tablets). Disabled experiences won't appear in the Surrealistic Pillow room list for that device type."]})})]})})}export{_ 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.