1import{r as o,j as e}from"./index-wcHJDP7n.js";import{I as p}from"./image-SzRTvbci.js";import{L as g}from"./loader-circle-odIBswl4.js";import{S as b}from"./send-DRw-uvJl.js";import"./createLucideIcon-Bfd8HVjA.js";const h="fc267fd9ab5be2ee26c872e2df5e1ff1";function S(){const[s,m]=o.useState(""),[r,c]=o.useState(null),[u,x]=o.useState(!1),[l,a]=o.useState(null);async function f(t){if(t.preventDefault(),!s.trim())return;x(!0),a(null);const d=new FormData;d.append("text",s),r&&d.append("photo",r);try{const n=await fetch("/api/goin-publish",{method:"POST",headers:{"x-goin-token":h,Accept:"application/json"},body:d}),i=await n.json();n.ok&&i.success?(a({ok:!0,message:i.message}),m(""),c(null)):a({ok:!1,message:i.error||"ç¼å¸å¤±æï¼è«åè©¦ä¸æ¬¡ã"})}catch(n){a({ok:!1,message:String(n)})}finally{x(!1)}}return e.jsx("div",{className:"min-h-screen bg-background text-foreground flex items-start justify-center p-6 pt-16",children:e.jsxs("div",{className:"w-full max-w-xl bg-card border rounded-2xl p-6 shadow-sm",children:[e.jsx("h1",{className:"text-2xl font-bold mb-1",children:"LinkedIn ä¸éµç¼å¸"}),e.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"è²¼ä¸èªé³è½æåå
§å®¹ï¼å¯é¸å ä¸å¼µç¸çï¼æ³æ£å³èªåçææç« ä¸¦ç¼å¸å° LinkedInã"}),e.jsxs("form",{onSubmit:f,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"èªé³è½æåå
§å®¹"}),e.jsx("textarea",{value:s,onChange:t=>m(t.target.value),rows:8,placeholder:"åºåº¦è²¼ä¸ä½ å
èªé³è½æåå
§å®¹â¦â¦",className:"w-full rounded-lg border bg-background p-3 text-sm focus:outline-none focus:ring-2 focus:ring-primary",required:!0})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-1",children:"ç¸çï¼å¯é¸ï¼"}),e.jsxs("label",{className:"flex items-center gap-2 border rounded-lg p-3 text-sm cursor-pointer hover:bg-muted/50 transition",children:[e.jsx(p,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:r?r.name:"åæä¾å°±ç´æåç¼å¸"}),e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:t=>c(t.target.files?.[0]||null)})]})]}),e.jsx("button",{type:"submit",disabled:u||!s.trim(),className:"w-full flex items-center justify-center gap-2 rounded-lg bg-primary text-primary-foreground py-3 font-medium disabled:opacity-50",children:u?e.jsxs(e.Fragment,{children:[e.jsx(g,{className:"w-4 h-4 animate-spin"})," çæä¸¦ç¼å¸ä¸â¦â¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(b,{className:"w-4 h-4"})," çæä¸¦ç¼å¸å° LinkedIn"]})})]}),l&&e.jsx("div",{className:`mt-5 rounded-lg p-4 text-sm whitespace-pre-wrap ${l.ok?"bg-green-500/10 text-green-700 dark:text-green-400 border border-green-500/20":"bg-red-500/10 text-red-700 dark:text-red-400 border border-red-500/20"}`,children:l.message})]})})}export{S 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.