1import{o as $,d as x,p as V}from"./index-mGgJqOFQ.js";import{d as y,bo as C,br as I,o as l,a as f,w as t,b as a,aK as L,c as v,F as D,a4 as U,u,aA as A,aY as S,q as i,t as m,I as Y,ak as q,bl as E}from"./core-Cu1dlvv4.js";import{u as F}from"./useSearch-BI9R3Mbd.js";const R=y({__name:"UserList",async setup(G){let p,c;[p,c]=C(()=>E.get({uri:"users?fields=username&fields=fullname&fields=mail&fields=mailbox-quota&fields=groups",cachePath:"users"})),await p,c();const{users:b}=I(),[o,_]=F(b,(e,n)=>n.username.toLowerCase().includes(e)||n.groups.includes(e));function w(){const{host:e}=q();window.open(`https://${e.value}/yunohost/api/users/export`,"_blank")}return(e,n)=>{const r=x,d=S,h=A,g=$,k=L,B=V;return l(),f(B,{modelValue:u(o),"onUpdate:modelValue":n[0]||(n[0]=s=>Y(o)?o.value=s:null),items:u(_),"items-name":"users"},{"top-bar-buttons":t(()=>[a(h,{"split-to":{name:"user-create"},split:"",variant:"outline-success",right:"","split-variant":"success"},{"button-content":t(()=>[a(r,{iname:"plus"}),i(" "+m(e.$t("users_add")),1)]),default:t(()=>[a(d,{to:{name:"user-import"}},{default:t(()=>[a(r,{iname:"plus"}),i(" "+m(e.$t("users_import")),1)]),_:1}),a(d,{onClick:w},{default:t(()=>[a(r,{iname:"download"}),i(" "+m(e.$t("users_export")),1)]),_:1})]),_:1})]),default:t(()=>[a(k,null,{default:t(()=>[(l(!0),v(D,null,U(u(_),s=>(l(),f(g,{key:s.username,to:{name:"user-info",params:{name:s.username}},label:s.username,sublabel:s.fullname,description:s.mail},null,8,["to","label","sublabel","description"]))),128))]),_:1})]),_:1},8,["modelValue","items"])}}});export{R 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.