PageSourceSearch

https://job-simulations.edtronaut.ai/assets/Starlink-CWudnsWE.js

js edtronaut.ai collected 2026-10-05 13:44:03 UTC 9,301 bytes, 1 lines download raw bytes

1import{c as q,u as F,r as s,Z as a,o as m,j as e,A as K}from"./index-BJDAxquz.js";import{o as O,q as X,u as z,r as B,s as U}from"./admin-84YkT96T.js";import{R as Z}from"./radio-CxqFJK_b.js";import{S as G}from"./search-DsnDoNRa.js";import{P as H}from"./pencil-BSzpCEwD.js";import{X as J}from"./x-circle-C3-2tKgH.js";import{T as Q}from"./trash-2-COx64nJZ.js";import{P as V}from"./plus-DiFTQ4rb.js";const W=q("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);function Y(i){return i?new Date(i).toLocaleString():"No schedule"}function ie(){const i=F(),[d,A]=s.useState([]),[u,R]=s.useState(""),[p,D]=s.useState(""),[l,x]=s.useState(0),[h,E]=s.useState(0),[b,N]=s.useState(!0),[L,v]=s.useState(!1),[M,S]=s.useState(!1),[r,w]=s.useState(null),[c,g]=s.useState(""),[f,j]=s.useState(8),C=s.useMemo(()=>d.filter(t=>t.status!=="ended").length,[d]),n=s.useCallback(async()=>{N(!0);try{const t=await O({keyword:u,status:p,offset:l});A(t.items),E(t.total)}catch(t){a.error(m(t,"Could not load Satellight rooms."))}finally{N(!1)}},[u,l,p]);s.useEffect(()=>{n()},[n]);const y=()=>{g(""),j(8),w(null)},k=()=>{if(l===0){n();return}x(0)},P=async t=>{if(t.preventDefault(),!c.trim()){a.error("Enter a room title.");return}v(!0);try{await X({title:c.trim(),max_participants:f}),a.success("Satellight room created."),y(),await n()}catch(o){a.error(m(o,"Could not create the Satellight room."))}finally{v(!1)}},$=async t=>{if(t.preventDefault(),!(!r||!c.trim())){S(!0);try{await z(r.slug,{title:c.trim(),max_participants:f}),a.success("Satellight room updated."),y(),await n()}catch(o){a.error(m(o,"Could not update the Satellight room."))}finally{S(!1)}}},I=t=>{w(t),g(t.title),j(t.max_participants)},T=async t=>{try{await B(t.slug),a.success("Satellight room ended."),await n()}catch(o){a.error(m(o,"Could not end the Satellight room."))}},_=async t=>{if(window.confirm(`Delete Satellight room “${t.title}”? This cannot be undone.`))try{await U(t.slug),a.success("Satellight room deleted."),await n()}catch(o){a.error(m(o,"Could not delete the Satellight room."))}};return e.jsx("main",{className:"min-h-screen bg-slate-50 px-4 py-6 sm:px-8",children:e.jsxs("div",{className:"mx-auto max-w-7xl",children:[e.jsxs("button",{type:"button",onClick:()=>i("/administrator"),className:"mb-5 inline-flex items-center gap-2 text-sm font-medium text-slate-600 hover:text-[#000CAD]",children:[e.jsx(K,{className:"h-4 w-4"})," Back to Admin Dashboard"]}
1),e.jsxs("div",{className:"flex flex-col gap-4 rounded-xl border border-slate-200 bg-white p-6 shadow-sm lg:flex-row lg:items-start lg:justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 text-[#000CAD]",children:[e.jsx(Z,{className:"h-5 w-5"}),e.jsx("span",{className:"text-sm font-bold uppercase tracking-wide",children:"Satellight"})]}),e.jsx("h1",{className:"mt-2 text-3xl font-bold text-slate-950",children:"All meeting rooms"}),e.jsx("p",{className:"mt-2 text-sm text-slate-600",children:"Manage every interview and administrator-created Satellight room across the platform."})]}),e.jsxs("div",{className:"rounded-lg bg-slate-100 px-4 py-3 text-sm text-slate-700",children:[e.jsx("span",{className:"font-bold text-slate-950",children:C})," active room",C===1?"":"s"]})]}),e.jsxs("div",{className:"mt-6 grid gap-6 xl:grid-cols-[minmax(0,1fr)_360px]",children:[e.jsxs("section",{className:"rounded-xl border border-slate-200 bg-white shadow-sm",children:[e.jsxs("div",{className:"flex flex-col gap-3 border-b border-slate-200 p-4 md:flex-row",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(G,{className:"pointer-events-none absolute left-3 top-2.5 h-4 w-4 text-slate-400"}),e.jsx("input",{value:u,onChange:t=>R(t.target.value),onKeyDown:t=>{t.key==="Enter"&&k()},placeholder:"Search title or room code",className:"w-full rounded-lg border border-slate-300 py-2 pl-9 pr-3 text-sm"})]}),e.jsxs("select",{value:p,onChange:t=>{D(t.target.value),x(0)},className:"rounded-lg border border-slate-300 px-3 py-2 text-sm",children:[e.jsx("option",{value:"",children:"All statuses"}),e.jsx("option",{value:"scheduled",children:"Scheduled"}),e.jsx("option",{value:"live",children:"Live"}),e.jsx("option",{value:"ended",children:"Ended"})]}),e.jsx("button",{type:"button",onClick:k,className:"rounded-lg border border-slate-300 px-4 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50",children:"Search"})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[900px] text-left text-sm",children:[e.jsx("thead",{className:"bg-slate-50 text-xs uppercase tracking-wide text-slate-500",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3",children:"Room"}),e.jsx("th",{className:"px-4 py-3",children:"Company"}),e.jsx("th",{className:"px-4 py-3",children:"Type"}),e.jsx("th",{className:"px-4 py-3",children:"Schedule"}),e.jsx("th",{className:"px-4 py-3",children:"Status"}),e.jsx("th",{className:"px-4 py-3",children:"Actions"})]})}),e.jsxs("tbody",{className:"divide-y divide-slate-200",children:[b?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-4 py-10 text-center text-slate-500",children:"Loading rooms…"})}):null,!b&&d.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-4 py-10 text-center text-slate-500",children:"No Satellight rooms found."})}):null,b?null:d.map(t=>e.jsxs("tr",{children:[e.jsxs("td",{className:"px-4 py-4",children:[e.jsx("p",{className:"font-semibold text-slate-900",children:t.title}),e.jsx("p",{className:"mt-1 font-mono text-xs text-slate-500",children:t.slug})]}),e.jsx("td",{className:"px-4 py-4 text-slate-700",children:t.company_name}),e.jsx("td",{className:"px-4 py-4 capitalize text-slate-700",children:t.kind}),e.jsx("td",{className:"px-4 py-4 text-slate-600",children:Y(t.scheduled_start)}),e.jsx("td",{className:"px-4 py-4",children:e.jsx("span",{className:`rounded-full px-2 py-1 text-xs font-semibold ${t.status==="live"?"bg-emerald-100 text-emerald-700":t.status==="ended"?"bg-slate-100 text-slate-600":"bg-blue-100 text-blue-700"}`,children:t.status})}),e.jsx("td",{className:"px-4 py-4",children:e.jsxs("div",{className:"flex gap-2",children:[t.status!=="ended"?e.jsx("button",{type:"button",onClick:()=>i(`/satellight/${t.slug}`),className:"rounded-md border border-[#000CAD] p-2 text-[#000CAD] hover:bg-indigo-50","aria-label":`Open ${t.title}`,children:e.jsx(W,{className:"h-4 w-4"})}):null,e.jsx("button",{type:"button",onClick:()=>I(t),className:"rounded-md border border-slate-300 p-2 text-slate-700 hover:bg-slate-50","aria-label":`Edit ${t.title}`,children:e.jsx(H,{className:"h-4 w-4"})}),t.status!=="ended"?e.jsx("button",{type:"button",onClick:()=>{T(t)},className:"rounded-md border border-amber-300 p-2 text-amber-700 hover:bg-amber-50","aria-label":`End ${t.title}`,children:e.jsx(J,{className:"h-4 w-4"})}):null,e.jsx("button",{type:"button",onClick:()=>{_(t)},className:"rounded-md border border-red-300 p-2 text-red-700 hover:bg-red-50","aria-label":`Delete ${t.title}`,children:e.jsx(Q,{className:"h-4 w-4"})})]})})]},t.slug))]})]})}),e.jsxs("div",{className:"flex items-center justify-between border-t border-slate-200 px-4 py-3 text-sm text-slate-600",children:[e.jsxs("span",{children:[h," room",h===1?"":"s"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{type:"button",disabled:l===0,onClick:()=>x(Math.max(0,l-100)),className:"rounded-md border border-slate-300 px-3 py-1.5 font-semibold disabled:opacity-50",children:"Previous"}),e.jsx("button",{type:"button",disabled:l+d.length>=h,onClick:()=>x(l+100),className:"rounded-md border border-slate-300 px-3 py-1.5 font-semibold disabled:opacity-50",children:"Next"})]})]})]}
1),e.jsxs("aside",{className:"h-fit rounded-xl border border-slate-200 bg-white p-5 shadow-sm",children:[e.jsx("h2",{className:"text-lg font-bold text-slate-900",children:r?"Edit room":"Create room"}),e.jsx("p",{className:"mt-1 text-sm text-slate-600",children:r?"Update the room control-plane settings.":"Create a public Satellight room. Anyone with its link can join after entering a name."}),e.jsxs("form",{className:"mt-5 space-y-4",onSubmit:r?$:P,children:[e.jsxs("label",{className:"block text-sm font-semibold text-slate-700",children:["Room title",e.jsx("input",{required:!0,value:c,onChange:t=>g(t.target.value),className:"mt-1 w-full rounded-lg border border-slate-300 p-2 font-normal"})]}),e.jsxs("label",{className:"block text-sm font-semibold text-slate-700",children:["Maximum participants",e.jsx("input",{required:!0,min:2,max:50,type:"number",value:f,onChange:t=>j(Number(t.target.value)),className:"mt-1 w-full rounded-lg border border-slate-300 p-2 font-normal"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsxs("button",{type:"submit",disabled:L||M,className:"inline-flex items-center gap-2 rounded-lg bg-[#000CAD] px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:[e.jsx(V,{className:"h-4 w-4"}),r?"Save changes":"Create room"]}),r?e.jsx("button",{type:"button",onClick:y,className:"rounded-lg border border-slate-300 px-4 py-2 text-sm font-semibold text-slate-700",children:"Cancel"}):null]})]})]})]})]})})}export{ie 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.