PageSourceSearch

https://pricemate.info/_nuxt/DuIrocit.js

js pricemate.info collected 2026-10-02 00:38:03 UTC 1,885 bytes, 1 lines download raw bytes

1import{_ as h}from"./Dq0rHMRm.js";import{f as b,G as i,D as c,E as a,O as C,L as x,S as y,M as _,N as k,Q as w,R as B,_ as S,F as u,T,n as A}from"./YmqgnTXc.js";import"./BV_ImXAg.js";import"./C4iS2aBk.js";import"./DlAUqK2U.js";const I={key:0,class:"mt-4"},$={class:"flex gap-2"},N=["src","onClick"],j={__name:"create",setup(O){const d=b().public.apiBase,p=i(""),n=i(""),o=i([]),m=i(null),f=async v=>{const e=localStorage.getItem("auth_token"),l=v.target.files[0];if(!l)return;const s=new FormData;s.append("image",l);const r=await(await fetch(`${d}/api/articles/upload-image`,{method:"POST",body:s,headers:{Authorization:`Bearer ${e}`}})).json();r.url&&(o.value.push(r.url),n.value+=`<img src="${r.url}" alt="Article Image">`)},g=async()=>{await fetch(`${d}/api/articles`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:JSON.stringify({title:p.value,content:n.value,cover_image:m.value||(o.value.length?o.value[0]:null)})}),A("/articles")};return(v,e)=>{const l=h,s=S;return u(),c("div",null,[e[3]||(e[3]=a("h1",{class:"text-2xl font-bold"},"Create Article",-1)),C(a("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>p.value=t),placeholder:"Title",class:"border p-2 w-full mb-4"},null,512),[[y,p.value]]),a("div",null,[_(s,null,{default:k(()=>[_(l,{content:n.value,"onUpdate:content":e[1]||(e[1]=t=>n.value=t)},null,8,["content"])]),_:1})]),a("input",{type:"file",onChange:f,class:"mt-4"},null,32),o.value.length?(u(),c("div",I,[e[2]||(e[2]=a("h3",{class:"font-semibold"},"Select Cover Image",-1)),a("div",$,[(u(!0),c(w,null,B(o.value,t=>(u(),c("img",{key:t,src:t,class:T(["w-24 h-24 cursor-pointer border",{"border-blue-500 border-2":m.value===t}]),onClick:r=>m.value=t},null,10,N))),128))])])):x("",!0),a("button",{onClick:g,class:"mt-4 bg-blue-500 text-white px-4 py-2"},"Publish")])}}};export{j 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.