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-DnroACXc.js";import{i as $,c as x}from"./app-DckefXYL.js";import{_ as b}from"./app-BZtLQ7Ua.js";import{_ as g}from"./app-35Uyu21k.js";import{_ as v}from"./app-Cm7ndh-Y.js";import{_ as y}from"./app-CjXr3cCY.js";import{L as w}from"./app-DM6WPmnv.js";import{_ as u}from"./app-KcnMuQGX.js";import{_ as U}from"./app-DezwSKU9.js";import{_ as B}from"./app-Z_-2XiXN.js";import{_ as N}from"./app-Dum_NU1V.js";import"./app-C9iVkiu5.js";import"./app-DrIi-dNq.js";import"./app-zueB50zj.js";import"./app-B0NrURRk.js";import"./app-Co2SIBzr.js";import"./app-CUPmXIij.js";import"./app-Cu6FD8m8.js";import"./app-B8VsrFxM.js";import"./app-B09rlSqG.js";import"./app-uFawAv7F.js";import"./app-BJhJ7lM8.js";import"./app-Dd07dUxy.js";import"./app-CYYQ_Zep.js";import"./app-Dpl5YSiv.js";import"./app-CF8nmC-F.js";import"./app-NVAx7Sc3.js";import"./app-CF0qXH5Q.js";import"./app-xECxwo4T.js";import"./app-BtWF1kMA.js";import"./app-CGj1gg44.js";import"./app-B4bUdtyo.js";import"./app-BeuOvIof.js";import"./app-DSjO_8RR.js";import"./app-CZGZgDLc.js";import"./app-R-vSvFIF.js";import"./app-HaDoyrq5.js";import"./app-Cmxxk_WX.js";import"./app-LqsmzyUT.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};
