import{o as r,g as p,b as o,w as i,u as s,c as f,h as l,F as C,i as d,f as n,a as c,t as _}from"./app-SC54XQDl.js";import{i as $,c as x}from"./app-Ba7ZqSpq.js";import{_ as b}from"./app-DIkpqbGD.js";import{_ as g}from"./app-COkia88n.js";import{_ as v}from"./app-CYkRDMao.js";import{_ as y}from"./app-DZcB_Zcx.js";import{L as w}from"./app-Crd12MWL.js";import{_ as u}from"./app-CWnUJ4gg.js";import{_ as U}from"./app-D9UgVOV0.js";import{_ as B}from"./app-CBN_lwXA.js";import{_ as N}from"./app-BUqHq_rP.js";import"./app-CL60OiIv.js";import"./app-D9TrJBlL.js";import"./app-_Ovp2dOH.js";import"./app-BjSCO7rC.js";import"./app-Dhl-Bw0H.js";import"./app-B2C_dtYI.js";import"./app-COidJXl1.js";import"./app-DoVkxbmA.js";import"./app-C2mBgI5Z.js";import"./app-DHsI_tns.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-PPG0ZS4d.js";import"./app-DgoEZtNT.js";import"./app-Ch8j4za4.js";import"./app-Dw0jKdCD.js";import"./app-DnXuoh8P.js";import"./app-CCkWSX4Q.js";import"./app-C8HFiBxn.js";import"./app-g-bJrEAS.js";import"./app-DZaelcLs.js";import"./app-D_RBJHM6.js";import"./app-CmrRgGIA.js";import"./app-DyP4Nide.js";import"./app-C28obFWS.js";import"./app-CkINxBL9.js";import"./app--Lj8zATS.js";import"./app-CNHjdV6U.js";function V(){const{utils:a,Tea:e}=$(this);this.createUser=function(){a.popup(e.url(".createPopup"),{width:"44em",callback:function(){a.success("创建成功",function(){a.reload()})}})},this.updateUser=function(m){a.popup("/servers/certs/acme/users/updatePopup?userId="+m,{width:"44em",callback:function(){a.success("保存成功",function(){a.reload()})}})},this.deleteUser=function(m){let h=this;a.confirm("确定要删除此用户吗？",function(){h.$post(".delete").params({userId:m}).refresh()})}}const z={class:"ml-2"},T={key:1},E=["onClick"],F=c("i",{class:"icon expand small"},null,-1),I={class:"label-group mt-1"},L={key:0},P={key:1,class:"disabled"},D=["onClick"],M=["onClick"],yt={__name:"index",setup(a){const e=x(new V);return(m,h)=>(r(),p(C,null,[o(b,{"active-tab":"user"}),o(B,null,{default:i(()=>[o(N,{onClick:d(s(e).createUser,["prevent"]),"action-create":""},{default:i(()=>[n("创建用户")]),_:1},8,["onClick"]),c("span",z,[o(g,{content:"这里管理用于申请免费证书的用户信息",class:"flex"})])]),_:1}),s(e).users.length==0?(r(),f(U,{key:0},{default:i(()=>[n("暂时还没有用户。")]),_:1})):l("",!0),s(e).users.length>0?(r(),p("div",T,[o(w,{items:s(e).users},{default:i(()=>[o(u,{header:"用户Email",class:"email-column",frozen:""},{body:i(({data:t})=>[c("a",{href:"",onClick:d(k=>s(e).updateUser(t.id),["prevent"])},[n(_(t.email)+" ",1),F],8,E),c("div",I,[t.provider!=null?(r(),f(v,{key:0},{default:i(()=>[n(_(t.provider.name),1)]),_:2},1024)):l("",!0),t.account!=null?(r(),f(v,{key:1},{default:i(()=>[n(_(t.account.name),1)]),_:2},1024)):l("",!0)])]),_:1}),o(u,{header:"备注",class:"description-column"},{body:i(({data:t})=>[t.description.length>0?(r(),p("span",L,_(t.description),1)):(r(),p("span",P,"-"))]),_:1}),o(u,{header:"操作",class:"two op",frozen:"","align-frozen":"right"},{body:i(({data:t})=>[c("a",{href:"",onClick:d(k=>s(e).updateUser(t.id),["prevent"])},"修改",8,D),n("   "),c("a",{href:"",onClick:d(k=>s(e).deleteUser(t.id),["prevent"])},"删除",8,M)]),_:1})]),_:1},8,["items"])])):l("",!0),o(y,{data:s(e).page},null,8,["data"])],64))}};export{yt as default};
