import{_ as t}from"./index.js?v=1764233927359";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1764233927359";import{a2 as e,ar as s,as as l,at as n,o,m as c,au as u,av as i,p as r}from"./page_layout.js?v=1764233927359";import{k as p,a0 as d,R as _,V as v,W as f,a3 as m,S as x,a4 as b,U as S,j as y,r as w,a2 as P,ak as $,P as g,c as k,an as C,H as h}from"./vue.js?v=1764233927359";import{a as j}from"./public.js?v=1764233927359";import{_ as R}from"./index99.js?v=1764233927359";import{da as A,aC as I,dR as U,df as B,au as M,dS as L}from"./naive.js?v=1764233927359";import"./common.js?v=1764233927359";import"./__commonjsHelpers__.js?v=1764233927359";const z={class:"p-10"},H={class:"w-48%"},E={class:"mb-8px"},F={class:"w-48%"},T={class:"mb-8px"},V=p({__name:"SslForm",setup(t){const a=e(),{certInfo:l}=d(a);return(t,a)=>{const e=R,n=A,o=I;return v(),_("div",z,[f(n,{class:"mb-16px",size:10,justify:"space-between"},{default:m(()=>[x("div",H,[x("div",E,b(t.$t("Site.Cert.index_50")),1),f(e,{value:S(l).private_key,"onUpdate:value":a[0]||(a[0]=t=>S(l).private_key=t),rows:10},null,8,["value"])]),x("div",F,[x("div",T,b(t.$t("Site.Cert.index_51")),1),f(e,{value:S(l).certificate,"onUpdate:value":a[1]||(a[1]=t=>S(l).certificate=t),rows:10},null,8,["value"])])]),_:1}),f(n,{class:"mb-12px"},{default:m(()=>[f(o,{type:"primary",onClick:a[2]||(a[2]=t=>S(s)(S(l).certificate,S(l).private_key))},{default:m(()=>[y(b(t.$t("Public.Btn.Save")),1)]),_:1})]),_:1})])}}}),W={class:"w-300px host-modify"},q=p({__name:"server-port",setup(t){const a=e(),{port:s}=d(a),n=w(s.value),o=s.value,c=async()=>{try{await l(n.value),s.value=n.value}catch(t){n.value=o}};return(t,a)=>{const e=B,s=I,l=U;return v(),P(l,{label:t.$t("Site.TableRow.index_16"),"show-feedback":!1},{default:m(()=>[x("div",W,[f(e,{"show-button":!1,value:S(n),"onUpdate:value":a[0]||(a[0]=t=>$(n)?n.value=t:null),placeholder:""},null,8,["value"])]),f(s,{type:"primary",class:"ml-8px",onClick:c},{default:m(()=>[y(b(t.$t("Public.Btn.Modify")),1)]),_:1})]),_:1},8,["label"])}}}),D={class:"flex items-center"},G={class:"mr-4px text-13px"},J={class:"mr-4px"},K={class:"w-300px host-modify"},N=r(p({__name:"index",setup(s){const{t:l}=g(),r=e(),{isRunning:p,serverIP:_,serverProtocol:R,version:B,port:z}=d(r),H=k(()=>n(B.value,"2.1.9")),E=w(!1),F=new Map([["start",l("Public.Status.Start")],["stop",l("Public.Status.Stop")],["reload",l("Public.Status.Reload")],["restart",l("Public.Status.Restart")]]),T=t=>{const a=F.get(t)||"";j({title:l("Account.Settings.index_11",[a]),content:l("Account.Settings.index_12",[a.toLocaleLowerCase()]),onConfirm:async()=>{await i(t),r.getInfo()}})},W=()=>{T(p.value?"stop":"start")},N=()=>{T("reload")},O=()=>{T("restart")},Q=async()=>{""!==_.value?await u(_.value):c.error(l("Account.Settings.index_13"))},X=()=>{r.resetServerIP()};function Y(){window.open("".concat(R.value,"://").concat(_.value,":").concat(z.value,"/account/login"))}return r.getCertInfo(),r.getServerIP(),(e,s)=>{const l=A,n=I,c=U,u=M,i=o,r=a,d=t,w=L;return v(),P(w,{class:"p-16px px-24px"},{default:m(()=>[f(r,null,{default:m(()=>[f(c,{label:e.$t("Account.Settings.index_14")},{default:m(()=>[x("div",D,[x("span",G,b(e.$t("Account.Settings.index_10")),1),f(l,{class:"items-center",size:4},{default:m(()=>[x("span",J,b(S(p)?e.$t("Public.Status.Enable"):e.$t("Public.Status.Stopped")),1),x("span",{class:h(["iconfont","icon-".concat(S(p)?"start":"stop")])},null,2)]),_:1})]),f(n,{class:"ml-24px",onClick:W},{default:m(()=>[y(b(S(p)?e.$t("Public.Status.Stop"):e.$t("Public.Status.Start")),1)]),_:1}),f(n,{class:"ml-8px",onClick:O},{default:m(()=>[y(b(e.$t("Public.Status.Restart")),1)]),_:1}),f(n,{class:"ml-8px",onClick:N},{default:m(()=>[y(b(e.$t("Public.Status.Reload")),1)]),_:1})]),_:1},8,["label"]),f(c,{label:"SSL"},{default:m(()=>[f(n,{type:"primary",onClick:s[0]||(s[0]=t=>E.value=!0)},{default:m(()=>[y(b(e.$t("Public.Btn.Modify")),1)]),_:1})]),_:1}),f(c,{label:e.$t("Account.Settings.index_15")},{default:m(()=>[x("div",K,[f(u,{value:S(_),"onUpdate:value":s[1]||(s[1]=t=>$(_)?_.value=t:null),placeholder:""},null,8,["value"])]),f(n,{type:"primary",class:"ml-8px",onClick:Q},{default:m(()=>[y(b(e.$t("Public.Btn.Modify")),1)]),_:1}),f(n,{class:"ml-8px",onClick:X},{default:m(()=>[y(b(e.$t("Public.Btn.Reset")),1)]),_:1})]),_:1},8,["label"]),S(H)?(v(),P(q,{key:0})):C("",!0),f(c,{label:" ","show-feedback":!1},{default:m(()=>[x("div",null,[y(b(e.$t("Account.Settings.index_9"))+" ",1),f(i,{onClick:Y},{default:m(()=>[y(b("".concat(S(R),"://").concat(S(_),":").concat(S(z),"/account/login")),1)]),_:1})])]),_:1})]),_:1}),f(d,{show:S(E),"onUpdate:show":s[2]||(s[2]=t=>$(E)?E.value=t:null),title:e.$t("Account.Settings.index_16"),width:700,component:V},null,8,["show","title"])]),_:1})}}}),[["__scopeId","data-v-f1439041"]]);export{N as default};
