PageSourceSearch

https://snapto.link/build/assets/Create-CCRkLX7X.js

js snapto.link collected 2026-09-24 09:54:09 UTC 3,617 bytes, 1 lines download raw bytes

1import{K as l,m as o,j as e}from"./app-DDm4dLCY.js";import{B as c}from"./button-D9X3vUxO.js";import{C as n,d as m,e as p}from"./card-DifmMaC0.js";import{I as u}from"./input-BjisokTd.js";import{L as x}from"./label-ByReZhaM.js";import{A as y}from"./AppLayout-D3rO1WBN.js";/* empty css            */import"./nav-user-DvzLnKQ3.js";import"./dropdown-menu-BJ85x3F3.js";import"./index-BT5q4viw.js";import"./index-Cdxa91Ef.js";import"./x-CHtAT9W1.js";import"./SubscribePopup-BIs2wKL_.js";import"./dialog-CEzzDisZ.js";import"./input-group-D1JyTM92.js";import"./check-4WvCJIOI.js";import"./plus-BXg4Gnan.js";import"./chart-column-Bw2FzsCp.js";import"./AppHead-B4kTnGqC.js";function A(){const i=l(),r=o({user_id:i.props.auth.user.id,profile_id:null,code:"",description:"",type:"",status:"",enabled:!1,image_url:"",url:""}),a=s=>{s.preventDefault(),r.post(route("device.store"),{preserveScroll:!0,onSuccess:()=>{window.location.href=route("device.list")},onError:()=>{}})},t=[{key:"user_id",id:"user_id",label:"User id",errorKey:"user_id"},{key:"profile_id",id:"profile_id",label:"Profile id",errorKey:"profile_id"},{key:"code",id:"code",label:"Device code",errorKey:"code"},{key:"description",id:"description",label:"Description",errorKey:"description"},{key:"type",id:"type",label:"Type",errorKey:"description"},{key:"status",id:"status",label:"Status",errorKey:"status"},{key:"url",id:"url",label:"url",errorKey:"url"},{key:"image_url",id:"image_url",label:"image url",errorKey:"image_url"}];return e.jsx(y,{children:e.jsx("div",{className:"py-12",children:e.jsx("div",{className:"mx-auto max-w-3xl sm:px-6 lg:px-8",children:e.jsx("form",{onSubmit:a,children:e.jsxs(n,{children:[e.jsxs(m,{className:"space-y-6",children:[t.map(s=>e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:s.id,children:s.label}),e.jsx(u,{id:s.id,type:"text","aria-invalid":!!r.errors[s.errorKey],value:r.data[s.key]??"",onChange:d=>r.setData(s.key,d.target.value)}),r.errors[s.errorKey]&&e.jsx("p",{className:"text-destructive text-sm",children:r.errors[s.errorKey]})]},s.key)),e.jsxs("fieldset",{children:[e.jsx("legend",{className:"text-foreground text-sm font-medium",children:"Enabled"}),e.jsxs("div",{className:"mt-4 space-y-4",children:[e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex h-5 items-center",children:e.jsx("input",{id:"device_enabled",type:"radio",value:"1",name:"device_enabled",className:"border-input accent-primary size-4",checked:r.data.enabled==!0,onChange:()=>r.setData("enabled","1")})}),e.jsxs("div",{className:"ml-3 text-sm",children:[e.jsx("label",{htmlFor:"device_enabled",className:"text-foreground font-medium",children:"Enabled"}),e.jsx("p",{className:"text-muted-foreground",children:"This device is active and can be scanned by others to access your public profile."})]})]}),e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex h-5 items-center",children:e.jsx("input",{id:"device_disabled",type:"radio",value:"0",name:"device_enabled",className:"border-input accent-primary size-4",checked:r.data.enabled==!1,onChange:()=>r.setData("enabled","0")})}),e.jsxs("div",{className:"ml-3 text-sm",children:[e.jsx("label",{htmlFor:"device_disabled",className:"text-foreground font-medium",children:"Disabled"}),e.jsxs("p",{className:"text-muted-foreground",children:["This device is inactive and ",e.jsx("b",{children:"can not be scanned"})," by others to access your public profile.."]})]})]})]})]})]}),e.jsx(p,{className:"justify-end",children:e.jsx(c,{type:"submit",disabled:r.processing,children:"Confirm"})})]})})})})})}export{A 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.