PageSourceSearch

https://viewingparty.net/assets/AddVideo-gK16A9R_.js

js viewingparty.net collected 2026-10-02 02:02:26 UTC 1,509 bytes, 1 lines download raw bytes

1import{r as a,j as e,k as j}from"./index-CCHgDoTB.js";const y=()=>{const[l,x]=a.useState(""),[t,r]=a.useState(""),[i,n]=a.useState(""),[h,o]=a.useState(!1),[d,c]=a.useState(null),[u,m]=a.useState(null),p=async s=>{s.preventDefault(),o(!0),c(null),m(null);try{if(!l||!t)throw new Error("Playlist ID and Video URL are required");await j(`/api/v1/playlists/${l}/links`,{url:t,title:i}),c("Video added successfully!"),r(""),n("")}catch(b){m(b.message||"Error adding video")}finally{o(!1)}};return e.jsxs("div",{className:"container py-4",children:[e.jsx("h1",{children:"Add Video to Playlist"}),e.jsxs("form",{onSubmit:p,className:"mb-4",children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Playlist ID"}),e.jsx("input",{type:"text",className:"form-control",value:l,onChange:s=>x(s.target.value),required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Video URL"}),e.jsx("input",{type:"url",className:"form-control",value:t,onChange:s=>r(s.target.value),required:!0})]}),e.jsxs("div",{className:"mb-3",children:[e.jsx("label",{className:"form-label",children:"Title (optional)"}),e.jsx("input",{type:"text",className:"form-control",value:i,onChange:s=>n(s.target.value)})]}),e.jsx("button",{type:"submit",className:"btn btn-primary",disabled:h,children:"Add Video"})]}),d&&e.jsx("div",{className:"alert alert-success",children:d}),u&&e.jsx("div",{className:"alert alert-danger",children:u})]})};export{y 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.