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-BYcXwl4U.js";import{i as $,c as x}from"./app-a6cKceqE.js";import{_ as b}from"./app-BvnL5tNz.js";import{_ as g}from"./app-Wy4FFEmL.js";import{_ as v}from"./app-Dybju26_.js";import{_ as y}from"./app-BsFusN7_.js";import{L as w}from"./app-W_y7sflh.js";import{_ as u}from"./app-BqeukU67.js";import{_ as U}from"./app-uhTxLRnQ.js";import{_ as B}from"./app-B6Y8s8wR.js";import{_ as N}from"./app-DmX24te2.js";import"./app-DCd54JMo.js";import"./app-MrAtUXr3.js";import"./app-BWSI2Z1R.js";import"./app-DPDEogA0.js";import"./app-DxjODhok.js";import"./app-CabATHnR.js";import"./app-BhzV4gWo.js";import"./app-D2Wz0BUQ.js";import"./app-D3zbrzdO.js";import"./app-CJCAnMrx.js";import"./app-Cp3gmk2J.js";import"./app--MWyBMkA.js";import"./app-BG60hdvp.js";import"./app-CNARLpXE.js";import"./app-SxAW7vhf.js";import"./app-D5k1HLu9.js";import"./app-ysQ8KbGS.js";import"./app-BDgR0DSb.js";import"./app-Cc2zXvHs.js";import"./app-aSafd0Me.js";import"./app-BHl80pFw.js";import"./app-Btbk6LWy.js";import"./app-CrkKi1Ag.js";import"./app-u5shTDG_.js";import"./app-CO4sV-Ic.js";import"./app-yt37eDzA.js";import"./app-BQ5ggxk2.js";import"./app-CrjU8lgK.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};
