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-DA7OTM4Q.js";import{i as $,c as x}from"./app-BT68AfZ-.js";import{_ as b}from"./app-CmBuubL0.js";import{_ as g}from"./app-D4kZhDW_.js";import{_ as v}from"./app-thzIjInJ.js";import{_ as y}from"./app-D21nXKzm.js";import{L as w}from"./app-CjSxNKvA.js";import{_ as u}from"./app-Dapk2SAF.js";import{_ as U}from"./app-BWsCS5pa.js";import{_ as B}from"./app-j31z0Ghb.js";import{_ as N}from"./app-C6hnOMuv.js";import"./app-scFtFqL8.js";import"./app-DREBJ-ou.js";import"./app-CWBL8eTX.js";import"./app-CnGe5nlE.js";import"./app-OC5wWJiS.js";import"./app-BX4pd6U-.js";import"./app-Bhreb6Cm.js";import"./app-BkWUIifj.js";import"./app-CQwVTjAx.js";import"./app-z_TsLOhk.js";import"./app-C5ROEzFd.js";import"./app-Bnbo6OlJ.js";import"./app-Dxa5h-uG.js";import"./app-AbPAjGV5.js";import"./app-BqY8p2gl.js";import"./app-C-GI59rl.js";import"./app-DSiZNBrr.js";import"./app-BotiHebp.js";import"./app-DUjqI3OV.js";import"./app-45ZaIHUI.js";import"./app-KNE_24OY.js";import"./app-SLkqftrw.js";import"./app-BxVwOz69.js";import"./app-WOreqTiW.js";import"./app-up4gT9D9.js";import"./app-D29bbm9n.js";import"./app-B_5dka6q.js";import"./app-Zes_jb7S.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};
