PageSourceSearch

https://operator-stack-web-stg.onrender.com/_nuxt/DTX7U1bd.js

js operator-stack-web-stg.onrender.com collected 2026-10-03 11:42:57 UTC 4,431 bytes, 1 lines download raw bytes

1import{d as v,N as w,o as k,c as r,e as t,B as T,D as C,f as s,C as D,t as n,F as N,j as U,r as d,a as l,n as $}from"./BJ-fXIum.js";import{u as j}from"./DkEKFN4y.js";import{a as B}from"./C-c2tz7K.js";import{u as F}from"./DyOszaq-.js";import"./D3dKKD4A.js";const M={class:"flex items-center gap-3 mb-4"},P={class:"relative flex-1 sm:max-w-sm"},S={class:"bg-white rounded-lg border border-gray-200 p-4 mb-4 flex items-center gap-6"},E={class:"ml-2 font-mono text-lg font-semibold text-green-500"},L={class:"bg-white rounded-lg border border-gray-200 overflow-hidden"},R={key:0,class:"p-6 text-gray-500 text-sm"},V={key:1,class:"p-6 text-center text-gray-500 text-sm"},A={key:2},I={class:"overflow-x-auto"},J={class:"w-full text-sm"},O=["onClick"],q={class:"px-[18px] py-2.5 font-mono text-[13px]"},z={class:"px-[18px] py-2.5 text-gray-900"},G={class:"px-[18px] py-2.5 font-mono text-[13px]"},H={class:"px-[18px] py-2.5"},K={key:0,class:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono bg-green-50 text-green-700"},Q={key:1,class:"inline-flex items-center px-2 py-0.5 rounded text-xs font-mono bg-gray-50 text-gray-500"},W={class:"px-[18px] py-2.5 font-mono text-[13px] text-gray-500"},X={class:"flex flex-col sm:flex-row items-center justify-between gap-2 px-[18px] py-2.5 border-t border-gray-200 text-sm"},Y={class:"font-mono text-xs text-gray-400"},Z={class:"flex gap-2"},tt=["disabled"],et={class:"px-3 py-1 font-mono text-xs text-gray-500"},st=["disabled"],y=50,xt=v({__name:"index",setup(ot){const{fetchUsers:f}=j(),{show:b}=B(),{formatDateOnly:_}=F(),x=d([]),p=d(0),m=d(!0),a=d(1),c=d("");let u=null;const g=async()=>{m.value=!0;try{const i=await f({page:a.value,per_page:y,search:c.value||void 0});x.value=i.items,p.value=i.total}catch{b("Failed to load users","error")}finally{m.value=!1}},h=()=>{u&&clearTimeout(u),u=setTimeout(()=>{a.value=1,g()},300)};return w(a,()=>g()),k(()=>g()),(i,e)=>(l(),r("div",null,[e[6]||(e[6]=t("h1",{class:"font-mono text-xl font-semibold text-gray-900 mb-6"},"> Users",-1)),t("div",M,[t("div",P,[e[3]||(e[3]=t("span",{class:"absolute left-3 top-1/2 -translate-y-1/2 font-mono text-xs text-gray-400"},"$",-1)),T(t("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>D(c)?c.value=o:null),type:"text",placeholder:"Search by email or name...",class:"w-full pl-7 pr-3 py-2 border border-gray-200 rounded text-sm font-mono focus:outline-none focus:ring-2 focus:ring-green-500/20 focus:border-green-500",onInput:h},null,544),[[C,s(c)]])])]),t("div",S,[t("div",null,[e[4]||(e[4]=t("span",{class:"text-xs text-gray-500 uppercase tracking-wider"},"Total Users",-1)),t("span",E,n(s(p)),1)])]),t("div",L,[s(m)?(l(),r("div",R,"Loading...")):s(x).length===0?(l(),r("div",V," No users found. ")):(l(),r("div",A,[t("div",I,[t("table",J,[e[5]||(e[5]=t("thead",{class:"bg-gray-50 border-b border-gray-200"},[t("tr",null,[t("th",{class:"text-left px-[18px] py-2.5 text-xs font-medium text-gray-500 uppercase tracking-wider"}," Email "),t("th",{class:"text-left px-[18px] py-2.5 text-xs font-medium text-gray-500 uppercase tracking-wider"}," Name "),t("th",{class:"text-left px-[18px] py-2.5 text-xs font-medium text-gray-500 uppercase tracking-wider"}," Projects "),t("th",{class:"text-left px-[18px] py-2.5 text-xs font-medium text-gray-500 uppercase tracking-wider"}," Role "),t("th",{class:"text-left px-[18px] py-2.5 text-xs font-medium text-gray-500 uppercase tracking-wider"}," Joined ")])],-1)),t("tbody",null,[(l(!0),r(N,null,U(s(x),o=>(l(),r("tr",{key:o.id,class:"border-b border-gray-100 hover:bg-gray-50 transition-colors cursor-pointer",onClick:at=>("navigateTo"in i?i.navigateTo:s($))(`/admin/users/${o.id}`)},[t("td",q,n(o.email),1),t("td",z,n(o.name||"-"),1),t("td",G,n(o.project_count),1),t("td",H,[o.is_admin?(l(),r("span",K,"admin")):(l(),r("span",Q,"user"))]),t("td",W,n(s(_)(o.created_at)),1)],8,O))),128))])])]),t("div",X,[t("span",Y,n(s(p))+" total users",1),t("div",Z,[t("button",{disabled:s(a)<=1,class:"px-3 py-1 border border-gray-200 rounded text-sm hover:bg-gray-50 disabled:opacity-50 transition-colors",onClick:e[1]||(e[1]=o=>s(a)>1&&a.value--)}," Previous ",8,tt),t("span",et,"Page "+n(s(a))+" of "+n(Math.max(1,Math.ceil(s(p)/y))),1),t("button",{disabled:s(x).length<y,class:"px-3 py-1 border border-gray-200 rounded text-sm hover:bg-gray-50 disabled:opacity-50 transition-colors",onClick:e[2]||(e[2]=o=>a.value++)}," Next ",8,st)])])]))])]))}});
1export{xt 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.