PageSourceSearch

https://phloxe.io/_nuxt/DCKjMRWL.js

js phloxe.io collected 2026-10-08 12:47:16 UTC 4,901 bytes, 1 lines download raw bytes

1import{_ as $}from"./KG9SZRUY.js";import{_ as A}from"./D1moRq8b.js";import{d as D,aL as S,af as h,r as I,v as B,i as E,o as C,k as o,f as t,u as l,b as a,E as P,g as u,y as k,aX as F,a as w,_ as G,e as M,F as T,t as V}from"#entry";import{_ as j}from"./BIKlRO_u.js";import{_ as z}from"./C7N8pDEX.js";import{_ as L}from"./IyVT0Lxg.js";import{_ as J}from"./CG1e-pz-.js";import{_ as O}from"./XhUV7Eym.js";import{_ as q}from"./CQb-t0T4.js";import{_ as R}from"./BEWfX2r_.js";import"./DWGMdCOl.js";import"./CNp5tWw7.js";import"./6K3D47wn.js";import"./eLlchgCS.js";import"./Bi2tIwDO.js";import"./CcFiapl1.js";import"./B4Y5vQb5.js";import"./C0eqi79C.js";const X={class:"flex justify-end gap-3"},H=D({__name:"Create",props:{modelValue:{required:!0,type:Boolean},modelModifiers:{}},emits:S(["created"],["update:modelValue"]),setup(U,{emit:y}){const n=h(U,"modelValue"),v=y,p=I(!1),s=B({name:""}),_=async()=>{if(p.value)return;p.value=!0;const{error:m}=await k("apiKeys",{method:"POST",body:s,watch:!1,company:!0});p.value=!1,!m.value&&(s.name="",n.value=!1,v("created"))};return(m,e)=>{const x=$,f=A,r=P,g=O,c=q,b=R;return C(),E(b,{modelValue:n.value,"onUpdate:modelValue":e[2]||(e[2]=d=>n.value=d),onClose:e[3]||(e[3]=d=>n.value=!1)},{default:o(()=>[t(c,{ui:{divide:"divide-y-0 divide-gray-100 dark:divide-gray-800",header:{base:"flex",padding:"pb-0"}}},{header:o(()=>[...e[4]||(e[4]=[a("h2",{class:"text-lg font-semibold"},"Create API Key",-1)])]),default:o(()=>[t(g,{state:l(s),class:"flex flex-col gap-5",onSubmit:_},{default:o(()=>[t(f,{label:"Name",name:"name"},{default:o(()=>[t(x,{modelValue:l(s).name,"onUpdate:modelValue":e[0]||(e[0]=d=>l(s).name=d)},null,8,["modelValue"])]),_:1}),a("div",X,[t(r,{color:"gray",onClick:e[1]||(e[1]=d=>n.value=!1)},{default:o(()=>[...e[5]||(e[5]=[u(" Cancel ",-1)])]),_:1}),t(r,{type:"submit",color:"primary",loading:l(p)},{default:o(()=>[...e[6]||(e[6]=[u(" Create ",-1)])]),_:1},8,["loading"])])]),_:1},8,["state"])]),_:1})]),_:1},8,["modelValue"])}}}),Q={class:"flex w-full flex-col gap-5"},W={class:"flex flex-col gap-3"},Y={class:"flex flex-col items-center gap-3 md:flex-row"},Z={class:"flex flex-col items-center justify-center gap-3"},ee={class:"flex flex-col gap-3"},te={class:"flex items-center gap-2"},be=D({__name:"api",setup(U){const y=F(),n=I(!1);B({collaborators:[{name:"John Doe",email:"[email protected]",status:"Invited",access_level:"-"},{name:"John Doe",email:"[email protected]",status:"Done",access_level:"Collaborator"}]});const v=m=>{navigator.clipboard.writeText(m)},p=async m=>{if(n.value)return;n.value=!0;const{error:e}=await k(`apiKeys/${m}`,{method:"DELETE",company:!0});if(n.value=!1,!e.value)return _()},{data:s,refresh:_}=k("apiKeys",{company:!0});return(m,e)=>{const x=$,f=A,r=P,g=j,c=G,b=z,d=L,K=J;return C(),w("div",Q,[t(K,{title:"API Connect"},{default:o(()=>[a("div",W,[e[4]||(e[4]=a("div",null,[a("p",{class:"font-medium text-slate-800"}," 1. Connect your plateform with Phloxe "),a("p",{class:"text-xs"}," Link your inventory to Phloxe and enable AI-driven discovery for users to explore your products. ")],-1)),a("div",Y,[t(f,{label:"",class:"h-full flex-1 self-end",name:"excel"},{default:o(()=>[t(x,{type:"file",accept:".csv"})]),_:1}),t(f,{label:"",class:"h-full self-end",name:"button"},{default:o(()=>[t(r,null,{default:o(()=>[...e[1]||(e[1]=[u("Add",-1)])]),_:1})]),_:1})]),t(g,{label:"OR"}),a("div",Z,[e[3]||(e[3]=a("p",null,"Use our Shopify App to connect your store",-1)),t(r,{class:"flex items-center gap-3"},{default:o(()=>[t(c,{name:"i-mdi-shopify",class:"h-5 w-5",dynamic:""}),e[2]||(e[2]=a("span",null,"Connect Shopify",-1))]),_:1})])]),a("div",ee,[e[8]||(e[8]=a("div",null,[a("p",{class:"font-medium text-slate-800"}," 2. Generate API Key "),a("p",{class:"text-xs"}," Generate an API key to connect your platform with Phloxe. ")],-1)),l(s)?(C(),w(T,{key:0},[t(d,{columns:[{key:"name",label:"Name"},{key:"key",label:"key"},{key:"status",label:"Status"},{key:"action",label:"Action"}],rows:l(s).data},{"status-data":o(({row:i})=>[t(b,{variant:"soft",color:i.status=="active"?"green":"red",class:"capitalize"},{default:o(()=>[u(V(i.status),1)]),_:2},1032,["color"])]),"key-data":o(({row:i})=>[a("div",null,[a("p",null,V(i.key.slice(0,10))+"...",1)])]),"action-data":o(({row:i})=>[a("div",te,[t(r,{size:"xs",color:"white",variant:"outline",onClick:N=>v(i.key)},{default:o(()=>[e[5]||(e[5]=u(" Copy ",-1)),t(c,{name:"i-heroicons-clipboard",dynamic:""})]),_:1},8,["onClick"]),t(r,{size:"xs",color:"red",variant:"outline",onClick:N=>p(i.id)},{default:o(()=>[e[6]||(e[6]=u(" Delete ",-1)),t(c,{name:"i-heroicons-trash-solid",dynamic:""})]),_:1},8,["onClick"])])]),_:1},8,["rows"]),t(r,{variant:"outline",class:"w-full md:ml-auto md:w-fit",onClick:e[0]||(e[0]=i=>l(y).open(l(H),{onCreated:l(_)}))},{default:o(()=>[...e[7]||(e[7]=[u(" Generate New Key ",-1)])]),_:1})],64)):M("",!0)])]),_:1})])}}});
1export{be 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.